Skip to main content
POST
cURL
Creates a conversion and attributes it to a campaign affiliate. 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 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:
  1. Affiliate Tag (campaign_affiliate_id): Use the creator’s unique affiliate tag/code
  2. 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):
Using Growi IDs:
iOS app sale:

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: ios or platform: 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

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
order_id
string
required

Your unique order/transaction identifier

currency
enum<string>
required

Currency code

Available options:
usd,
eur,
gbp
total
integer

Total order amount in cents. At least one of total or subtotal is required.

subtotal
integer

Order subtotal in cents. At least one of total or subtotal is required.

platform
enum<string>
default:website

Conversion platform. Defaults to website. Use ios or android for mobile app sales (organization must have that app connected).

Available options:
website,
ios,
android
campaign_affiliate_id
string

Affiliate tag for attribution (required if not using growi_user_id + growi_campaign_id)

growi_user_id
integer

Growi user ID (required with growi_campaign_id if not using campaign_affiliate_id)

growi_campaign_id
integer

Growi campaign ID (required with growi_user_id if not using campaign_affiliate_id)

occurred_at
string<date-time>

When the sale occurred (ISO 8601)

due_at
string<date-time>

When commission becomes due

customer_email
string<email>

Customer email address

customer_name
string

Customer name

visitor_uid
string

Visitor unique identifier

sale_type
enum<string>
default:one_time

Type of sale

Available options:
one_time,
subscription
commission
integer

Override commission amount in cents

sub_id
string

Custom source/sub-ID tag (e.g., instagram, youtube) for platform-level tracking within a single campaign

Example:

"instagram"

Response

Affiliate sale created successfully

data
object