Update affiliate sale
Updates an existing affiliate sale that was created via the Public API (website, ios, or android with manual attribution). Only sales created through POST /affiliate_sales can be updated. Commission is automatically recalculated if total is updated without specifying commission.
PATCH
Updates an existing affiliate sale that was created via the Public API. Use this endpoint to modify sale details such as the total amount, commission, status, or customer information.
Only sales created through the public API (
Update status to paid:
Update multiple fields with explicit commission:
422 Unprocessable Entity - Validation or business rule error:
POST /affiliate_sales, including website, ios, and android with manual attribution) can be updated with this endpoint. Sales from other sources (e.g., Shopify, SDK cart attribution) cannot be modified via this API.
Important behavior
- Commission recalculation: If you update
totalwithout providingcommission, the commission will be automatically recalculated based on campaign rules. - Audit logging: Every successful update is recorded in an internal audit log for support and debugging purposes.
- Cancelled sales: Sales with status
cancelledcannot be updated.
Path parameters
Request body
All fields are optional. Only include the fields you want to update.Request example
Update the total and let commission recalculate:Response example
200 OK - Sale updated successfully:Response fields
Error responses
404 Not Found - Sale does not exist or does not belong to your organization:Use cases
This endpoint is useful for:- Order Adjustments: Update the total when an order is modified (e.g., partial refund, add-ons)
- Commission Corrections: Override the commission for special cases or promotions
- Status Management: Mark sales as paid or cancelled
- Data Corrections: Fix customer information or sale dates
- Sync with External Systems: Keep Growi in sync when orders are modified in your system
Authorizations
Body
application/json