Record a conversion for a campaign creator (website by default, or ios / android); idempotent on order_id and platform
POST
/api/public/v1/affiliate_salesLiveAnswers from your brand's records now.
Operation id createAffiliateSale
Request
curl
curl -X POST "https://creator.growthdept.ai/api/public/v1/affiliate_sales" \
-H "Authorization: Bearer gdc_..." \
-H "Content-Type: application/json" \
-d '{"campaign_affiliate_id":"string","commission":3,"currency":"usd","customer_email":"creator@example.com","customer_name":"Example name","due_at":"2026-11-01T15:04:05Z","growi_campaign_id":1024,"growi_user_id":1024,"occurred_at":"2026-11-01T15:04:05Z","order_id":"string","platform":"website","sale_type":"one_time","sub_id":"string","subtotal":3,"total":3,"visitor_uid":"string"}'Request body
| Field | Type | Notes |
|---|---|---|
| campaign_affiliate_id | string | |
| commission | integer | |
| currency | string | requiredOne of usdeurgbp |
| customer_email | string (email) | |
| customer_name | string | |
| due_at | string (date-time) | |
| growi_campaign_id | integer | |
| growi_user_id | integer | |
| occurred_at | string (date-time) | |
| order_id | string | required |
| platform | string | One of websiteiosandroid |
| sale_type | string | One of one_timesubscription |
| sub_id | string | |
| subtotal | integer | |
| total | integer | |
| visitor_uid | string |
Example
{
"campaign_affiliate_id": "string",
"commission": 3,
"currency": "usd",
"customer_email": "creator@example.com",
"customer_name": "Example name",
"due_at": "2026-11-01T15:04:05Z",
"growi_campaign_id": 1024,
"growi_user_id": 1024,
"occurred_at": "2026-11-01T15:04:05Z",
"order_id": "string",
"platform": "website",
"sale_type": "one_time",
"sub_id": "string",
"subtotal": 3,
"total": 3,
"visitor_uid": "string"
}Responses
201Success
| Field | Type | Notes |
|---|---|---|
| data | object | |
| data.commission | integer | |
| data.currency | string | |
| data.external_id | string | |
| data.id | integer | |
| data.occurred_at | string (date-time) | |
| data.platform | string | One of websiteiosandroidshopify |
| data.status | string | One of paiddueunpaidcanceledrefunded |
| data.sub_id | string | |
| data.total | integer |
Example
{
"data": {
"commission": 3,
"currency": "usd",
"external_id": "string",
"id": 1024,
"occurred_at": "2026-11-01T15:04:05Z",
"platform": "website",
"status": "paid",
"sub_id": "string",
"total": 3
}
}Errors: 401422with an error and usually a message. See errors.
Example values are made up from each field's type and name.