Updates an existing affiliate sale that was created via the Public API (website platform). Only sales created through POST /affiliate_sales can be updated. Commission is automatically recalculated if total is updated without specifying commission.
POST /affiliate_sales) can be updated with this endpoint. Sales from other platforms (e.g., Shopify) cannot be modified via this API.
total without providing commission, the commission will be automatically recalculated based on campaign rules.cancelled cannot be updated.| Parameter | Type | Description | Required |
|---|---|---|---|
id | Integer | ID of the affiliate sale to update | Yes |
| Field | Type | Description |
|---|---|---|
total | Integer | Total amount in cents. If provided without commission, commission is recalculated. |
subtotal | Integer | Subtotal in cents. |
currency | String | Currency code (e.g., usd, eur, gbp). |
occurred_at | String | When the sale occurred (ISO 8601 string or Unix timestamp). |
due_at | String | When the commission becomes due (ISO 8601 string or Unix timestamp). |
customer_email | String | Customer’s email address. Pass null to clear. |
customer_name | String | Customer’s name. Pass null to clear. |
commission | Integer | Commission amount in cents. Omit to auto-recalculate when total is updated. |
status | String | Sale status: unpaid, paid, paid_externally, or cancelled. |
| Field | Type | Description |
|---|---|---|
data | Object | The updated affiliate sale object |
data.id | Integer | Unique Growi identifier for the sale |
data.external_id | String | Your order ID |
data.platform | String | Always website for sales updated via this endpoint |
data.status | String | Current status: unpaid, paid, paid_externally, cancelled, or refunded |
data.occurred_at | String | ISO 8601 timestamp when the sale occurred |
data.total | Integer | Total order amount in cents |
data.commission | Integer | Commission amount in cents |
data.currency | String | Currency code |
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
ID of the affiliate sale to update
Total amount in cents. If provided without commission, commission is recalculated automatically.
Subtotal in cents
Currency code
usd, eur, gbp When the sale occurred (ISO 8601 string or Unix timestamp)
When the commission becomes due (ISO 8601 string or Unix timestamp)
Customer email address
Customer name
Commission amount in cents. Omit to auto-recalculate when total is updated.
Sale status
unpaid, paid, paid_externally, cancelled Affiliate sale updated successfully