Update a sale created through the API
PATCH
/api/public/v1/affiliate_sales/{id}LiveAnswers from your brand's records now.
Operation id updateAffiliateSale
Request
curl
curl -X PATCH "https://creator.growthdept.ai/api/public/v1/affiliate_sales/1024" \
-H "Authorization: Bearer gdc_..." \
-H "Content-Type: application/json" \
-d '{"commission":3,"currency":"usd","customer_email":"creator@example.com","customer_name":"Example name","due_at":"2026-11-01T15:04:05Z","occurred_at":"2026-11-01T15:04:05Z","status":"unpaid","sub_id":"string","subtotal":3,"total":3}'Parameters
| Name | In | Type | Notes |
|---|---|---|---|
| id | path | integer | required |
Request body
| Field | Type | Notes |
|---|---|---|
| commission | integer | |
| currency | string | One of usdeurgbp |
| customer_email | string (email), nullable | |
| customer_name | string, nullable | |
| due_at | string | |
| occurred_at | string | |
| status | string | One of unpaidpaidpaid_externallycancelled |
| sub_id | string | |
| subtotal | integer | |
| total | integer |
Example
{
"commission": 3,
"currency": "usd",
"customer_email": "creator@example.com",
"customer_name": "Example name",
"due_at": "2026-11-01T15:04:05Z",
"occurred_at": "2026-11-01T15:04:05Z",
"status": "unpaid",
"sub_id": "string",
"subtotal": 3,
"total": 3
}Responses
200Success
| 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: 401404422with an error and usually a message. See errors.
Example values are made up from each field's type and name.