DevelopersAPI reference

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.

OperationEndpointRisk
Affiliate stores reportGET /organizations/{organizationId}/affiliatesread
An affiliate store's earningsGET /organizations/{organizationId}/stores/{storeId}/affiliate-earningsread
Record a payout to an affiliatePOST /organizations/{organizationId}/stores/{storeId}/affiliate-payoutssensitive
Items an affiliate madeGET /organizations/{organizationId}/stores/{storeId}/affiliate-itemsread
Approve or refuse an affiliate's itemPOST /organizations/{organizationId}/stores/{storeId}/affiliate-items/{storeProductId}/reviewsensitive

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.

Permissionreports.financial (Owner, Admin, Staff)
Riskread, OAuth scope skuflow.read. Read: reads only.
MCP toolaffiliates_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
FieldTypeDescription
itemsarray of object
items[].storeIdstring
items[].namestring
items[].statusstring
items[].customerobject or null
items[].customer.idstring
items[].customer.namestring
items[].orderCountinteger
items[].salesCentsinteger
items[].owedCentsinteger
items[].paidCentsinteger
items[].pendingItemsinteger
totalsobject
totals.salesCentsinteger
totals.owedCentsinteger
totals.paidCentsinteger

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.

Permissionreports.financial (Owner, Admin, Staff)
Riskread, OAuth scope skuflow.read. Read: reads only.
MCP toolaffiliates_earnings (toolset stores)

Parameters

NameInTypeRequiredDescription
storeIdpathstringYesThe 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
FieldTypeDescription
summaryobject
summary.owedCentsintegerEarned and not paid yet.
summary.paidCentsinteger
summary.totalCentsinteger
earningsarray of object
earnings[].idstring
earnings[].storeOrderIdstring
earnings[].orderIdentifierstring
earnings[].orderStatusstring
earnings[].kindenumOne of SALE, REVERSAL.
earnings[].statusenumOne of EARNED, PAID.
earnings[].amountCentsintegerSigned: a REVERSAL is negative.
earnings[].createdAtstring (date-time)
earnings[].payoutIdstring or null
payoutsarray of object
payouts[].idstring
payouts[].amountCentsinteger
payouts[].paidOnstring
payouts[].methodstring or null
payouts[].notestring or null
payouts[].createdAtstring (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.

Permissionstores.payouts (Owner, Admin)
Risksensitive, OAuth scope skuflow.sensitive. Sensitive: moves money, deletes, sends or shows something to a customer, or grants or revokes access.
MCP toolaffiliates_recordPayout (toolset stores)
ApprovalWaits 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

NameInTypeRequiredDescription
storeIdpathstringYesThe store (GET /stores).

Request body

FieldTypeRequiredDescription
paidOnstringNoWhen it was paid (default today).
methodstring or nullNoe.g. "Bank transfer". Up to 200 characters.
notestring or nullNoUp to 1000 characters.
expectedCentsinteger or nullNo

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
FieldTypeDescription
summaryobject
summary.owedCentsintegerEarned and not paid yet.
summary.paidCentsinteger
summary.totalCentsinteger
earningsarray of object
earnings[].idstring
earnings[].storeOrderIdstring
earnings[].orderIdentifierstring
earnings[].orderStatusstring
earnings[].kindenumOne of SALE, REVERSAL.
earnings[].statusenumOne of EARNED, PAID.
earnings[].amountCentsintegerSigned: a REVERSAL is negative.
earnings[].createdAtstring (date-time)
earnings[].payoutIdstring or null
payoutsarray of object
payouts[].idstring
payouts[].amountCentsinteger
payouts[].paidOnstring
payouts[].methodstring or null
payouts[].notestring or null
payouts[].createdAtstring (date-time)
payoutobject
payout.idstring

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.

Permissionstores.read (Owner, Admin, Staff, Member)
Riskread, OAuth scope skuflow.read. Read: reads only.
MCP toolaffiliates_items (toolset stores)

Parameters

NameInTypeRequiredDescription
storeIdpathstringYesThe store (GET /stores).
statusqueryenumNoOne 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
FieldTypeDescription
itemsarray of object
items[].idstringThe store item (storeProductId).
items[].namestring
items[].productNamestring
items[].designIdstring or null
items[].designNamestring or null
items[].customerProductIdstring or null
items[].reviewStatusenum or nullOne of PENDING, APPROVED, REJECTED.
items[].reviewNotestring or null
items[].activeboolean
items[].fixedPriceCentsinteger or nullThe affiliate's selling price.
items[].madeByobject or null
items[].madeBy.emailstring
items[].madeBy.namestring or null
items[].createdAtstring (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}).

Permissionstores.manage (Owner, Admin, Staff)
Risksensitive, OAuth scope skuflow.sensitive. Sensitive: moves money, deletes, sends or shows something to a customer, or grants or revokes access.
MCP toolaffiliates_review (toolset stores)
PlanOnline stores: the Grow plan and up.
ApprovalOver MCP, this tool asks for your OK first (in the AI app when it supports it, otherwise in SKUFlow). See Approvals.

Parameters

NameInTypeRequiredDescription
storeIdpathstringYesThe store (GET /stores).
storeProductIdpathstringYesThe item (GET …/affiliate-items).

Request body

FieldTypeRequiredDescription
approvebooleanYes
notestring or nullNoWhy, 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
FieldTypeDescription
itemsarray of object
items[].idstringThe store item (storeProductId).
items[].namestring
items[].productNamestring
items[].designIdstring or null
items[].designNamestring or null
items[].customerProductIdstring or null
items[].reviewStatusenum or nullOne of PENDING, APPROVED, REJECTED.
items[].reviewNotestring or null
items[].activeboolean
items[].fixedPriceCentsinteger or nullThe affiliate's selling price.
items[].madeByobject or null
items[].madeBy.emailstring
items[].madeBy.namestring or null
items[].createdAtstring (date-time)

On this page