Skip to content

API reference

How commission works when you run your own network

Before you call anything, it helps to know who is in the room. A sale that shows up in this API has already passed through four parties, and each one sees a different number for the same transaction. Get this straight first and the field reference further down stops being abstract — you will already know why each field exists.

Who is who

  • The network — Awin, CJ, Rakuten, and so on. This is who the advertiser actually pays commission to, and who tells us what a sale was worth.
  • The owner — a SubNetwork partner (you, if you are reading this with an owner key) who has connected their own network account to Affilitera and is reselling access to that inventory under their own brand.
  • The affiliate — someone the owner has brought on to promote that inventory through their own tracked links: a creator, a smaller content site, a partner site. The owner decides what each of them earns; we just track and report it.
  • Affilitera — us. We track the click, resolve who gets what, and report it back through this API. We take our own cut off the top of every sale, the same way an owner takes a cut before one of their affiliates sees anything.

One sale, four numbers

Say Amy, an affiliate registered under a SubNetwork owner called Northshore Media, posts a tracked link to a €200.00 order at Verve Skincare — an Awin advertiser Northshore Media has connected. Awin reports the sale and its commission the way it always does: a pool of €10.00 (5% of the order), paid out on Awin’s own schedule to whoever holds the Awin account, which is Northshore Media, not Amy and not us. Nobody downstream of Awin ever touches that money directly — what this API reports is our record of how that pool should be divided, not a transfer of funds.

The split runs as a waterfall off the top of that €10.00 pool:

  1. Affilitera takes its own cut first — say 20% of the pool: €2.00. €8.00 remains.
  2. Amy’s affiliate rate applies to what is left — say 25%: €2.00.
  3. Northshore Media, as the owner, keeps whatever is left over: €6.00.

Every tier adds back up to the original pool, always: €2.00 + €2.00 + €6.00 = €10.00. That is not a coincidence — each tier takes a percentage of what is left after the tier before it, and the last party in line simply keeps the remainder, to the cent.

Why the same sale produces different numbers for different readers

This API reports two of those four numbers, and which two depends on whose key you are using — never all four, and never Affilitera’s own cut.

Northshore Media, the owner, authenticates with an instance key (snk_…, minted from the Affilitera app) and reads GET /subnetwork/reporting/transactions and GET /subnetwork/reporting/summary. Those return pool_commission (the whole €10.00 Awin reported), computed_owner_split (Northshore’s own €6.00), and computed_sub_split (what an affiliate — Amy — earned, €2.00). An owner sees the full picture for their own connections, because it is their Awin account and their affiliate to manage.

Amy, the affiliate, authenticates with a completely different key, on a completely different endpoint — GET /affiliate/transactions, outside this reference, on the main-network affiliate API. It returns exactly one money field for this sale, your_share: €2.00. Amy never sees the €10.00 pool, never sees Northshore Media’s €6.00, and never sees Affilitera’s cut — only her own number. If you are building for one of those affiliates rather than for an owner, this is not the reference you want; ask the owner you are integrating with for the affiliate-side documentation instead.

And Affilitera’s own €2.00 is not a field anywhere on either surface. It is the one number in the waterfall neither of you needs to see, because it is not paid to either of you — it is ours. If you want it, it is pool_commission − computed_owner_split − computed_sub_split, but we do not hand it to you directly, on purpose.

Two currencies on every reporting row

Every transaction and summary row carries both currency and split_currency, and they usually agree. They are not the same field wearing two names, though, and the difference is worth understanding before you write a parser that only reads one of them.

currency is whatever we currently have on file for the order itself — set when the network reports the sale, and occasionally corrected afterward if the network corrects it. split_currency is the currency pool_commission, computed_owner_split and computed_sub_split are actually denominated in, stamped at the moment we last resolved the split — which can be earlier than the order’s currency was last touched. A network correcting an order’s currency updates currency immediately; the split itself is not recomputed until the next reconciliation pass picks the order back up, and until it does, the two fields can legitimately disagree.

Parse the three split amounts against split_currency, never against currency. It is the field that is actually true of the money the amounts represent — currency can be a step ahead of it.

null means not yet accrued — never zero

pool_commission, computed_owner_split, computed_sub_split and split_currency are null together, on any transaction we have not resolved a split for yet — most commonly a sale from the last day or two, before the network has confirmed the commission and our reconciler has run against it. order_value and currency are populated immediately, because those come from the order itself and not from the split; only the split fields wait.

Treat null as we do not have this yet, ask again later — never as €0.00. A €0.00 split is a real, different fact: it means we resolved the split and the result was genuinely nothing (a 0% rate, for instance). Coercing a null to zero in your own code will make a sale that has not accrued yet look identical to one that accrued nothing, and those are not the same event.

Cancelled and refunded sales

When a network cancels a sale or refunds part of it, some networks report the sale value as 0. We keep the original value instead: order_value is never lowered by a cancellation or a refund. The cancelled or refunded part is reported as declined_order_value, and the rest as remaining_order_value. A cancelled sale is wholly declined; a partly refunded sale keeps its status and only the refunded part is declined. On GET /reporting/transactions the order’s commission is stated the same way, as original_commission, declined_commission and remaining_commission; the remaining part is the one still payable. Like every money field here, they are decimal strings, and null means not stated, never zero.

The clicks behind a sale

Every row on GET /subnetwork/reporting/transactions and GET /affiliate/transactions carries four click fields. click_tracked is true when a click recorded by our own tracking is behind the sale and false when none is (a network reported the sale on its own). referrer is the page the visitor came from when they made the credited click, as their browser sent it, with personal data such as email addresses and tokens removed. It is never the affiliate’s registered website. referrer_kind is full, origin_only (the browser sent only the site, which most browsers do by default) or none. click_count is how many of the sale’s clicks you may see: an affiliate sees only their own clicks, a network owner the clicks on its own connections. referrer is null when no referrer was sent, when the credited click is not yours to see, or when its detail was cleared under our retention rules. When the response’s click_details_degraded is true, some rows’ click fields could not be read and are null: that means not read, never not tracked. The fields are additive; nothing else on the row changed.

To get the clicks themselves, add include=clicks to either request. Every row then also carries clicks: each click behind the sale that you may see, oldest first, with credited marking the click the sale was credited to, and its referrer, landing_url, link, creative_id, device_type, country_code, minutes_to_sale and sub_id. An affiliate sees only their own clicks; a network owner also sees each click’s affiliate_number. It is off unless you ask for it, so a request without it is answered exactly as before. A response with more than 200 sales that have tracked clicks is refused with 400 filter_too_broad: ask for a smaller page or a shorter date range.

The same rule holds for every money field on this API: a missing amount is reported as null, never as 0 or "0", and every one of them is a decimal string ("6.00"), not a JSON number — parse with a decimal type. parseFloat("6.00") happens to work today; the moment an amount needs more precision than a double can hold, it silently will not, and nothing will tell you.

The split is frozen to the transaction date

Every rate that feeds a split — Affilitera’s own cut, an affiliate’s share — is looked up as of the order’s transaction date, not as of whenever the split happens to be computed or whenever you happen to be reading it. If Northshore Media renegotiates Amy’s rate next month, this sale’s numbers do not move; only sales from the effective date of the new rate onward use it.

That has a real consequence for reconciliation: if you keep your own record of what rate was in effect on May 18th and it does not precisely match what actually was, your numbers will disagree with ours on that sale — and they will go on disagreeing indefinitely, because neither side recomputes an old, settled split against new information. If a number here ever looks wrong to you, check whether your own rate history agrees with ours as of the transaction date, not as of today.

There is no balance, payable, or owed field

You will not find one, and that is deliberate, not an omission. Affilitera does not disburse SubNetwork commission — Northshore Media, in the example above, is paid by Awin directly, on Awin’s own schedule, because it is Northshore’s Awin account. Everything under /reporting/* is informational: it tells you how a sale’s commission was divided, not what anyone is owed or when they will see it. If you are looking for a running balance, it does not exist on this API — track payments to your own affiliates with GET/POST /subnetwork/payouts instead, which is a record you maintain yourself, not money Affilitera moves.