Create affiliate sale
Creates a conversion and attributes it to a campaign creator. Defaults to platform=website; pass platform=ios or android for mobile app sales. Idempotent: sending the same order_id for the same platform returns the existing sale.
POST
Creates a conversion and attributes it to a campaign creator. Use this endpoint to report conversions from your website, iOS/Android apps, custom checkout flows, or server-side integrations.
By default, sales are created with
Using Growi IDs:
iOS app sale:
platform: website. Pass platform: ios or platform: android to create mobile app sales that show up in iOS/Android analytics (same AffiliateSale rows those dashboards already read).
This endpoint is idempotent: sending the same order_id again for the same platform returns the existing sale with a 201 status code, making it safe for webhook handlers and retry logic.
Attribution methods
You can attribute the sale using one of two methods:- Affiliate Tag (
campaign_affiliate_id): Use the creator’s unique affiliate tag/code - Growi IDs (
growi_user_id+growi_campaign_id): Use the Growi user ID and campaign ID directly
Request body
Request example
Using affiliate tag (website — default):Response example
201 Created - Sale created successfully (or already exists with same order_id + platform):Response fields
Error responses
422 Unprocessable Entity - Missing required fields or invalid attribution:Use cases
This endpoint is useful for:- Server-Side Conversion Tracking: Report conversions from your backend after a successful checkout
- iOS / Android In-App Purchases: Report mobile payments with
platform: iosorplatform: android(preferred over tracking-events for sales) - Custom Checkout Flows: Integrate with headless commerce or custom payment systems
- Webhook Handlers: Process payment webhooks (idempotent design ensures safe retries)
- CRM Integration: Create conversions when deals close in your CRM
- Manual Attribution: Attribute offline or phone sales to specific creators
- Commission Override: Specify custom commission amounts for special promotions
Authorizations
Body
application/json