API reference
Marketing
List promotions
/api/v1/promotions
The shop’s ad campaigns, running ones first, with budget, spend, impressions, clicks, conversions, and click-through rate (`ctr`, clicks per impression, 0-1).
- Scope
- MCP tool
- promotions_list
- Changes data
- No
Parameters
| Name | Type | Description |
|---|---|---|
statusquery · optional | enum | Only campaigns with this status |
limitquery · optional | integer | Results per page, 1-100 |
cursorquery · optional | string | The `next_cursor` from the previous page |
Request
curl "https://3commerce.com/api/v1/promotions" \
-H "Authorization: Bearer 3c_live_…"Response
{
"data": [
{
"id": "5d3a…",
"channel": "instagram",
"headline": "Linen season is here",
"status": "active",
"budget": 250,
"spent": 84.2,
"impressions": 12840,
"clicks": 412,
"conversions": 19,
"ctr": 0.0321,
"starts_at": "2026-11-18T00:00:00.000Z",
"ends_at": null,
"created_at": "2026-11-17T21:40:00.000Z",
"product": {
"id": "2a9d…",
"slug": "linen-overshirt",
"title": "Linen overshirt"
}
}
],
"next_cursor": null
}Create a promotion
/api/v1/promotions
Starts an active ad campaign for 1 of the shop’s published products on 1 channel. Pro plan only: a Free shop gets a 403 `plan_required`.
- Scope
- MCP tool
- promotions_create
- Changes data
- Yes
- Idempotency-Key
- Accepted
Parameters
| Name | Type | Description |
|---|---|---|
product_idbody · required | string (uuid) | A published product of this shop |
channelbody · required | enum | Where the campaign runs |
headlinebody · required | string | The ad headline, 3-90 characters |
budgetbody · required | number | Total budget in USD, 1-10000 |
starts_atbody · required | string (date) | The start date, YYYY-MM-DD |
Request
curl -X POST "https://3commerce.com/api/v1/promotions" \
-H "Authorization: Bearer 3c_live_…" \
-H "Content-Type: application/json" \
-d '{
"product_id": "6f1c2a4e-8b3d-4c5e-9a7f-1d2e3f4a5b6c",
"channel": "instagram",
"headline": "Example headline",
"budget": 48,
"starts_at": "2026-12-01"
}'Response
{
"id": "5d3a…",
"channel": "instagram",
"headline": "Linen season is here",
"status": "active",
"budget": 250,
"spent": 84.2,
"impressions": 12840,
"clicks": 412,
"conversions": 19,
"ctr": 0.0321,
"starts_at": "2026-11-18T00:00:00.000Z",
"ends_at": null,
"created_at": "2026-11-17T21:40:00.000Z",
"product": {
"id": "2a9d…",
"slug": "linen-overshirt",
"title": "Linen overshirt"
}
}Update a promotion
/api/v1/promotions/{id}
Pauses, resumes, or ends a campaign, or changes its budget or headline. A paused or draft campaign can resume, an active one can pause, and any can end. An ended campaign cannot change (409).
- Scope
- MCP tool
- promotions_update
- Changes data
- Yes
Parameters
| Name | Type | Description |
|---|---|---|
idpath · required | string (uuid) | The resource id |
statusbody · optional | enum | `active` resumes, `paused` pauses, `ended` ends |
budgetbody · optional | number | Total budget in USD, 1-10000 |
headlinebody · optional | string | The ad headline, 3-90 characters |
Request
curl -X PATCH "https://3commerce.com/api/v1/promotions/6f1c2a4e-8b3d-4c5e-9a7f-1d2e3f4a5b6c" \
-H "Authorization: Bearer 3c_live_…" \
-H "Content-Type: application/json" \
-d '{}'Response
{
"id": "5d3a…",
"channel": "instagram",
"headline": "Linen season is here",
"status": "paused",
"budget": 250,
"spent": 84.2,
"impressions": 12840,
"clicks": 412,
"conversions": 19,
"ctr": 0.0321,
"starts_at": "2026-11-18T00:00:00.000Z",
"ends_at": null,
"created_at": "2026-11-17T21:40:00.000Z",
"product": {
"id": "2a9d…",
"slug": "linen-overshirt",
"title": "Linen overshirt"
}
}List affiliates
/api/v1/affiliates
People who refer shoppers for a cut of each sale, top earners first, with their referral code, `referral_url` to share, commission rate, clicks, conversions, and earnings.
- Scope
- MCP tool
- affiliates_list
- Changes data
- No
Parameters
| Name | Type | Description |
|---|---|---|
statusquery · optional | enum | Only affiliates with this status |
limitquery · optional | integer | Results per page, 1-100 |
cursorquery · optional | string | The `next_cursor` from the previous page |
Request
curl "https://3commerce.com/api/v1/affiliates" \
-H "Authorization: Bearer 3c_live_…"Response
{
"data": [
{
"id": "e81f…",
"name": "Jordan Blake",
"email": "jordan@example.com",
"code": "JORDAN42",
"commission_rate": 0.1,
"clicks": 318,
"conversions": 12,
"earnings": 96.4,
"status": "active",
"referral_url": "https://3commerce.com/?ref=JORDAN42",
"created_at": "2026-10-02T14:20:00.000Z"
}
],
"next_cursor": null
}Invite an affiliate
/api/v1/affiliates
Adds an affiliate with status `invited` and a unique referral code built from their first name. Pro plan only: a Free shop gets a 403 `plan_required`. An email already in the program is a 409.
- Scope
- MCP tool
- affiliates_invite
- Changes data
- Yes
- Idempotency-Key
- Accepted
Parameters
| Name | Type | Description |
|---|---|---|
namebody · required | string | Their name, 2-80 characters |
emailbody · required | string | Their email address |
commission_ratebody · required | number | Commission per sale as a rate, 0.05-0.30 in whole percents (0.1 is 10%) |
Request
curl -X POST "https://3commerce.com/api/v1/affiliates" \
-H "Authorization: Bearer 3c_live_…" \
-H "Content-Type: application/json" \
-d '{
"name": "Northline Studio",
"email": "ada@example.com",
"commission_rate": 0.3
}'Response
{
"id": "e81f…",
"name": "Jordan Blake",
"email": "jordan@example.com",
"code": "JORDAN42",
"commission_rate": 0.1,
"clicks": 0,
"conversions": 0,
"earnings": 0,
"status": "invited",
"referral_url": "https://3commerce.com/?ref=JORDAN42",
"created_at": "2026-10-02T14:20:00.000Z"
}Update an affiliate
/api/v1/affiliates/{id}
Pauses an affiliate’s link or turns it on (which also accepts a pending invite for them), or changes their commission rate.
- Scope
- MCP tool
- affiliates_update
- Changes data
- Yes
Parameters
| Name | Type | Description |
|---|---|---|
idpath · required | string (uuid) | The resource id |
statusbody · optional | enum | `active` turns the link on, `paused` stops it |
commission_ratebody · optional | number | Commission per sale as a rate, 0.05-0.30 in whole percents (0.1 is 10%) |
Request
curl -X PATCH "https://3commerce.com/api/v1/affiliates/6f1c2a4e-8b3d-4c5e-9a7f-1d2e3f4a5b6c" \
-H "Authorization: Bearer 3c_live_…" \
-H "Content-Type: application/json" \
-d '{}'Response
{
"id": "e81f…",
"name": "Jordan Blake",
"email": "jordan@example.com",
"code": "JORDAN42",
"commission_rate": 0.1,
"clicks": 318,
"conversions": 12,
"earnings": 96.4,
"status": "paused",
"referral_url": "https://3commerce.com/?ref=JORDAN42",
"created_at": "2026-10-02T14:20:00.000Z"
}