Sales and tracking

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

NameInTypeNotes
idpathintegerrequired

Request body

FieldTypeNotes
commissioninteger
currencystringOne of usdeurgbp
customer_emailstring (email), nullable
customer_namestring, nullable
due_atstring
occurred_atstring
statusstringOne of unpaidpaidpaid_externallycancelled
sub_idstring
subtotalinteger
totalinteger

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

FieldTypeNotes
dataobject
data.commissioninteger
data.currencystring
data.external_idstring
data.idinteger
data.occurred_atstring (date-time)
data.platformstringOne of websiteiosandroidshopify
data.statusstringOne of paiddueunpaidcanceledrefunded
data.sub_idstring
data.totalinteger

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.