Export PDF

Parceiroos

Technical integration documentation

The reference for advertisers, affiliates, networks and developers integrating with Parceiroos.

Host
SEU-DOMINIO
Generated on
November 06, 2026
Language
English
In this document
  1. 01Overview
    1. Platform endpoints
  2. 02Advertisers: reporting conversions
    1. First things first: the click_id
    2. Server-to-server postback
    3. Image pixel
    4. JavaScript container
    5. Conversion lifecycle
  3. 03Affiliates: links and outbound postback
    1. Tracking link
    2. Outbound postback
    3. Available macros
  4. 04External networks and integrators
    1. Worked example: external network
    2. How sale_amount gets its value
  5. 05Affiliate networks
    1. Actionpay
    2. Admitad
    3. Awin
    4. CJ Affiliate
    5. Impact
    6. Rakuten Advertising
    7. Afilio
    8. Lomadee
    9. Checkout platforms
  6. 06AI assistants and the MCP server
    1. Connect a client
    2. Available tools
  7. 07Troubleshooting and FAQ

Overview

The path of a sale, from click to commission, and the endpoints along the way.

Everyone

Parceiroos follows a sale from the first click to the commission paid. The affiliate publishes a tracking link; the platform records the click and sends the visitor to the advertiser; the advertiser confirms the sale back; the conversion moves through its statuses and becomes a commission. Everything that follows describes the parts of that circuit.

  1. Click

    Traffic enters through https://SEU-DOMINIO/click?offer=…&aff=…. The platform records the click, mints a click_id and redirects to the advertiser's page carrying that identifier.

  2. Conversion

    Once the sale is confirmed, the advertiser reports it by server-to-server postback, pixel or JavaScript container. The click_id and a unique transaction id travel with every call.

  3. Status

    A conversion is born PENDING, may pass through VALIDATING and ends as APPROVED, DECLINED or PAID. Each change can fire the affiliate's outbound postback.

  4. Payout

    Approved conversions enter finance and are paid to the affiliate under the program's policy.

#Platform endpoints

PurposeEndpointUsed by
Tracking link (traffic in)GET https://SEU-DOMINIO/click?offer=ID_PUBLICO&aff=CODIGOAffiliate / network
Inbound postback (conversion)GET or POST https://SEU-DOMINIO/postbackAdvertiser
Click capture scripthttps://SEU-DOMINIO/js/platform/handle.jsAdvertiser (pixel / JS)
JavaScript pixelhttps://SEU-DOMINIO/js/platform/pixel.jsAdvertiser (JS)
MCP server (AI assistants)POST https://SEU-DOMINIO/api/mcpAdvertiser / dev
Macro catalogue as JSONGET https://SEU-DOMINIO/api/postback-macrosNetwork / integrator

Advertisers: reporting conversions

Three ways to confirm a sale: server-to-server postback, image pixel and JavaScript container.

Advertiser

A sale exists for Parceiroos only once the advertiser confirms it. There are three methods. The server-to-server postback is the most accurate and the first to consider; pixel and JavaScript container depend on the buyer's browser and serve those without backend access.

#First things first: the click_id

When redirecting the visitor, the platform appends the click identifier to the destination URL. That value has to survive until the sale is confirmed: cookie, session or a hidden field on the order. Without a click_id there is no attribution, and the conversion is rejected.

  • The postback accepts the click in click_id, and also in clickId, clickid, cid, p1 and sub1.
  • In pixel and container integrations, handle.js captures and stores the click_id on its own.
  • A made-up click_id does not get through: the conversion is rejected.

#Server-to-server postback

The advertiser's backend calls the platform the moment the sale is confirmed, for instance when the payment is approved.

Postback URL (GET or POST)URL
https://SEU-DOMINIO/postback?token=SEU_TOKEN&click_id={CLICK_ID}&txn_id={TXN_ID}&saleAmount=VALOR_DA_VENDA&currency=BRL
Inbound postback parameters
ParameterRequiredDescription
tokenyesThe advertiser's postback token. Also in postbackToken, pb_token or the X-Postback-Token header.
click_idyesClick identifier captured on the landing page.
txn_idyesUnique transaction id in the advertiser's system. It is the idempotency key: the same txn_id never produces two conversions. Also in transaction_id, transactionId or txid.
saleAmountdependsTotal sale amount in decimals (199.90), for offers paying a percentage. Also in sale_amount, orderAmount, total.
commission or ratedependsFor fixed-commission offers: the commission (commission, value, payout) or the rate (rate, fixed) instead of saleAmount. The offer page says which.
currencynoISO currency code; BRL by default. Also in cur.
statusnoStatus at the source (approved, declined…). Stored for reconciliation; the conversion lands as PENDING and is validated by the operation.
order_id, external_idnoAdditional order identifier, stored for reconciliation.
  • POST accepts JSON or application/x-www-form-urlencoded; fields may go in the body or the query string.
  • The response is 200 with a confirmation JSON. A repeated transaction returns DUPLICATE_TRANSACTION and creates no record.
  • One call per sale, always from the server. Resending the same txn_id is safe.

#Image pixel

No backend. The capture script goes on every page, or at least on the landing page; the image tag, only on the thank-you page. The image fires the conversion as it loads.

Image pixelHTML
<!-- On every page (or at least on the landing page) -->
<script src="https://SEU-DOMINIO/js/platform/handle.js"></script>

<!-- Thank-you / confirmation page only -->
<img style="display:none;" src="https://SEU-DOMINIO/postback?token=SEU_TOKEN&click_id={CLICK_ID}&txn_id={TXN_ID}&currency=BRL&offer_id=ID_DA_OFERTA&saleAmount=VALOR_DA_VENDA">

#JavaScript container

On the thank-you page, the window.PLATFORM_PIXEL object receives the real order data and pixel.js does the rest: reads the object, recovers the click_id stored by handle.js and sends the conversion.

JavaScript containerHTML
<!-- On every page (or at least on the landing page) -->
<script src="https://SEU-DOMINIO/js/platform/handle.js"></script>

<!-- Thank-you / confirmation page only -->
<script>
  window.PLATFORM_PIXEL = {
    token: "SEU_TOKEN",
    clickId: "{CLICK_ID}",
    txnId: "{TXN_ID}",
    value: "VALOR_DA_VENDA",
    valueParam: "saleAmount",
    currency: "BRL",
    offerId: "ID_DA_OFERTA",
    network: "https://SEU-DOMINIO"
  };
</script>
<script src="https://SEU-DOMINIO/js/platform/pixel.js"></script>

#Conversion lifecycle

StatusMeaning
PENDINGReceived; awaiting validation.
VALIDATINGUnder review by the operation: anti-fraud, order check.
APPROVEDConfirmed. The commission now counts for the affiliate.
DECLINEDDeclined: cancellation, chargeback or fraud.
PAIDCommission paid to the affiliate.

Affiliates: links and outbound postback

The tracking link, sub-IDs and the conversion delivered to the affiliate's own system.

Affiliate

Every promotional link goes through https://SEU-DOMINIO/click. The dashboard hands out the ready link on each offer page; the structure is simple enough to assemble by hand.

Tracking link with sub-IDsURL
https://SEU-DOMINIO/click?offer=ID_PUBLICO_DA_OFERTA&aff=SEU_CODIGO&sub1=campanha-a&sub2=criativo-3
ParameterDescription
offerPublic offer id, shown on the offer page.
affAffiliate code. Also in affiliateCode.
sub1 … sub5Free sub-IDs for campaigns, creatives and sources. Stored on the click, returned on the outbound postback.
Platform tokensKnown ad-platform parameters are stored and returned unchanged: gclid · wbraid · gbraid · fbclid · ttclid · msclkid · twclid · irclickid · epik · utm_source · utm_medium · utm_campaign · utm_content · utm_term.

#Outbound postback

The affiliate's system URL is registered under Integrations → Postback. When a conversion enters a status subscribed under When to fire your postback, Parceiroos renders the URL with the macros and calls it over HTTP GET or POST. The default fires on APPROVED only.

Outbound postback URLURL
https://meu-tracker.com/postback?cid={click_id}&payout={payout}&status={status}&sub1={sub1}
  • Macros accept both delimiters, {macro} and [macro]; the URL can be pasted the way the network documents it.
  • An unknown macro goes out literally, unsubstituted: a typo shows up in the log instead of becoming an empty parameter.
  • Every value is URL-encoded. A missing optional value becomes an empty string, never 0.00.

#Available macros

Conversion macros
MacroWhat it sendsExampleAlso accepts
{click_id}Click identifier minted by the platform on the redirect.clk_9f2a4c1b7e8d3a5c6b0f{clickid} {clkid} {click}
{conversion_id}Unique conversion id on the platform. Matches the action_id/apid of networks that use those names.cnv_7d21b93a4f6c{conversionid} {action_id} {actionid} {apid}
{txn_id}Order id sent by the advertiser on the inbound postback.TX-88213{transaction_id} {transactionid} {external_id} {externalid} {order_id} {orderid} {txid} {tid}
{status}Conversion status: PENDING, VALIDATING, APPROVED, DECLINED or PAID.APPROVED—
{payout}Affiliate commission, in decimal units. Matches the networks' price/commission.35.00{commission} {price}
{payout_cents}The same commission in cents, for systems that reject decimals.3500{payoutcents} {commission_cents}
{sale_amount}Order total for the end customer, when the advertiser reports it. Matches the networks' totalPrice/total. Empty if not reported.199.90{saleamount} {total_price} {totalprice} {revenue} {total} {order_value}
{sale_amount_cents}The same sale amount in cents. Empty if not reported.19990{saleamountcents}
{currency}ISO code of the conversion currency.BRL—
{offer_id}Internal campaign identifier.cmp_4a8e1d02{campaign_id} {campaignid}
{offer_public_id}Public campaign identifier, the same one used on the tracking link.OF-2Z9K{offerpublicid} {campaign_public_id} {offer}
{offer_name}Campaign name, already URL-encoded.Conta Digital{campaign_name} {campaignname}
{affiliate_id}Identifier of the affiliate who owns the conversion.usr_31c7be40{affiliateid} {publisher_id}
{timestamp}Moment of the call in seconds since the Unix epoch.1772712000{unix} {ts}
{datetime}Moment of the call in ISO 8601 (UTC).2026-03-05T12:00:00.000Z{date_time} {iso_date}
Pass-through macros: only exist when present on the tracking link
MacroOrigin on the link
{sub1}?sub1=
{sub2}?sub2=
{sub3}?sub3=
{sub4}?sub4=
{sub5}?sub5=
{gclid}?gclid=
{wbraid}?wbraid=
{gbraid}?gbraid=
{fbclid}?fbclid=
{ttclid}?ttclid=
{msclkid}?msclkid=
{twclid}?twclid=
{irclickid}?irclickid=
{epik}?epik=
{utm_source}?utm_source=
{utm_medium}?utm_medium=
{utm_campaign}?utm_campaign=
{utm_content}?utm_content=
{utm_term}?utm_term=

External networks and integrators

The general model for any system that asks for the platform macros.

External network

A tracker, a network or a partner's backend needs two things: its click token on the tracking link and that same token back on the outbound postback. The macro catalogue is also published as JSON at https://SEU-DOMINIO/api/postback-macros, ready to forward.

#Worked example: external network

The example uses a fictional network that documents its postback with the fields [click_token], [action_id], [price] and [total]. Names change from network to network; the mechanism does not.

Network field → macro
Network fieldParceiroos macroNote
Account id—Fixed value provided by the network. Goes literally in the URL.
[click_token]{sub1}The network's click token. Goes in on the link, comes back unchanged.
[action_id]{conversion_id}Conversion id on the platform.
[price]{payout}Conversion commission.
[total]{sale_amount}Order amount. Empty when the advertiser does not report it.
  1. Tracking link

    The network puts its token in sub1; the value is stored with the click.

  2. Postback URL

    Under Integrations → Postback, the network's URL goes in with its fields swapped for the macros. Under When to fire your postback, the statuses that should notify it.

  3. What the network receives

    The final, rendered URL is kept in the outbound postback log.

1. Tracking linkURL
https://SEU-DOMINIO/click?offer=ID_PUBLICO&aff=CODIGO&sub1=[click_token]
2. Registered postback URLURL
https://rede-exemplo.com/postback/ID_DA_CONTA?token={sub1}&action_id={conversion_id}&price={payout}&total={sale_amount}
3. What the network receivesURL
https://rede-exemplo.com/postback/ID_DA_CONTA?token=cca6a691-8ded-6ddf-e979-01503768f7eb.76066&action_id=cnv_7d21b93a4f6c&price=1.00&total=10.00

#How sale_amount gets its value

{payout} is the commission and always exists. {sale_amount} is the order amount and only exists when the advertiser sends it on the inbound postback as sale_amount, saleAmount, total_price, totalPrice, order_value or total. Another name can be mapped under Integrations → Advertiser postback. If the network demands a number, {payout} works in both fields.

Affiliate networks

A guide per network, in both directions: the network as an affiliate of your program and the network as the advertiser behind your offers.

External network

An affiliate network can occupy two places in your program. As an affiliate, it sends traffic and receives the conversion through the outbound postback. As an advertiser, you run its offers: the offer destination is the network's affiliate link, with your {click_id} in its sub-ID, and its postback delivers the sale to your inbound postback. Each guide below covers the directions the network offers.

Actionpay

CPA network with a strong footprint in Latin America and Eastern Europe.

Tested on the platform

The network is registered as an affiliate of your program. Its click token rides on your tracking link and comes back on the outbound postback URL.

Actionpay sends traffic with [click].[source] on the link and receives the conversion on its endpoint.

1. Tracking link carrying the network's tokenURL
https://SEU-DOMINIO/click?offer=ID_PUBLICO&aff=CODIGO_DA_REDE&actionpay=[click].[source]
2. Outbound postback URL to registerURL
https://apypp.com/ok/AIM_ID.png?actionpay={actionpay}&apid={conversion_id}&price={payout}&totalPrice={sale_amount}
Network field → platform macro
Network fieldMacroNote
AIM_ID—Numeric program id, provided by Actionpay. Fixed in the URL.
[click].[source]{actionpay}Click token. Goes in on the link, comes back unchanged.
apid{conversion_id}Conversion id on the platform.
price{payout}Conversion commission.
totalPrice{sale_amount}Order amount. Empty when the advertiser does not report it.
  • The network joins as an affiliate of the program; its code goes in aff.
  • The postback URL is registered under the affiliate's Integrations → Postback, with the statuses that should notify the network.
  • The token can also ride on sub1 and return as {sub1}; the result is the same.

AI assistants and the MCP server

Claude Code, Cursor or any MCP client generates and applies the integration from the real offers.

Developer

Parceiroos exposes a Model Context Protocol server. With a key, the advertiser's assistant lists the offers, generates the snippet with the real token and id, applies it to the project and confirms whether conversions arrived. The scope is always the key owner's offers.

Included in this platform's plan

Compatible clients

  • Claude
  • ChatGPT
  • Cursor
  • Windsurf
  • Hermes
  • OpenClaw

Connect with one command

Claude CodeShell
claude mcp add --transport http plataforma https://SEU-DOMINIO/api/mcp --header "Authorization: Bearer mcp_SUA_CHAVE"
  • Claude Claude Code and Claude Desktop: claude mcp add command or the generic JSON.
  • ChatGPT Remote MCP connector (Developer mode) pointing at /api/mcp with the authorization header.
  • Cursor mcpServers block in the editor's configuration file.
  • Windsurf Same mcpServers block, in the Cascade configuration.
  • Hermes MCP server over HTTP: same URL, same header.
  • OpenClaw Any open agent that speaks MCP over HTTP.
  1. Key

    Settings → API & MCP → Create key. The key (prefix mcp_) is shown only once.

  2. Client

    The command below in the terminal of the project receiving the integration, or the generic JSON configuration.

  3. Request

    In the assistant: “list my offers and generate the postback integration for offer X”. Once the snippet is applied, a second request verifies it.

#Connect a client

Claude CodeShell
claude mcp add --transport http plataforma https://SEU-DOMINIO/api/mcp --header "Authorization: Bearer mcp_SUA_CHAVE"
Generic configuration (Cursor, Claude Desktop and others)JSON
{
  "mcpServers": {
    "plataforma": {
      "type": "http",
      "url": "https://SEU-DOMINIO/api/mcp",
      "headers": {
        "Authorization": "Bearer mcp_SUA_CHAVE"
      }
    }
  }
}

#Available tools

ToolArgumentsWhat it does
list_offerslimit?Lists the tenant's offers with their public ids.
get_offerofferIdDetails of one offer by public id, internal id or slug.
generate_integrationofferId, methodReady snippet for POSTBACK, PIXEL or JAVASCRIPT_CONTAINER, with the walkthrough.
verify_integrationofferIdConfirms whether the offer has received conversions and shows the latest.
  • Transport: Streamable HTTP, stateless, single JSON response (JSON-RPC 2.0).
  • Authentication: Authorization: Bearer mcp_… header on every call. Keys can be revoked at any time.
  • Without an MCP client, the offer page generates a complete prompt for any assistant.

Troubleshooting and FAQ

Where to look when a conversion does not show up or a postback does not arrive.

Everyone
SymptomWhere to look
The conversion does not show in the dashboardAdmin → Postback logs keeps everything that arrived from the advertiser, with the rejection reason: invalid token, missing click_id, duplicate.
The network does not receive the outbound postbackThe status subscribed under When to fire your postback. Each call is logged with the final URL, method, HTTP status and error.
The logged URL shows a literal {something}The macro does not exist. The macro table lists names and aliases.
totalPrice arrives emptyThe advertiser did not send the sale amount. The parameter can be mapped under Advertiser postback, or {payout} fills the field.
The pixel fires, nothing is recordedhandle.js has to load on the landing page to capture the click_id. The server-to-server postback removes that dependency.
Duplicate conversionResends with the same txn_id are ignored by design. A new txn_id only for different sales.
Parceiroos © 2026Document generated on November 06, 2026