Creates a website conversion and attributes it to a campaign affiliate. Idempotent: sending the same order_id returns the existing sale.
order_id again returns the existing sale with a 201 status code, making it safe for webhook handlers and retry logic.
campaign_affiliate_id): Use the creator’s unique affiliate tag/codegrowi_user_id + growi_campaign_id): Use the Growi user ID and campaign ID directly| Field | Type | Description | Required |
|---|---|---|---|
order_id | String | Your unique order/transaction identifier | Yes |
total | Integer | Total order amount in cents (e.g., 9999 = $99.99). At least one of total or subtotal is required. | Conditional |
subtotal | Integer | Order subtotal in cents (before shipping/tax). At least one of total or subtotal is required. | Conditional |
currency | String | Currency code: usd, eur, gbp, etc. | Yes |
campaign_affiliate_id | String | Affiliate tag for attribution (required if not using growi_user_id + growi_campaign_id) | Conditional |
growi_user_id | Integer | Growi user ID (required with growi_campaign_id if not using campaign_affiliate_id) | Conditional |
growi_campaign_id | Integer | Growi campaign ID (required with growi_user_id if not using campaign_affiliate_id) | Conditional |
occurred_at | String | ISO 8601 timestamp when the sale occurred. Defaults to current time. | No |
due_at | String | ISO 8601 timestamp when commission becomes due | No |
customer_email | String | Customer’s email address | No |
customer_name | String | Customer’s name | No |
visitor_uid | String | Visitor unique identifier (for tracking purposes) | No |
sale_type | String | Type of sale: one_time or subscription. Default is one_time. | No |
commission | Integer | Override commission amount in cents. If omitted, calculated from campaign rules. | No |
| Field | Type | Description |
|---|---|---|
data | Object | The created affiliate sale object |
data.id | Integer | Unique Growi identifier for the sale |
data.external_id | String | Your order ID (same as the order_id you provided) |
data.platform | String | Always website for sales created via this endpoint |
data.status | String | Initial status: unpaid |
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 (calculated or overridden) |
data.currency | String | Currency code |
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Your unique order/transaction identifier
Currency code
usd, eur, gbp Total order amount in cents. At least one of total or subtotal is required.
Order subtotal in cents. At least one of total or subtotal is required.
Affiliate tag for attribution (required if not using growi_user_id + growi_campaign_id)
Growi user ID (required with growi_campaign_id if not using campaign_affiliate_id)
Growi campaign ID (required with growi_user_id if not using campaign_affiliate_id)
When the sale occurred (ISO 8601)
When commission becomes due
Customer email address
Customer name
Visitor unique identifier
Type of sale
one_time, subscription Override commission amount in cents
Affiliate sale created successfully