API documentation  Custom payouts

Read, set or remove the per-affiliate custom payouts of an offer.

GET https://demo.trafficmanager.com/api/v1/offers/{id}/custom-payouts
POST https://demo.trafficmanager.com/api/v1/offers/{id}/custom-payouts
DELETE https://demo.trafficmanager.com/api/v1/offers/{id}/custom-payouts/{userId}

The endpoints are available only for admin and advertiser accounts allowed to edit the offer.

Authentication:

The request must be authenticated with the following HTTP headers:
  • x-api-key: Your API key, found on the Security page
  • x-user-id: Your User ID, found on the Security page
If the HTTP headers are not passed, but you are logged in to the TrafficManager panel, the current user is used instead (so you can easily preview or download the data using your browser)

GET

Returns the customPayouts object, in the same format as the offer export: one entry per affiliate (keyed by user id) or affiliate group (keyed by g_<groupId>). Entries with isRule: true are generated by payout rules and cannot be edited with these endpoints. The affiliate and group names are included only for accounts allowed to see them (admins): advertisers work with the user ids.

POST (set or update)

Creates or updates the custom payout of one affiliate. Body parameters (JSON):

  • user: affiliate user id (required). New custom payouts require an active affiliate; group payouts (g_*) and payout-rule entries are not editable via API.
  • payout: the custom payout for this affiliate (required). Same rules as the offer payout: not available for structured payout modes (custom events, dynamic RevShare, RevShare tiers, payout by traffic source, custom payout text), and percentage modes stay within 0-100.
  • payout2: optional, only for mixed payout modes with a second payout. Omit or send null to remove it.
curl --location --request POST 'https://demo.trafficmanager.com/api/v1/offers/100/custom-payouts' \
    --header 'X-User-ID: __USER_UUID__' \
    --header 'X-Api-Key: __API_KEY__' \
    --header 'Content-Type: application/json' \
    --data '{
        "user": 715,
        "payout": 5.5
    }'

The success response contains the updated customPayouts object.

DELETE

Removes the custom payout of the given affiliate: the affiliate goes back to the offer's default payout, unless a payout rule covers him — in that case the rule resumes immediately and recreates its generated custom payout. Deleting a payout generated by a payout rule is rejected.

curl --location --request DELETE 'https://demo.trafficmanager.com/api/v1/offers/100/custom-payouts/715' \
    --header 'X-User-ID: __USER_UUID__' \
    --header 'X-Api-Key: __API_KEY__'

Error Response:

{
    "status": [error code],
    "message": [error message]
}