Affiliate stores API
REST endpoints for affiliate stores in SKUFlow: 5 operations with parameters, request and response fields, permissions and curl examples.
Base URL: https://app.skuflow.ai/api. Every call needs Authorization: Bearer skf_… (Authentication); {organizationId} ($ORGANIZATION_ID in the examples) is your business's id.
| Operation | Endpoint | Risk |
|---|---|---|
| Affiliate stores report | GET /organizations/{organizationId}/affiliates | read |
| An affiliate store's earnings | GET /organizations/{organizationId}/stores/{storeId}/affiliate-earnings | read |
| Record a payout to an affiliate | POST /organizations/{organizationId}/stores/{storeId}/affiliate-payouts | sensitive |
| Items an affiliate made | GET /organizations/{organizationId}/stores/{storeId}/affiliate-items | read |
| Approve or refuse an affiliate's item | POST /organizations/{organizationId}/stores/{storeId}/affiliate-items/{storeProductId}/review | sensitive |
Affiliate stores report
GET /organizations/{organizationId}/affiliates
Every AFFILIATE store: orders and sales (placed and fulfilled), what its affiliate earned and is owed (owedCents) and was paid, and items waiting for review. Read-only. Pay one with POST /stores/{storeId}/affiliate-payouts.
| Permission | reports.financial (Owner, Admin, Staff) |
| Risk | read, OAuth scope skuflow.read. Read: reads only. |
| MCP tool | affiliates_report (toolset stores) |
Example
curl "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/affiliates" \
-H "Authorization: Bearer $SKUFLOW_API_KEY"Response
200: the answer's fields
| Field | Type | Description |
|---|---|---|
items | array of object | |
items[].storeId | string | |
items[].name | string | |
items[].status | string | |
items[].customer | object or null | |
items[].customer.id | string | |
items[].customer.name | string | |
items[].orderCount | integer | |
items[].salesCents | integer | |
items[].owedCents | integer | |
items[].paidCents | integer | |
items[].pendingItems | integer | |
totals | object | |
totals.salesCents | integer | |
totals.owedCents | integer | |
totals.paidCents | integer |
An affiliate store's earnings
GET /organizations/{organizationId}/stores/{storeId}/affiliate-earnings
The store's earnings ledger (per order: a SALE when it is paid — selling price minus base price per piece — and a REVERSAL when it is cancelled, rejected or refunded), what is owed and paid, and the payouts recorded. Read-only.
| Permission | reports.financial (Owner, Admin, Staff) |
| Risk | read, OAuth scope skuflow.read. Read: reads only. |
| MCP tool | affiliates_earnings (toolset stores) |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
storeId | path | string | Yes | The store (GET /stores). |
Example
curl "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/stores/{storeId}/affiliate-earnings" \
-H "Authorization: Bearer $SKUFLOW_API_KEY"Response
200: the answer's fields
| Field | Type | Description |
|---|---|---|
summary | object | |
summary.owedCents | integer | Earned and not paid yet. |
summary.paidCents | integer | |
summary.totalCents | integer | |
earnings | array of object | |
earnings[].id | string | |
earnings[].storeOrderId | string | |
earnings[].orderIdentifier | string | |
earnings[].orderStatus | string | |
earnings[].kind | enum | One of SALE, REVERSAL. |
earnings[].status | enum | One of EARNED, PAID. |
earnings[].amountCents | integer | Signed: a REVERSAL is negative. |
earnings[].createdAt | string (date-time) | |
earnings[].payoutId | string or null | |
payouts | array of object | |
payouts[].id | string | |
payouts[].amountCents | integer | |
payouts[].paidOn | string | |
payouts[].method | string or null | |
payouts[].note | string or null | |
payouts[].createdAt | string (date-time) |
Record a payout to an affiliate
POST /organizations/{organizationId}/stores/{storeId}/affiliate-payouts
Money record: records that the business paid the store's affiliate what is owed (paid outside SKUFlow: SKUFlow moves no money, it takes no transfers) and marks every earning owed now PAID. Pass expectedCents (the owed amount you saw, GET …/affiliate-earnings) to be refused (409) when it changed. 409 when nothing is owed or the store is not an affiliate store.
| Permission | stores.payouts (Owner, Admin) |
| Risk | sensitive, OAuth scope skuflow.sensitive. Sensitive: moves money, deletes, sends or shows something to a customer, or grants or revokes access. |
| MCP tool | affiliates_recordPayout (toolset stores) |
| Approval | Waits for your approval in SKUFlow when called with an API key or a connected app: the first call answers 428 APPROVAL_REQUIRED; once you approve it, repeat the call with the X-SKUFlow-Approval header. See Approvals. |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
storeId | path | string | Yes | The store (GET /stores). |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
paidOn | string | No | When it was paid (default today). |
method | string or null | No | e.g. "Bank transfer". Up to 200 characters. |
note | string or null | No | Up to 1000 characters. |
expectedCents | integer or null | No |
Example
curl -X POST "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/stores/{storeId}/affiliate-payouts" \
-H "Authorization: Bearer $SKUFLOW_API_KEY" \
-H "Content-Type: application/json" \
-d '{"paidOn":"2026-11-03","method":"string","note":"string"}'Response
201: the answer's fields
| Field | Type | Description |
|---|---|---|
summary | object | |
summary.owedCents | integer | Earned and not paid yet. |
summary.paidCents | integer | |
summary.totalCents | integer | |
earnings | array of object | |
earnings[].id | string | |
earnings[].storeOrderId | string | |
earnings[].orderIdentifier | string | |
earnings[].orderStatus | string | |
earnings[].kind | enum | One of SALE, REVERSAL. |
earnings[].status | enum | One of EARNED, PAID. |
earnings[].amountCents | integer | Signed: a REVERSAL is negative. |
earnings[].createdAt | string (date-time) | |
earnings[].payoutId | string or null | |
payouts | array of object | |
payouts[].id | string | |
payouts[].amountCents | integer | |
payouts[].paidOn | string | |
payouts[].method | string or null | |
payouts[].note | string or null | |
payouts[].createdAt | string (date-time) | |
payout | object | |
payout.id | string |
Items an affiliate made
GET /organizations/{organizationId}/stores/{storeId}/affiliate-items
The items the store's managers made (newest first), optionally by review status (PENDING ones wait for the business's artwork check). Read-only.
| Permission | stores.read (Owner, Admin, Staff, Member) |
| Risk | read, OAuth scope skuflow.read. Read: reads only. |
| MCP tool | affiliates_items (toolset stores) |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
storeId | path | string | Yes | The store (GET /stores). |
status | query | enum | No | One of PENDING, APPROVED, REJECTED. |
Example
curl "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/stores/{storeId}/affiliate-items" \
-H "Authorization: Bearer $SKUFLOW_API_KEY"Response
200: the answer's fields
| Field | Type | Description |
|---|---|---|
items | array of object | |
items[].id | string | The store item (storeProductId). |
items[].name | string | |
items[].productName | string | |
items[].designId | string or null | |
items[].designName | string or null | |
items[].customerProductId | string or null | |
items[].reviewStatus | enum or null | One of PENDING, APPROVED, REJECTED. |
items[].reviewNote | string or null | |
items[].active | boolean | |
items[].fixedPriceCents | integer or null | The affiliate's selling price. |
items[].madeBy | object or null | |
items[].madeBy.email | string | |
items[].madeBy.name | string or null | |
items[].createdAt | string (date-time) |
Approve or refuse an affiliate's item
POST /organizations/{organizationId}/stores/{storeId}/affiliate-items/{storeProductId}/review
Customer-visible: approve true puts the item live (switched on in the store); false refuses it with a note for the affiliate (it stays off). Approving re-checks the selling price against the base price (409 when the base rose above it). Check the design's artwork first (GET /designs/{designId}).
| Permission | stores.manage (Owner, Admin, Staff) |
| Risk | sensitive, OAuth scope skuflow.sensitive. Sensitive: moves money, deletes, sends or shows something to a customer, or grants or revokes access. |
| MCP tool | affiliates_review (toolset stores) |
| Plan | Online stores: the Grow plan and up. |
| Approval | Over MCP, this tool asks for your OK first (in the AI app when it supports it, otherwise in SKUFlow). See Approvals. |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
storeId | path | string | Yes | The store (GET /stores). |
storeProductId | path | string | Yes | The item (GET …/affiliate-items). |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
approve | boolean | Yes | |
note | string or null | No | Why, for the affiliate. Up to 1000 characters. |
Example
curl -X POST "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/stores/{storeId}/affiliate-items/{storeProductId}/review" \
-H "Authorization: Bearer $SKUFLOW_API_KEY" \
-H "Content-Type: application/json" \
-d '{"approve":true}'Response
200: the answer's fields
| Field | Type | Description |
|---|---|---|
items | array of object | |
items[].id | string | The store item (storeProductId). |
items[].name | string | |
items[].productName | string | |
items[].designId | string or null | |
items[].designName | string or null | |
items[].customerProductId | string or null | |
items[].reviewStatus | enum or null | One of PENDING, APPROVED, REJECTED. |
items[].reviewNote | string or null | |
items[].active | boolean | |
items[].fixedPriceCents | integer or null | The affiliate's selling price. |
items[].madeBy | object or null | |
items[].madeBy.email | string | |
items[].madeBy.name | string or null | |
items[].createdAt | string (date-time) |
Suppliers API
REST endpoints for suppliers in SKUFlow: 14 operations with parameters, request and response fields, permissions and curl examples.
Customer products API
REST endpoints for customer products in SKUFlow: 7 operations with parameters, request and response fields, permissions and curl examples.