Errors and idempotency
Status codes, the error shape, and how to safely retry writes.
Error shape
Every error returns the same JSON shape:
{ "success": false, "message": "Missing or invalid API key" }Status codes
| code | meaning |
|---|---|
| 200 | OK. Also returned for an idempotent duplicate (deduped: true). |
| 201 | Created. |
| 400 | Invalid request (missing or malformed field). |
| 401 | Missing or invalid API key. |
| 403 | The resource does not belong to your organization. |
| 404 | Not found, or no attribution could be resolved. |
| 409 | Conflict (e.g. an affiliate slug is already taken). |
| 410 | Attribution window expired (the click is older than the program's window). |
| 500 | Internal error. Safe to retry. |
Idempotency
Writes that represent money are idempotent, so you can retry them without
double-counting.
- Conversions are idempotent on
external_id. A re-sent conversion returns
the existing record withdeduped: trueinstead of creating a new one. Always
send a stableexternal_id(your order or invoice id). - Customers are idempotent on
customer_id. A repeat call returns the
existing customer withdeduped: true. - Affiliates are idempotent per
(email, program). Re-creating the same
affiliate in the same program returns the existing membership.
Attribution failures
POST /api/conversions and POST /api/customers return 404 with
"No attribution found" when the referral cannot be resolved. Check that:
- the
cookie_id/ref/click_idyou sent is the one PartnerBee issued, and - the affiliate link belongs to the same organization as the API key.
For recurring charges, attribute by customer_id only after the customer has
been tracked with POST /api/customers.
Updated about 2 hours ago
Did this page help you?

