Sherpo merchant API
Every operation acts on one store under /v1/stores/{store}, or on the business under /v1/merchants. Start with authentication; failures follow the errors guide.
account
GET/v1/merchants/{merchant}
Reads one business with its stores. Any token of a seat on the business.
| Parameter | In | ||
|---|---|---|---|
merchant | path | required |
200
Schema
{
"type": "object",
"properties": {
"plan": {
"anyOf": [
{
"type": "object",
"properties": {
"plan": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"tier": {
"type": "string",
"x-extensible-enum": [
"start",
"plus",
"ultra",
"lite",
"pro",
"enterprise"
]
},
"price_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"quantity": {
"type": "number"
},
"storage_bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"member_limit": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"active",
"past_due",
"cancelled"
]
},
"valid_from": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"valid_until": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"cancelled_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"source_kind": {
"type": "string",
"x-extensible-enum": [
"checkout",
"import",
"manual"
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"plan",
"name",
"tier",
"price_ref",
"quantity",
"storage_bytes",
"member_limit",
"status",
"valid_from",
"valid_until",
"cancelled_at",
"source_kind",
"updated_at"
]
},
{
"type": "null"
}
]
},
"legacy_billing": {
"description": "Legacy bills the business until cutover, so it opens stores without a plan of ours.",
"type": "boolean"
},
"has_customer": {
"description": "Whether the business is a customer at Stripe, so its billing portal can open.",
"type": "boolean"
},
"fee": {
"anyOf": [
{
"type": "object",
"properties": {
"rate_bps": {
"type": "number"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"rate_bps",
"updated_at"
]
},
{
"type": "null"
}
]
},
"connections": {
"type": "array",
"items": {
"type": "object",
"properties": {
"processor": {
"type": "string",
"x-extensible-enum": [
"stripe"
]
},
"external_ref": {
"type": "string"
},
"status": {
"type": "string",
"x-extensible-enum": [
"past_due",
"enabled",
"onboard",
"currently_due"
]
},
"enabled": {
"type": "boolean"
},
"held": {
"type": "boolean"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"processor",
"external_ref",
"status",
"enabled",
"held",
"updated_at"
]
}
},
"stores": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"locale": {
"type": "string"
},
"location": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"wnam",
"enam",
"sam",
"weur",
"eeur",
"apac",
"apac-ne",
"apac-se",
"oc",
"afr",
"me"
]
},
{
"type": "null"
}
]
},
"hostname": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"swatch": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"emerald",
"blue",
"teal",
"indigo",
"purple",
"pink",
"red",
"orange",
"yellow",
"gray"
]
},
{
"type": "null"
}
]
},
"icon": {
"type": "string"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"locale",
"location",
"hostname",
"swatch",
"icon",
"created_at"
]
}
},
"total": {
"type": "number"
},
"limit": {
"type": "number"
}
},
"required": [
"items",
"total",
"limit"
]
},
"members": {
"type": "object",
"properties": {
"total": {
"type": "number"
},
"limit": {
"type": "number"
}
},
"required": [
"total",
"limit"
]
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"short_name": {
"type": "string"
},
"email": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"swatch": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"emerald",
"blue",
"teal",
"indigo",
"purple",
"pink",
"red",
"orange",
"yellow",
"gray"
]
},
{
"type": "null"
}
]
},
"logo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"plan",
"legacy_billing",
"has_customer",
"fee",
"connections",
"stores",
"members",
"id",
"name",
"short_name",
"email",
"description",
"swatch",
"logo",
"created_at"
]
}affiliate
POST/v1/stores/{store}/affiliate_payouts
Records a payout made to an affiliate. Scope affiliate:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"anyOf": [
{
"type": "object",
"properties": {
"user": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"pattern": "^[A-Za-z]{3}$"
},
"commissions": {
"description": "The commissions settled; every unresolved one of the user's in the currency when absent.",
"type": "array",
"items": {
"type": "object",
"properties": {
"settlement": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
"order_item": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"required": [
"settlement",
"order_item"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 500
},
"kind": {
"type": "string",
"const": "paid"
},
"amount": {
"type": "integer",
"minimum": 0
},
"processor": {
"anyOf": [
{
"type": "string",
"const": "stripe"
},
{
"type": "null"
}
]
},
"processor_ref": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"reason": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 500
},
{
"type": "null"
}
]
}
},
"required": [
"user",
"currency",
"kind",
"amount"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"user": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"pattern": "^[A-Za-z]{3}$"
},
"commissions": {
"description": "The commissions settled; every unresolved one of the user's in the currency when absent.",
"type": "array",
"items": {
"type": "object",
"properties": {
"settlement": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
"order_item": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"required": [
"settlement",
"order_item"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 500
},
"kind": {
"type": "string",
"const": "void"
},
"reason": {
"type": "string",
"minLength": 1,
"maxLength": 500
}
},
"required": [
"user",
"currency",
"kind",
"reason"
],
"additionalProperties": false
}
],
"properties": {}
}201
Schema
{
"type": "object",
"properties": {
"commissions": {
"type": "number"
},
"id": {
"type": "string"
},
"user_id": {
"type": "string"
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"x-extensible-enum": [
"paid",
"void"
]
},
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"processor": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"stripe"
]
},
{
"type": "null"
}
]
},
"processor_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"reason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"occurred_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"recorded_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"commissions",
"id",
"user_id",
"currency",
"exponent",
"kind",
"amount",
"processor",
"processor_ref",
"reason",
"occurred_at",
"recorded_at"
]
}GET/v1/stores/{store}/affiliate_payouts
Pages the payouts recorded to affiliates. Scope affiliate:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | ||
direction | query | ||
limit | query | ||
cursor | query | ||
count | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"commissions": {
"type": "number"
},
"fees": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"user_id": {
"type": "string"
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"x-extensible-enum": [
"paid",
"void"
]
},
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"processor": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"stripe"
]
},
{
"type": "null"
}
]
},
"processor_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"reason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"occurred_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"recorded_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"user": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"type": "string"
},
"avatar": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"email",
"avatar"
]
},
{
"type": "null"
}
]
}
},
"required": [
"commissions",
"fees",
"id",
"user_id",
"currency",
"exponent",
"kind",
"amount",
"processor",
"processor_ref",
"reason",
"occurred_at",
"recorded_at",
"user"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}GET/v1/stores/{store}/commissions
Pages the commissions affiliates earned. Scope affiliate:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | ||
direction | query | ||
limit | query | ||
cursor | query | ||
count | query | ||
facets | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"settlement_id": {
"type": "string"
},
"order_item_id": {
"type": "string"
},
"user_id": {
"type": "string"
},
"discount_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"unpaid",
"paid",
"void"
]
},
"occurred_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sale": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"sale_currency": {
"type": "string"
},
"sale_exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"order": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"number": {
"type": "number"
}
},
"required": [
"id",
"number"
]
},
{
"type": "null"
}
]
},
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"code",
"name"
]
},
{
"type": "null"
}
]
},
"resolution": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"user_id": {
"type": "string"
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"x-extensible-enum": [
"paid",
"void"
]
},
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"processor": {
"anyOf": [
{
"type": "string",
"const": "stripe"
},
{
"type": "null"
}
]
},
"processor_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"reason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"occurred_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"recorded_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"user_id",
"currency",
"exponent",
"kind",
"amount",
"processor",
"processor_ref",
"reason",
"occurred_at",
"recorded_at"
]
},
{
"type": "null"
}
]
},
"user": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"type": "string"
},
"avatar": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"email",
"avatar"
]
},
{
"type": "null"
}
]
}
},
"required": [
"settlement_id",
"order_item_id",
"user_id",
"discount_id",
"currency",
"exponent",
"fee",
"status",
"occurred_at",
"sale",
"sale_currency",
"sale_exponent",
"order",
"product",
"discount",
"resolution",
"user"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}GET/v1/stores/{store}/commissions/stats
Reads commission totals over a period. Scope affiliate:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
from | query | ||
to | query | ||
bucket | query | ||
user | query | An id. | |
discount | query | An id. |
200
Schema
{
"type": "object",
"properties": {
"currencies": {
"type": "array",
"items": {
"type": "object",
"properties": {
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"earned": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"unpaid": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"paid": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"voided": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"commissions": {
"type": "number"
},
"range_earned": {
"anyOf": [
{
"type": "object",
"properties": {
"current": {
"type": "number"
},
"previous": {
"type": "number"
}
},
"required": [
"current",
"previous"
]
},
{
"type": "null"
}
]
},
"range_commissions": {
"type": "object",
"properties": {
"current": {
"type": "number"
},
"previous": {
"type": "number"
}
},
"required": [
"current",
"previous"
]
},
"series": {
"type": "array",
"items": {
"type": "object",
"properties": {
"start": {
"type": "string"
},
"end": {
"type": "string"
},
"earned": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"commissions": {
"type": "number"
},
"previous_earned": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"previous_commissions": {
"type": "number"
}
},
"required": [
"start",
"end",
"earned",
"commissions",
"previous_earned",
"previous_commissions"
]
}
}
},
"required": [
"currency",
"exponent",
"earned",
"unpaid",
"paid",
"voided",
"commissions",
"range_earned",
"range_commissions",
"series"
]
}
},
"bucket": {
"type": "string",
"x-extensible-enum": [
"day",
"week",
"month"
]
},
"time_zone": {
"type": "string"
},
"from": {
"type": "string"
},
"to": {
"type": "string"
},
"previous_range": {
"type": "object",
"properties": {
"from": {
"type": "string"
},
"to": {
"type": "string"
}
},
"required": [
"from",
"to"
]
}
},
"required": [
"currencies",
"bucket",
"time_zone",
"from",
"to",
"previous_range"
]
}GET/v1/stores/{store}/affiliates
Pages the store's affiliates by discount. Scope affiliate:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | ||
direction | query | ||
limit | query | ||
cursor | query | ||
count | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"earnings": {
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"properties": {
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"earned": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"unpaid": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"paid": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"commissions": {
"description": "How many earned it, voids left out, and how many are owed; counted to any reader.",
"type": "number"
},
"unpaid_commissions": {
"type": "number"
}
},
"required": [
"currency",
"exponent",
"earned",
"unpaid",
"paid",
"commissions",
"unpaid_commissions"
]
}
},
{
"type": "null"
}
]
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"code",
"name"
]
},
{
"type": "null"
}
]
},
"user_id": {
"type": "string"
},
"amount_earned": {
"type": "number"
},
"percent_earned": {
"type": "number"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"discount_id": {
"type": "string"
},
"user": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"type": "string"
},
"avatar": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"email",
"avatar"
]
},
{
"type": "null"
}
]
}
},
"required": [
"earnings",
"discount",
"user_id",
"amount_earned",
"percent_earned",
"updated_at",
"discount_id",
"user"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}PUT/v1/stores/{store}/discounts/{discount}/affiliates
Makes a user an affiliate of a discount, with their commission. Scope affiliate:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
discount | path | required |
Body
Schema
{
"type": "object",
"properties": {
"user": {
"description": "By email, or by the id of a user already an affiliate in the store.",
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"email": {
"type": "string",
"minLength": 1,
"maxLength": 254,
"pattern": "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"
}
},
"required": [
"email"
],
"additionalProperties": false
}
]
},
"amount_earned": {
"type": "integer",
"minimum": 0
},
"percent_earned": {
"type": "integer",
"minimum": 0,
"maximum": 10000
}
},
"required": [
"user"
],
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"scheduled",
"archived",
"active",
"off",
"expired"
]
},
"id": {
"type": "string"
},
"priority": {
"type": "number"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"currency": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"applies": {
"type": "string",
"x-extensible-enum": [
"automatically",
"by_code",
"never"
]
},
"amount_off": {
"type": "number"
},
"percent_off": {
"type": "number"
},
"floor_amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"cap_amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"floor_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"supply_total": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"supply_consumed": {
"type": "number"
},
"supply_per_customer": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"starts_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ends_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"archived_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"customers": {
"type": "array",
"items": {
"type": "string"
}
},
"scopes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"tier",
"store",
"price"
]
},
"product_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"price_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"product_id",
"tier_id",
"price_id"
]
}
},
"usage": {
"type": "object",
"properties": {
"customers": {
"type": "number"
},
"uses": {
"type": "number"
}
},
"required": [
"customers",
"uses"
]
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"affiliates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"earnings": {
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"properties": {
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"earned": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"unpaid": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"paid": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"commissions": {
"description": "How many earned it, voids left out, and how many are owed; counted to any reader.",
"type": "number"
},
"unpaid_commissions": {
"type": "number"
}
},
"required": [
"currency",
"exponent",
"earned",
"unpaid",
"paid",
"commissions",
"unpaid_commissions"
]
}
},
{
"type": "null"
}
]
},
"user_id": {
"type": "string"
},
"amount_earned": {
"type": "number"
},
"percent_earned": {
"type": "number"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"user": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"type": "string"
},
"avatar": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"email",
"avatar"
]
},
{
"type": "null"
}
]
}
},
"required": [
"earnings",
"user_id",
"amount_earned",
"percent_earned",
"updated_at",
"user"
]
}
}
},
"required": [
"name",
"status",
"id",
"priority",
"created_at",
"currency",
"code",
"applies",
"amount_off",
"percent_off",
"floor_amount",
"cap_amount",
"floor_percent",
"supply_total",
"supply_consumed",
"supply_per_customer",
"starts_at",
"ends_at",
"archived_at",
"customers",
"scopes",
"usage",
"exponent",
"affiliates"
]
}POST/v1/stores/{store}/discounts/{discount}/affiliates/remove
Removes an affiliate from a discount. Scope affiliate:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
discount | path | required |
Body
Schema
{
"type": "object",
"properties": {
"user": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"required": [
"user"
],
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"scheduled",
"archived",
"active",
"off",
"expired"
]
},
"id": {
"type": "string"
},
"priority": {
"type": "number"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"currency": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"applies": {
"type": "string",
"x-extensible-enum": [
"automatically",
"by_code",
"never"
]
},
"amount_off": {
"type": "number"
},
"percent_off": {
"type": "number"
},
"floor_amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"cap_amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"floor_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"supply_total": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"supply_consumed": {
"type": "number"
},
"supply_per_customer": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"starts_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ends_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"archived_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"customers": {
"type": "array",
"items": {
"type": "string"
}
},
"scopes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"tier",
"store",
"price"
]
},
"product_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"price_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"product_id",
"tier_id",
"price_id"
]
}
},
"usage": {
"type": "object",
"properties": {
"customers": {
"type": "number"
},
"uses": {
"type": "number"
}
},
"required": [
"customers",
"uses"
]
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"affiliates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"earnings": {
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"properties": {
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"earned": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"unpaid": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"paid": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"commissions": {
"description": "How many earned it, voids left out, and how many are owed; counted to any reader.",
"type": "number"
},
"unpaid_commissions": {
"type": "number"
}
},
"required": [
"currency",
"exponent",
"earned",
"unpaid",
"paid",
"commissions",
"unpaid_commissions"
]
}
},
{
"type": "null"
}
]
},
"user_id": {
"type": "string"
},
"amount_earned": {
"type": "number"
},
"percent_earned": {
"type": "number"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"user": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"type": "string"
},
"avatar": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"email",
"avatar"
]
},
{
"type": "null"
}
]
}
},
"required": [
"earnings",
"user_id",
"amount_earned",
"percent_earned",
"updated_at",
"user"
]
}
}
},
"required": [
"name",
"status",
"id",
"priority",
"created_at",
"currency",
"code",
"applies",
"amount_off",
"percent_off",
"floor_amount",
"cap_amount",
"floor_percent",
"supply_total",
"supply_consumed",
"supply_per_customer",
"starts_at",
"ends_at",
"archived_at",
"customers",
"scopes",
"usage",
"exponent",
"affiliates"
]
}automation
GET/v1/stores/{store}/automations
Pages the store's automations. Scope automation:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | ||
direction | query | ||
limit | query | ||
cursor | query | ||
count | query | ||
search | query | ||
facets | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"trigger": {
"anyOf": [
{
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"const": "product.reviewed"
},
"product_id": {
"type": "string"
},
"min_rating": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
}
},
"required": [
"product",
"kind",
"product_id",
"min_rating"
]
},
{
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"const": "product.purchased"
},
"product_id": {
"type": "string"
},
"price_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"discount_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"product",
"kind",
"product_id",
"price_id",
"discount_id"
]
}
]
},
"action": {
"anyOf": [
{
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"const": "product.unlock"
},
"product_id": {
"type": "string"
}
},
"required": [
"product",
"kind",
"product_id"
]
},
{
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"const": "price.adjust"
},
"price_id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"fixed_cents": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"variable_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"window": {
"anyOf": [
{
"type": "object",
"properties": {
"starts_at": {
"type": "string"
},
"ends_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"starts_at",
"ends_at"
]
},
{
"type": "null"
}
]
}
},
"required": [
"product",
"kind",
"price_id",
"product_id",
"fixed_cents",
"variable_percent",
"window"
]
}
]
},
"ended": {
"type": "boolean"
},
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"paused_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"trigger",
"action",
"ended",
"id",
"name",
"paused_at",
"created_at"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}POST/v1/stores/{store}/automations
Creates an automation. Scope automation:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"name": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"trigger": {
"anyOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "product.purchased"
},
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"slug": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"slug"
],
"additionalProperties": false
}
]
},
"price": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"kind",
"product"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "product.reviewed"
},
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"slug": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"slug"
],
"additionalProperties": false
}
]
},
"min_rating": {
"anyOf": [
{
"type": "integer",
"minimum": 1,
"maximum": 5
},
{
"type": "null"
}
]
}
},
"required": [
"kind",
"product"
],
"additionalProperties": false
}
]
},
"action": {
"anyOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "product.unlock"
},
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"slug": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"slug"
],
"additionalProperties": false
}
]
}
},
"required": [
"kind",
"product"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "price.adjust"
},
"price": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
"fixed_cents": {
"type": "integer",
"minimum": 0
},
"variable_percent": {
"type": "integer",
"minimum": 0,
"maximum": 100
},
"window": {
"anyOf": [
{
"type": "object",
"properties": {
"starts_at": {
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2}))?$"
},
"ends_at": {
"anyOf": [
{
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2}))?$"
},
{
"type": "null"
}
]
}
},
"required": [
"starts_at"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"kind",
"price"
],
"additionalProperties": false
}
]
}
},
"required": [
"trigger",
"action"
],
"additionalProperties": false
}201
Schema
{
"type": "object",
"properties": {
"trigger": {
"anyOf": [
{
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"const": "product.reviewed"
},
"product_id": {
"type": "string"
},
"min_rating": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
}
},
"required": [
"product",
"kind",
"product_id",
"min_rating"
]
},
{
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"const": "product.purchased"
},
"product_id": {
"type": "string"
},
"price_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"discount_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"product",
"kind",
"product_id",
"price_id",
"discount_id"
]
}
]
},
"action": {
"anyOf": [
{
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"const": "product.unlock"
},
"product_id": {
"type": "string"
}
},
"required": [
"product",
"kind",
"product_id"
]
},
{
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"const": "price.adjust"
},
"price_id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"fixed_cents": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"variable_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"window": {
"anyOf": [
{
"type": "object",
"properties": {
"starts_at": {
"type": "string"
},
"ends_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"starts_at",
"ends_at"
]
},
{
"type": "null"
}
]
}
},
"required": [
"product",
"kind",
"price_id",
"product_id",
"fixed_cents",
"variable_percent",
"window"
]
}
]
},
"ended": {
"type": "boolean"
},
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"paused_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"trigger",
"action",
"ended",
"id",
"name",
"paused_at",
"created_at"
]
}GET/v1/stores/{store}/automation_runs
Pages the runs of automations. Scope automation:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | ||
direction | query | ||
limit | query | ||
cursor | query | ||
count | query | ||
facets | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"customer": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"erased": {
"type": "boolean"
}
},
"required": [
"id",
"name",
"email",
"phone",
"erased"
]
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"const": "pending"
},
"result": {
"type": "null"
},
"reason": {
"type": "null"
},
"finished_at": {
"type": "null"
},
"id": {
"type": "string"
},
"automation_id": {
"type": "string"
},
"trigger": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product.purchased",
"product.reviewed"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"customer_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"occurred_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"customer",
"status",
"result",
"reason",
"finished_at",
"id",
"automation_id",
"trigger",
"customer_id",
"occurred_at"
]
},
{
"type": "object",
"properties": {
"customer": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"erased": {
"type": "boolean"
}
},
"required": [
"id",
"name",
"email",
"phone",
"erased"
]
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"const": "succeeded"
},
"result": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"discount",
"grant"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"reason": {
"type": "null"
},
"finished_at": {
"type": "string"
},
"id": {
"type": "string"
},
"automation_id": {
"type": "string"
},
"trigger": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product.purchased",
"product.reviewed"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"customer_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"occurred_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"customer",
"status",
"result",
"reason",
"finished_at",
"id",
"automation_id",
"trigger",
"customer_id",
"occurred_at"
]
},
{
"type": "object",
"properties": {
"customer": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"erased": {
"type": "boolean"
}
},
"required": [
"id",
"name",
"email",
"phone",
"erased"
]
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"const": "skipped"
},
"result": {
"type": "null"
},
"reason": {
"type": "string",
"x-extensible-enum": [
"paused",
"rule changed",
"customer gone",
"trigger gone",
"trigger changed",
"product gone",
"category unknown",
"product is repeatable",
"already entitled",
"price gone",
"takes nothing off",
"window over"
]
},
"finished_at": {
"type": "string"
},
"id": {
"type": "string"
},
"automation_id": {
"type": "string"
},
"trigger": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product.purchased",
"product.reviewed"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"customer_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"occurred_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"customer",
"status",
"result",
"reason",
"finished_at",
"id",
"automation_id",
"trigger",
"customer_id",
"occurred_at"
]
},
{
"type": "object",
"properties": {
"customer": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"erased": {
"type": "boolean"
}
},
"required": [
"id",
"name",
"email",
"phone",
"erased"
]
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"const": "failed"
},
"result": {
"type": "null"
},
"reason": {
"type": "string",
"const": "error"
},
"finished_at": {
"type": "string"
},
"id": {
"type": "string"
},
"automation_id": {
"type": "string"
},
"trigger": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product.purchased",
"product.reviewed"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"customer_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"occurred_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"customer",
"status",
"result",
"reason",
"finished_at",
"id",
"automation_id",
"trigger",
"customer_id",
"occurred_at"
]
},
{
"type": "object",
"properties": {
"customer": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"erased": {
"type": "boolean"
}
},
"required": [
"id",
"name",
"email",
"phone",
"erased"
]
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"const": "imported"
},
"result": {
"type": "null"
},
"reason": {
"type": "null"
},
"finished_at": {
"type": "string"
},
"id": {
"type": "string"
},
"automation_id": {
"type": "string"
},
"trigger": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product.purchased",
"product.reviewed"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"customer_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"occurred_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"customer",
"status",
"result",
"reason",
"finished_at",
"id",
"automation_id",
"trigger",
"customer_id",
"occurred_at"
]
}
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}GET/v1/stores/{store}/automations/{automation}
Reads one automation. Scope automation:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
automation | path | required |
200
Schema
{
"type": "object",
"properties": {
"trigger": {
"anyOf": [
{
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"const": "product.reviewed"
},
"product_id": {
"type": "string"
},
"min_rating": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
}
},
"required": [
"product",
"kind",
"product_id",
"min_rating"
]
},
{
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"const": "product.purchased"
},
"product_id": {
"type": "string"
},
"price_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"discount_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"product",
"kind",
"product_id",
"price_id",
"discount_id"
]
}
]
},
"action": {
"anyOf": [
{
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"const": "product.unlock"
},
"product_id": {
"type": "string"
}
},
"required": [
"product",
"kind",
"product_id"
]
},
{
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"const": "price.adjust"
},
"price_id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"fixed_cents": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"variable_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"window": {
"anyOf": [
{
"type": "object",
"properties": {
"starts_at": {
"type": "string"
},
"ends_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"starts_at",
"ends_at"
]
},
{
"type": "null"
}
]
}
},
"required": [
"product",
"kind",
"price_id",
"product_id",
"fixed_cents",
"variable_percent",
"window"
]
}
]
},
"ended": {
"type": "boolean"
},
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"paused_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"trigger",
"action",
"ended",
"id",
"name",
"paused_at",
"created_at"
]
}PATCH/v1/stores/{store}/automations/{automation}
Updates an automation's trigger and action. Scope automation:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
automation | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"name": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"trigger": {
"anyOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "product.purchased"
},
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"slug": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"slug"
],
"additionalProperties": false
}
]
},
"price": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"kind",
"product"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "product.reviewed"
},
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"slug": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"slug"
],
"additionalProperties": false
}
]
},
"min_rating": {
"anyOf": [
{
"type": "integer",
"minimum": 1,
"maximum": 5
},
{
"type": "null"
}
]
}
},
"required": [
"kind",
"product"
],
"additionalProperties": false
}
]
},
"action": {
"anyOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "product.unlock"
},
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"slug": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"slug"
],
"additionalProperties": false
}
]
}
},
"required": [
"kind",
"product"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "price.adjust"
},
"price": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
"fixed_cents": {
"type": "integer",
"minimum": 0
},
"variable_percent": {
"type": "integer",
"minimum": 0,
"maximum": 100
},
"window": {
"anyOf": [
{
"type": "object",
"properties": {
"starts_at": {
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2}))?$"
},
"ends_at": {
"anyOf": [
{
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2}))?$"
},
{
"type": "null"
}
]
}
},
"required": [
"starts_at"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"kind",
"price"
],
"additionalProperties": false
}
]
}
},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"trigger": {
"anyOf": [
{
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"const": "product.reviewed"
},
"product_id": {
"type": "string"
},
"min_rating": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
}
},
"required": [
"product",
"kind",
"product_id",
"min_rating"
]
},
{
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"const": "product.purchased"
},
"product_id": {
"type": "string"
},
"price_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"discount_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"product",
"kind",
"product_id",
"price_id",
"discount_id"
]
}
]
},
"action": {
"anyOf": [
{
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"const": "product.unlock"
},
"product_id": {
"type": "string"
}
},
"required": [
"product",
"kind",
"product_id"
]
},
{
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"const": "price.adjust"
},
"price_id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"fixed_cents": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"variable_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"window": {
"anyOf": [
{
"type": "object",
"properties": {
"starts_at": {
"type": "string"
},
"ends_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"starts_at",
"ends_at"
]
},
{
"type": "null"
}
]
}
},
"required": [
"product",
"kind",
"price_id",
"product_id",
"fixed_cents",
"variable_percent",
"window"
]
}
]
},
"ended": {
"type": "boolean"
},
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"paused_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"trigger",
"action",
"ended",
"id",
"name",
"paused_at",
"created_at"
]
}DELETE/v1/stores/{store}/automations/{automation}
Deletes an automation. Scope automation:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
automation | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
200
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"deleted": {
"type": "boolean",
"const": true
}
},
"required": [
"id",
"deleted"
]
}POST/v1/stores/{store}/automations/{automation}/pause
Pauses an automation. Scope automation:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
automation | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"trigger": {
"anyOf": [
{
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"const": "product.reviewed"
},
"product_id": {
"type": "string"
},
"min_rating": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
}
},
"required": [
"product",
"kind",
"product_id",
"min_rating"
]
},
{
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"const": "product.purchased"
},
"product_id": {
"type": "string"
},
"price_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"discount_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"product",
"kind",
"product_id",
"price_id",
"discount_id"
]
}
]
},
"action": {
"anyOf": [
{
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"const": "product.unlock"
},
"product_id": {
"type": "string"
}
},
"required": [
"product",
"kind",
"product_id"
]
},
{
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"const": "price.adjust"
},
"price_id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"fixed_cents": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"variable_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"window": {
"anyOf": [
{
"type": "object",
"properties": {
"starts_at": {
"type": "string"
},
"ends_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"starts_at",
"ends_at"
]
},
{
"type": "null"
}
]
}
},
"required": [
"product",
"kind",
"price_id",
"product_id",
"fixed_cents",
"variable_percent",
"window"
]
}
]
},
"ended": {
"type": "boolean"
},
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"paused_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"trigger",
"action",
"ended",
"id",
"name",
"paused_at",
"created_at"
]
}POST/v1/stores/{store}/automations/{automation}/resume
Resumes a paused automation. Scope automation:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
automation | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"trigger": {
"anyOf": [
{
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"const": "product.reviewed"
},
"product_id": {
"type": "string"
},
"min_rating": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
}
},
"required": [
"product",
"kind",
"product_id",
"min_rating"
]
},
{
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"const": "product.purchased"
},
"product_id": {
"type": "string"
},
"price_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"discount_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"product",
"kind",
"product_id",
"price_id",
"discount_id"
]
}
]
},
"action": {
"anyOf": [
{
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"const": "product.unlock"
},
"product_id": {
"type": "string"
}
},
"required": [
"product",
"kind",
"product_id"
]
},
{
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"const": "price.adjust"
},
"price_id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"fixed_cents": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"variable_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"window": {
"anyOf": [
{
"type": "object",
"properties": {
"starts_at": {
"type": "string"
},
"ends_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"starts_at",
"ends_at"
]
},
{
"type": "null"
}
]
}
},
"required": [
"product",
"kind",
"price_id",
"product_id",
"fixed_cents",
"variable_percent",
"window"
]
}
]
},
"ended": {
"type": "boolean"
},
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"paused_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"trigger",
"action",
"ended",
"id",
"name",
"paused_at",
"created_at"
]
}certificate
GET/v1/stores/{store}/certificates
Pages the store's certificates. Scope certificate:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | query | An id, or slug:<slug>. | |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | ||
direction | query | ||
limit | query | ||
cursor | query | ||
count | query | ||
search | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"logo": {
"anyOf": [
{
"type": "object",
"properties": {
"attachment_id": {
"type": "string"
},
"asset_id": {
"type": "string"
}
},
"required": [
"attachment_id",
"asset_id"
]
},
{
"type": "null"
}
]
},
"issued": {
"type": "number"
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"quiz_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"headline_copy": {
"type": "string"
},
"title_copy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"awarded_copy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"reason_copy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"score_copy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"out_of_score_copy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"template": {
"type": "string",
"x-extensible-enum": [
"classic",
"framed"
]
},
"accent": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"emerald",
"blue",
"teal",
"indigo",
"purple",
"pink",
"red",
"orange",
"yellow",
"gray"
]
},
{
"type": "null"
}
]
},
"requires_passing": {
"description": "Earned by passing the quiz, not by merely finishing it.",
"type": "boolean"
},
"earned_on": {
"description": "Set on a certificate no quiz awards, so finishing every entry earns it; losing its quiz never makes one.",
"type": "string",
"x-extensible-enum": [
"completion"
]
},
"shows": {
"type": "array",
"items": {
"type": "string",
"x-extensible-enum": [
"date",
"score",
"qr_code"
]
}
}
},
"required": [
"template",
"accent"
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"logo",
"issued",
"id",
"product_id",
"quiz_id",
"headline_copy",
"title_copy",
"awarded_copy",
"reason_copy",
"score_copy",
"out_of_score_copy",
"settings",
"created_at"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}GET/v1/stores/{store}/certificate_issues
Pages the certificates issued to customers. Scope certificate:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | ||
direction | query | ||
limit | query | ||
cursor | query | ||
count | query | ||
search | query | ||
facets | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"customer": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"erased": {
"type": "boolean"
}
},
"required": [
"id",
"name",
"email",
"phone",
"erased"
]
},
{
"type": "null"
}
]
},
"certificate": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"headline": {
"type": "string"
}
},
"required": [
"id",
"title",
"headline"
]
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"certificate_id": {
"type": "string"
},
"customer_id": {
"type": "string"
},
"score": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"attempt": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"issued_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"customer",
"certificate",
"id",
"certificate_id",
"customer_id",
"score",
"attempt",
"issued_at",
"revoked_at"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}GET/v1/stores/{store}/products/{product}/certificates/stats
Reads a product's certificate issues over a period. Scope certificate:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
from | query | ||
to | query |
200
Schema
{
"type": "object",
"properties": {
"certificates": {
"type": "number"
},
"total": {
"type": "number"
},
"by_status": {
"type": "object",
"properties": {
"live": {
"type": "number"
},
"revoked": {
"type": "number"
}
},
"required": [
"live",
"revoked"
]
},
"issued": {
"type": "object",
"properties": {
"current": {
"type": "number"
},
"previous": {
"type": "number"
}
},
"required": [
"current",
"previous"
]
},
"time_zone": {
"type": "string"
},
"from": {
"type": "string"
},
"to": {
"type": "string"
},
"previous_range": {
"type": "object",
"properties": {
"from": {
"type": "string"
},
"to": {
"type": "string"
}
},
"required": [
"from",
"to"
]
}
},
"required": [
"certificates",
"total",
"by_status",
"issued",
"time_zone",
"from",
"to",
"previous_range"
]
}POST/v1/stores/{store}/certificates/{certificate}/issue
Issues a certificate to a customer. Scope certificate:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
certificate | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"customer": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
"score": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "null"
}
]
}
},
"required": [
"customer"
],
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"customer": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"erased": {
"type": "boolean"
}
},
"required": [
"id",
"name",
"email",
"phone",
"erased"
]
},
{
"type": "null"
}
]
},
"certificate": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"headline": {
"type": "string"
}
},
"required": [
"id",
"title",
"headline"
]
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"certificate_id": {
"type": "string"
},
"customer_id": {
"type": "string"
},
"score": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"attempt": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"issued_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"customer",
"certificate",
"id",
"certificate_id",
"customer_id",
"score",
"attempt",
"issued_at",
"revoked_at"
]
}POST/v1/stores/{store}/products/{product}/certificates
Creates a certificate for a product. Scope certificate:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"quiz": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"headline_copy": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"title_copy": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 500
},
{
"type": "null"
}
]
},
"awarded_copy": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 500
},
{
"type": "null"
}
]
},
"reason_copy": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 500
},
{
"type": "null"
}
]
},
"score_copy": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 500
},
{
"type": "null"
}
]
},
"out_of_score_copy": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 500
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"requires_passing": {
"type": "boolean"
},
"earned_on": {
"anyOf": [
{
"type": "string",
"const": "completion"
},
{
"type": "null"
}
]
},
"shows": {
"type": "array",
"items": {
"type": "string",
"enum": [
"date",
"score",
"qr_code"
]
},
"maxItems": 3
},
"template": {
"type": "string",
"enum": [
"classic",
"framed"
]
},
"accent": {
"description": "Null clears it, so it prints in the store's color.",
"anyOf": [
{
"type": "string",
"enum": [
"emerald",
"blue",
"teal",
"indigo",
"purple",
"pink",
"red",
"orange",
"yellow",
"gray"
]
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}
},
"required": [
"headline_copy"
],
"additionalProperties": false
}201
Schema
{
"type": "object",
"properties": {
"logo": {
"anyOf": [
{
"type": "object",
"properties": {
"attachment_id": {
"type": "string"
},
"asset_id": {
"type": "string"
}
},
"required": [
"attachment_id",
"asset_id"
]
},
{
"type": "null"
}
]
},
"issued": {
"type": "number"
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"quiz_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"headline_copy": {
"type": "string"
},
"title_copy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"awarded_copy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"reason_copy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"score_copy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"out_of_score_copy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"template": {
"type": "string",
"x-extensible-enum": [
"classic",
"framed"
]
},
"accent": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"emerald",
"blue",
"teal",
"indigo",
"purple",
"pink",
"red",
"orange",
"yellow",
"gray"
]
},
{
"type": "null"
}
]
},
"requires_passing": {
"description": "Earned by passing the quiz, not by merely finishing it.",
"type": "boolean"
},
"earned_on": {
"description": "Set on a certificate no quiz awards, so finishing every entry earns it; losing its quiz never makes one.",
"type": "string",
"x-extensible-enum": [
"completion"
]
},
"shows": {
"type": "array",
"items": {
"type": "string",
"x-extensible-enum": [
"date",
"score",
"qr_code"
]
}
}
},
"required": [
"template",
"accent"
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"logo",
"issued",
"id",
"product_id",
"quiz_id",
"headline_copy",
"title_copy",
"awarded_copy",
"reason_copy",
"score_copy",
"out_of_score_copy",
"settings",
"created_at"
]
}PATCH/v1/stores/{store}/certificates/{certificate}
Updates a certificate's design and copy. Scope certificate:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
certificate | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"settings": {
"type": "object",
"properties": {
"requires_passing": {
"type": "boolean"
},
"earned_on": {
"anyOf": [
{
"type": "string",
"const": "completion"
},
{
"type": "null"
}
]
},
"shows": {
"type": "array",
"items": {
"type": "string",
"enum": [
"date",
"score",
"qr_code"
]
},
"maxItems": 3
},
"template": {
"type": "string",
"enum": [
"classic",
"framed"
]
},
"accent": {
"description": "Null clears it, so it prints in the store's color.",
"anyOf": [
{
"type": "string",
"enum": [
"emerald",
"blue",
"teal",
"indigo",
"purple",
"pink",
"red",
"orange",
"yellow",
"gray"
]
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"headline_copy": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"title_copy": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 500
},
{
"type": "null"
}
]
},
"quiz": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"awarded_copy": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 500
},
{
"type": "null"
}
]
},
"reason_copy": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 500
},
{
"type": "null"
}
]
},
"score_copy": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 500
},
{
"type": "null"
}
]
},
"out_of_score_copy": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 500
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"logo": {
"anyOf": [
{
"type": "object",
"properties": {
"attachment_id": {
"type": "string"
},
"asset_id": {
"type": "string"
}
},
"required": [
"attachment_id",
"asset_id"
]
},
{
"type": "null"
}
]
},
"issued": {
"type": "number"
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"quiz_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"headline_copy": {
"type": "string"
},
"title_copy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"awarded_copy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"reason_copy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"score_copy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"out_of_score_copy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"template": {
"type": "string",
"x-extensible-enum": [
"classic",
"framed"
]
},
"accent": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"emerald",
"blue",
"teal",
"indigo",
"purple",
"pink",
"red",
"orange",
"yellow",
"gray"
]
},
{
"type": "null"
}
]
},
"requires_passing": {
"description": "Earned by passing the quiz, not by merely finishing it.",
"type": "boolean"
},
"earned_on": {
"description": "Set on a certificate no quiz awards, so finishing every entry earns it; losing its quiz never makes one.",
"type": "string",
"x-extensible-enum": [
"completion"
]
},
"shows": {
"type": "array",
"items": {
"type": "string",
"x-extensible-enum": [
"date",
"score",
"qr_code"
]
}
}
},
"required": [
"template",
"accent"
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"logo",
"issued",
"id",
"product_id",
"quiz_id",
"headline_copy",
"title_copy",
"awarded_copy",
"reason_copy",
"score_copy",
"out_of_score_copy",
"settings",
"created_at"
]
}DELETE/v1/stores/{store}/certificates/{certificate}
Deletes a certificate never issued. Scope certificate:delete.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
certificate | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
200
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"deleted": {
"type": "boolean",
"const": true
}
},
"required": [
"id",
"deleted"
]
}POST/v1/stores/{store}/certificate_issues/{issue}/revoke
Revokes an issued certificate. Scope certificate:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
issue | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"certificate_id": {
"type": "string"
},
"customer_id": {
"type": "string"
},
"score": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"attempt": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"issued_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"certificate_id",
"customer_id",
"score",
"attempt",
"issued_at",
"revoked_at"
]
}customer
GET/v1/stores/{store}/customers/stats
Reads the store's customer stats over a period. Scope customer:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
from | query | ||
to | query | ||
bucket | query |
200
Schema
{
"type": "object",
"properties": {
"customers": {
"type": "object",
"properties": {
"total": {
"type": "number"
},
"erased": {
"type": "number"
}
},
"required": [
"total",
"erased"
]
},
"new_customers": {
"type": "object",
"properties": {
"current": {
"type": "number"
},
"previous": {
"type": "number"
}
},
"required": [
"current",
"previous"
]
},
"returning": {
"type": "object",
"properties": {
"current": {
"type": "object",
"properties": {
"customers": {
"type": "number"
},
"ordered": {
"type": "number"
}
},
"required": [
"customers",
"ordered"
]
},
"previous": {
"type": "object",
"properties": {
"customers": {
"type": "number"
},
"ordered": {
"type": "number"
}
},
"required": [
"customers",
"ordered"
]
}
},
"required": [
"current",
"previous"
]
},
"spent": {
"type": "array",
"items": {
"type": "object",
"properties": {
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"amount": {
"anyOf": [
{
"type": "object",
"properties": {
"current": {
"type": "number"
},
"previous": {
"type": "number"
}
},
"required": [
"current",
"previous"
]
},
{
"type": "null"
}
]
},
"gross": {
"anyOf": [
{
"type": "object",
"properties": {
"current": {
"type": "number"
},
"previous": {
"type": "number"
}
},
"required": [
"current",
"previous"
]
},
{
"type": "null"
}
]
},
"refunded": {
"anyOf": [
{
"type": "object",
"properties": {
"current": {
"type": "number"
},
"previous": {
"type": "number"
}
},
"required": [
"current",
"previous"
]
},
{
"type": "null"
}
]
}
},
"required": [
"currency",
"exponent",
"amount",
"gross",
"refunded"
]
}
},
"all_time": {
"type": "object",
"properties": {
"orders": {
"type": "number"
},
"returning": {
"type": "number"
},
"spent": {
"type": "array",
"items": {
"type": "object",
"properties": {
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"orders": {
"type": "number"
},
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"gross": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"refunded": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"average": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
}
},
"required": [
"currency",
"exponent",
"orders",
"amount",
"gross",
"refunded",
"average"
]
}
}
},
"required": [
"orders",
"returning",
"spent"
]
},
"by_country": {
"type": "array",
"items": {
"type": "object",
"properties": {
"orders": {
"type": "number"
},
"currencies": {
"type": "array",
"items": {
"type": "object",
"properties": {
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"orders": {
"type": "number"
},
"sales": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"average": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
}
},
"required": [
"currency",
"exponent",
"orders",
"sales",
"average"
]
}
},
"country": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"customers": {
"type": "number"
}
},
"required": [
"orders",
"currencies",
"country",
"customers"
]
}
},
"series": {
"type": "array",
"items": {
"type": "object",
"properties": {
"start": {
"type": "string"
},
"end": {
"type": "string"
},
"customers": {
"type": "number"
},
"previous_customers": {
"type": "number"
}
},
"required": [
"start",
"end",
"customers",
"previous_customers"
]
}
},
"bucket": {
"type": "string",
"x-extensible-enum": [
"day",
"week",
"month"
]
},
"time_zone": {
"type": "string"
},
"from": {
"type": "string"
},
"to": {
"type": "string"
},
"previous_range": {
"type": "object",
"properties": {
"from": {
"type": "string"
},
"to": {
"type": "string"
}
},
"required": [
"from",
"to"
]
}
},
"required": [
"customers",
"new_customers",
"returning",
"spent",
"all_time",
"by_country",
"series",
"bucket",
"time_zone",
"from",
"to",
"previous_range"
]
}GET/v1/stores/{store}/grants
Pages the grants of access to customers. Scope customer:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | ||
direction | query | ||
limit | query | ||
cursor | query | ||
count | query | ||
facets | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"customer": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"erased": {
"type": "boolean"
}
},
"required": [
"id",
"name",
"email",
"phone",
"erased"
]
},
{
"type": "null"
}
]
},
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"customer_id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"source_kind": {
"type": "string",
"x-extensible-enum": [
"checkout",
"api",
"import",
"manual",
"subscription",
"payment",
"automation"
]
},
"source_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"grant_reason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settlement_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"valid_from": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ends_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"end_reason": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"import",
"manual",
"lapse",
"refund"
]
},
{
"type": "null"
}
]
},
"granted_by": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"occurred_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"recorded_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"customer",
"product",
"id",
"customer_id",
"product_id",
"tier_id",
"source_kind",
"source_ref",
"grant_reason",
"settlement_id",
"valid_from",
"ends_at",
"end_reason",
"granted_by",
"occurred_at",
"recorded_at"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}POST/v1/stores/{store}/grants
Grants a customer access to a product or tier. Scope customer:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"customer": {
"description": "By id, or by email: whoever the address reaches, else its invited customer.",
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"email": {
"type": "string",
"minLength": 1,
"maxLength": 254,
"pattern": "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"
}
},
"required": [
"email"
],
"additionalProperties": false
}
]
},
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"slug": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"slug"
],
"additionalProperties": false
}
]
},
"tier": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"ends_at": {
"anyOf": [
{
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2}))?$"
},
{
"type": "null"
}
]
},
"reason": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 500
},
{
"type": "null"
}
]
}
},
"required": [
"customer",
"product",
"tier"
],
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"customer": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"erased": {
"type": "boolean"
}
},
"required": [
"id",
"name",
"email",
"phone",
"erased"
]
},
{
"type": "null"
}
]
},
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"customer_id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"source_kind": {
"type": "string",
"x-extensible-enum": [
"checkout",
"api",
"import",
"manual",
"subscription",
"payment",
"automation"
]
},
"source_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"grant_reason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settlement_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"valid_from": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ends_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"end_reason": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"import",
"manual",
"lapse",
"refund"
]
},
{
"type": "null"
}
]
},
"granted_by": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"occurred_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"recorded_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"customer",
"product",
"id",
"customer_id",
"product_id",
"tier_id",
"source_kind",
"source_ref",
"grant_reason",
"settlement_id",
"valid_from",
"ends_at",
"end_reason",
"granted_by",
"occurred_at",
"recorded_at"
]
}POST/v1/stores/{store}/grants/{grant}/revoke
Revokes a grant of access. Scope customer:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
grant | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"reason": {
"type": "string",
"minLength": 1,
"maxLength": 500
}
},
"required": [
"reason"
],
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"customer": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"erased": {
"type": "boolean"
}
},
"required": [
"id",
"name",
"email",
"phone",
"erased"
]
},
{
"type": "null"
}
]
},
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"customer_id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"source_kind": {
"type": "string",
"x-extensible-enum": [
"checkout",
"api",
"import",
"manual",
"subscription",
"payment",
"automation"
]
},
"source_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"grant_reason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settlement_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"valid_from": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ends_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"end_reason": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"import",
"manual",
"lapse",
"refund"
]
},
{
"type": "null"
}
]
},
"granted_by": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"occurred_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"recorded_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"customer",
"product",
"id",
"customer_id",
"product_id",
"tier_id",
"source_kind",
"source_ref",
"grant_reason",
"settlement_id",
"valid_from",
"ends_at",
"end_reason",
"granted_by",
"occurred_at",
"recorded_at"
]
}GET/v1/stores/{store}/entitlements
Pages what customers may reach, as their grants and subscriptions add up. Scope customer:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
customer | query | An id. | |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | ||
direction | query | ||
limit | query | ||
cursor | query | ||
count | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"customer": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"erased": {
"type": "boolean"
}
},
"required": [
"id",
"name",
"email",
"phone",
"erased"
]
},
{
"type": "null"
}
]
},
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"customer_id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"tier_rank": {
"type": "number"
},
"expires_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"tier_expires_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"next_change_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"rebuilt_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"customer",
"product",
"customer_id",
"product_id",
"tier_rank",
"expires_at",
"tier_expires_at",
"next_change_at",
"rebuilt_at"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}GET/v1/stores/{store}/customers
Pages the store's customers. Scope customer:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | Sorted by name, rows without a value come last either way. | |
direction | query | ||
limit | query | ||
cursor | query | ||
count | query | ||
search | query | ||
facets | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"contacts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"email",
"phone"
]
},
"value": {
"type": "string"
},
"verified_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"kind",
"value",
"verified_at"
]
}
},
"totals": {
"type": "object",
"properties": {
"orders": {
"type": "number"
},
"spent": {
"type": "array",
"items": {
"type": "object",
"properties": {
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"gross": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"refunded": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
}
},
"required": [
"currency",
"exponent",
"amount",
"gross",
"refunded"
]
}
},
"active_subscriptions": {
"type": "number"
}
},
"required": [
"orders",
"spent",
"active_subscriptions"
]
},
"id": {
"type": "string"
},
"display_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"locale": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"country": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"erased_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"invited_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"contacts",
"totals",
"id",
"display_name",
"locale",
"country",
"erased_at",
"invited_at",
"created_at"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}GET/v1/stores/{store}/customer_activity
Pages customers' activity over a period. Scope customer:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
from | query | ||
to | query | ||
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | Sorted by name, rows without a value come last either way. | |
direction | query | ||
limit | query | ||
cursor | query | ||
count | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"customer": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"erased": {
"type": "boolean"
}
},
"required": [
"id",
"name",
"email",
"phone",
"erased"
]
},
{
"type": "null"
}
]
},
"country": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"orders": {
"type": "number"
},
"gross": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"average": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"first_order_at": {
"type": "string"
},
"last_order_at": {
"type": "string"
}
},
"required": [
"id",
"customer",
"country",
"currency",
"exponent",
"orders",
"gross",
"average",
"first_order_at",
"last_order_at"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
},
"time_zone": {
"type": "string"
},
"from": {
"type": "string"
},
"to": {
"type": "string"
}
},
"required": [
"items",
"cursor",
"time_zone",
"from",
"to"
]
}GET/v1/stores/{store}/products/{product}/customers
Pages a product's customers. Scope customer:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | Sorted by name, rows without a value come last either way. | |
direction | query | ||
limit | query | ||
cursor | query | ||
count | query | ||
search | query | ||
facets | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"subscription",
"grant"
]
},
"source_kind": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"customer_id": {
"type": "string"
},
"customer": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"erased": {
"type": "boolean"
}
},
"required": [
"id",
"name",
"email",
"phone",
"erased"
]
},
{
"type": "null"
}
]
},
"price_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"order_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"cancel_reason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"scheduled",
"unpaid",
"active",
"expired",
"past_due",
"paused",
"cancelled",
"ended",
"revoked",
"cancelling",
"refunded"
]
},
"started_at": {
"type": "string"
},
"ends_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"progress": {
"type": "object",
"properties": {
"completed": {
"type": "number"
},
"total": {
"type": "number"
}
},
"required": [
"completed",
"total"
]
}
},
"required": [
"id",
"kind",
"source_kind",
"customer_id",
"customer",
"price_id",
"order_id",
"cancel_reason",
"status",
"started_at",
"ends_at",
"progress"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}GET/v1/stores/{store}/products/{product}/customers/stats
Counts a product's customers by status. Scope customer:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
200
Schema
{
"type": "object",
"properties": {
"total": {
"type": "number"
},
"by_status": {
"type": "object",
"properties": {
"scheduled": {
"type": "number"
},
"unpaid": {
"type": "number"
},
"active": {
"type": "number"
},
"expired": {
"type": "number"
},
"past_due": {
"type": "number"
},
"paused": {
"type": "number"
},
"cancelled": {
"type": "number"
},
"ended": {
"type": "number"
},
"revoked": {
"type": "number"
},
"cancelling": {
"type": "number"
},
"refunded": {
"type": "number"
}
},
"required": [
"scheduled",
"unpaid",
"active",
"expired",
"past_due",
"paused",
"cancelled",
"ended",
"revoked",
"cancelling",
"refunded"
]
},
"by_kind": {
"type": "object",
"properties": {
"subscription": {
"type": "number"
},
"grant": {
"type": "number"
}
},
"required": [
"subscription",
"grant"
]
},
"active_granted": {
"type": "number"
},
"active_subscribed": {
"type": "number"
}
},
"required": [
"total",
"by_status",
"by_kind",
"active_granted",
"active_subscribed"
]
}GET/v1/stores/{store}/checkouts
Pages the store's checkouts. Scope customer:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
customer | query | An id. | |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | ||
direction | query | ||
limit | query | ||
cursor | query | ||
count | query | ||
facets | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"customer": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"erased": {
"type": "boolean"
}
},
"required": [
"id",
"name",
"email",
"phone",
"erased"
]
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"paid",
"expired",
"open",
"frozen",
"abandoned"
]
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"price_id": {
"type": "string"
},
"quantity": {
"type": "number"
},
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"discount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"discount_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"mode": {
"type": "string",
"x-extensible-enum": [
"purchase",
"upgrade",
"renewal"
]
}
},
"required": [
"product",
"id",
"product_id",
"price_id",
"quantity",
"amount",
"discount",
"discount_id",
"total",
"mode"
]
}
},
"totals": {
"type": "object",
"properties": {
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"discount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"total": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
}
},
"required": [
"amount",
"discount",
"total"
]
},
"id": {
"type": "string"
},
"customer_id": {
"type": "string"
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"discount_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"coupon": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"refund_waiver": {
"anyOf": [
{
"type": "object",
"properties": {
"policy": {
"description": "The strictest policy among the lines, the one consented to.",
"type": "string"
},
"accepted_at": {
"type": "string"
}
},
"required": [
"policy",
"accepted_at"
]
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"customer",
"status",
"items",
"totals",
"id",
"customer_id",
"currency",
"exponent",
"discount_id",
"coupon",
"refund_waiver",
"expires_at",
"created_at",
"updated_at"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}GET/v1/stores/{store}/customers/{customer}
Reads one customer. Scope customer:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
customer | path | required |
200
Schema
{
"type": "object",
"properties": {
"orders": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"number": {
"type": "number"
},
"customer_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"discount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"total": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"fees": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"source": {
"type": "string",
"x-extensible-enum": [
"checkout",
"api",
"import",
"manual"
]
},
"source_key": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"statements": {
"type": "object",
"properties": {
"customer_status": {
"description": "How well the buyer was known; `fake` is a seeded order.",
"type": "string",
"x-extensible-enum": [
"anon",
"verified",
"fake"
]
},
"coupon": {
"type": "string"
},
"method": {
"description": "The payment method the processor reported.",
"type": "string"
},
"refund_waiver": {
"description": "Carried from the checkout.",
"type": "object",
"properties": {
"policy": {
"description": "The strictest policy among the lines, the one consented to.",
"type": "string"
},
"accepted_at": {
"type": "string"
}
},
"required": [
"policy",
"accepted_at"
]
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"note": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"occurred_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"recorded_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"number",
"customer_id",
"currency",
"exponent",
"amount",
"discount",
"total",
"fees",
"source",
"source_key",
"statements",
"note",
"occurred_at",
"recorded_at"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"subscriptions": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"customer_id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"plan_id": {
"type": "string"
},
"processor": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"stripe"
]
},
{
"type": "null"
}
]
},
"external_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"account_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"unpaid",
"active",
"past_due",
"paused",
"cancelled",
"ended"
]
},
"cancel_at_period_end": {
"type": "boolean"
},
"instrument_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"cancel_reason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"billing_managed": {
"type": "boolean"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ended_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"product",
"id",
"customer_id",
"product_id",
"plan_id",
"processor",
"external_ref",
"account_ref",
"status",
"cancel_at_period_end",
"instrument_ref",
"cancel_reason",
"billing_managed",
"created_at",
"ended_at"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"grants": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"customer_id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"source_kind": {
"type": "string",
"x-extensible-enum": [
"checkout",
"api",
"import",
"manual",
"subscription",
"payment",
"automation"
]
},
"source_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"grant_reason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settlement_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"valid_from": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ends_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"end_reason": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"import",
"manual",
"lapse",
"refund"
]
},
{
"type": "null"
}
]
},
"granted_by": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"occurred_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"recorded_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"product",
"id",
"customer_id",
"product_id",
"tier_id",
"source_kind",
"source_ref",
"grant_reason",
"settlement_id",
"valid_from",
"ends_at",
"end_reason",
"granted_by",
"occurred_at",
"recorded_at"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"entitlements": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"customer_id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"tier_rank": {
"type": "number"
},
"expires_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"tier_expires_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"next_change_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"rebuilt_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"customer_id",
"product_id",
"tier_rank",
"expires_at",
"tier_expires_at",
"next_change_at",
"rebuilt_at"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"reviews": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"customer_id": {
"type": "string"
},
"order_item_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"rating": {
"type": "number"
},
"username": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"notes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"reply": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"replied_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"hidden_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"product",
"id",
"product_id",
"customer_id",
"order_item_id",
"rating",
"username",
"notes",
"reply",
"replied_at",
"hidden_at",
"created_at",
"updated_at"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"attempts": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"quiz_id": {
"type": "string"
},
"customer_id": {
"type": "string"
},
"attempt": {
"type": "number"
},
"status": {
"type": "string",
"x-extensible-enum": [
"failed",
"started",
"submitted",
"passed",
"forfeited"
]
},
"answers": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {
"answer": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
},
"correct": {
"type": "boolean"
},
"weight": {
"type": "number"
},
"dropped": {
"description": "The import couldn't keep what was given, so a null `answer` is not a blank.",
"type": "boolean",
"const": true
}
},
"required": [
"answer",
"correct",
"weight"
],
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"score": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"correct": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"started_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"finished_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"quiz_id",
"customer_id",
"attempt",
"status",
"answers",
"score",
"correct",
"started_at",
"finished_at"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"certificates": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"certificate_id": {
"type": "string"
},
"customer_id": {
"type": "string"
},
"score": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"attempt": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"issued_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"certificate_id",
"customer_id",
"score",
"attempt",
"issued_at",
"revoked_at"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"contacts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"email",
"phone"
]
},
"value": {
"type": "string"
},
"verified_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"kind",
"value",
"verified_at"
]
}
},
"totals": {
"type": "object",
"properties": {
"orders": {
"type": "number"
},
"spent": {
"type": "array",
"items": {
"type": "object",
"properties": {
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"gross": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"refunded": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
}
},
"required": [
"currency",
"exponent",
"amount",
"gross",
"refunded"
]
}
},
"active_subscriptions": {
"type": "number"
}
},
"required": [
"orders",
"spent",
"active_subscriptions"
]
},
"id": {
"type": "string"
},
"display_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"locale": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"country": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"erased_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"invited_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"orders",
"subscriptions",
"grants",
"entitlements",
"reviews",
"attempts",
"certificates",
"contacts",
"totals",
"id",
"display_name",
"locale",
"country",
"erased_at",
"invited_at",
"created_at"
]
}POST/v1/stores/{store}/customers/{customer}/erase
Erases a customer's personal data, keeping the records of what they bought. Scope customer:delete.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
customer | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"orders": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"number": {
"type": "number"
},
"customer_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"discount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"total": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"fees": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"source": {
"type": "string",
"x-extensible-enum": [
"checkout",
"api",
"import",
"manual"
]
},
"source_key": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"statements": {
"type": "object",
"properties": {
"customer_status": {
"description": "How well the buyer was known; `fake` is a seeded order.",
"type": "string",
"x-extensible-enum": [
"anon",
"verified",
"fake"
]
},
"coupon": {
"type": "string"
},
"method": {
"description": "The payment method the processor reported.",
"type": "string"
},
"refund_waiver": {
"description": "Carried from the checkout.",
"type": "object",
"properties": {
"policy": {
"description": "The strictest policy among the lines, the one consented to.",
"type": "string"
},
"accepted_at": {
"type": "string"
}
},
"required": [
"policy",
"accepted_at"
]
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"note": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"occurred_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"recorded_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"number",
"customer_id",
"currency",
"exponent",
"amount",
"discount",
"total",
"fees",
"source",
"source_key",
"statements",
"note",
"occurred_at",
"recorded_at"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"subscriptions": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"customer_id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"plan_id": {
"type": "string"
},
"processor": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"stripe"
]
},
{
"type": "null"
}
]
},
"external_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"account_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"unpaid",
"active",
"past_due",
"paused",
"cancelled",
"ended"
]
},
"cancel_at_period_end": {
"type": "boolean"
},
"instrument_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"cancel_reason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"billing_managed": {
"type": "boolean"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ended_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"product",
"id",
"customer_id",
"product_id",
"plan_id",
"processor",
"external_ref",
"account_ref",
"status",
"cancel_at_period_end",
"instrument_ref",
"cancel_reason",
"billing_managed",
"created_at",
"ended_at"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"grants": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"customer_id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"source_kind": {
"type": "string",
"x-extensible-enum": [
"checkout",
"api",
"import",
"manual",
"subscription",
"payment",
"automation"
]
},
"source_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"grant_reason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settlement_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"valid_from": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ends_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"end_reason": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"import",
"manual",
"lapse",
"refund"
]
},
{
"type": "null"
}
]
},
"granted_by": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"occurred_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"recorded_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"product",
"id",
"customer_id",
"product_id",
"tier_id",
"source_kind",
"source_ref",
"grant_reason",
"settlement_id",
"valid_from",
"ends_at",
"end_reason",
"granted_by",
"occurred_at",
"recorded_at"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"entitlements": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"customer_id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"tier_rank": {
"type": "number"
},
"expires_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"tier_expires_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"next_change_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"rebuilt_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"customer_id",
"product_id",
"tier_rank",
"expires_at",
"tier_expires_at",
"next_change_at",
"rebuilt_at"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"reviews": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"customer_id": {
"type": "string"
},
"order_item_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"rating": {
"type": "number"
},
"username": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"notes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"reply": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"replied_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"hidden_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"product",
"id",
"product_id",
"customer_id",
"order_item_id",
"rating",
"username",
"notes",
"reply",
"replied_at",
"hidden_at",
"created_at",
"updated_at"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"attempts": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"quiz_id": {
"type": "string"
},
"customer_id": {
"type": "string"
},
"attempt": {
"type": "number"
},
"status": {
"type": "string",
"x-extensible-enum": [
"failed",
"started",
"submitted",
"passed",
"forfeited"
]
},
"answers": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {
"answer": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
},
"correct": {
"type": "boolean"
},
"weight": {
"type": "number"
},
"dropped": {
"description": "The import couldn't keep what was given, so a null `answer` is not a blank.",
"type": "boolean",
"const": true
}
},
"required": [
"answer",
"correct",
"weight"
],
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"score": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"correct": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"started_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"finished_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"quiz_id",
"customer_id",
"attempt",
"status",
"answers",
"score",
"correct",
"started_at",
"finished_at"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"certificates": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"certificate_id": {
"type": "string"
},
"customer_id": {
"type": "string"
},
"score": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"attempt": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"issued_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"certificate_id",
"customer_id",
"score",
"attempt",
"issued_at",
"revoked_at"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"contacts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"email",
"phone"
]
},
"value": {
"type": "string"
},
"verified_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"kind",
"value",
"verified_at"
]
}
},
"totals": {
"type": "object",
"properties": {
"orders": {
"type": "number"
},
"spent": {
"type": "array",
"items": {
"type": "object",
"properties": {
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"gross": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"refunded": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
}
},
"required": [
"currency",
"exponent",
"amount",
"gross",
"refunded"
]
}
},
"active_subscriptions": {
"type": "number"
}
},
"required": [
"orders",
"spent",
"active_subscriptions"
]
},
"id": {
"type": "string"
},
"display_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"locale": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"country": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"erased_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"invited_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"orders",
"subscriptions",
"grants",
"entitlements",
"reviews",
"attempts",
"certificates",
"contacts",
"totals",
"id",
"display_name",
"locale",
"country",
"erased_at",
"invited_at",
"created_at"
]
}custompage
GET/v1/stores/{store}/pages
Pages the store's custom pages. Scope custompage:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | ||
direction | query | ||
limit | query | ||
cursor | query | ||
count | query | ||
search | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"menu_position": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"draft",
"scheduled",
"published"
]
},
"published_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"storefront": {
"type": "object",
"properties": {
"no_index": {
"type": "boolean"
}
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"id",
"slug",
"title",
"description",
"menu_position",
"status",
"published_at",
"created_at",
"updated_at",
"settings",
"metadata"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}POST/v1/stores/{store}/pages
Creates a draft custom page. Scope custompage:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"slug": {
"description": "Made from the title when absent: its words, numbered past a twin.",
"type": "string",
"minLength": 1,
"maxLength": 120,
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"description": {
"anyOf": [
{
"type": "string",
"maxLength": 2000
},
{
"type": "null"
}
]
},
"menu_position": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 1000000
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"storefront": {
"type": "object",
"properties": {
"no_index": {
"type": "boolean"
}
},
"additionalProperties": false
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"title"
],
"additionalProperties": false
}201
Schema
{
"type": "object",
"properties": {
"attachments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"preview_only": {
"type": "boolean"
},
"from_body": {
"type": "boolean"
},
"position": {
"type": "number"
},
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
}
},
"required": [
"id",
"target",
"role",
"delivery",
"preview_only",
"from_body",
"position",
"asset"
]
}
},
"files": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"video",
"audio",
"image",
"pdf",
"file"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"width": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"height": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"duration": {
"description": "Seconds.",
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pages": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"url": {
"description": "A public file's lasting URL; null for a private one, or one whose bytes haven't landed.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"attachment_id": {
"description": "The binding a private file opens through; null when the reader can't open it.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"mime",
"name",
"bytes",
"width",
"height",
"duration",
"pages",
"status",
"url",
"attachment_id"
]
}
},
"access": {
"type": "array",
"items": {
"type": "object",
"properties": {
"resource": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"entry",
"quiz",
"attachment",
"page",
"download"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"channel": {
"type": "string",
"x-extensible-enum": [
"api",
"any",
"web",
"mcp",
"feed"
]
},
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"resource",
"channel",
"tier_id"
]
}
},
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"menu_position": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"draft",
"scheduled",
"published"
]
},
"published_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"storefront": {
"type": "object",
"properties": {
"no_index": {
"type": "boolean"
}
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"attachments",
"files",
"access",
"id",
"slug",
"title",
"description",
"menu_position",
"status",
"published_at",
"created_at",
"updated_at",
"settings",
"metadata"
]
}GET/v1/stores/{store}/pages/{page}
Reads one custom page. Scope custompage:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
page | path | required | An id, or slug:<slug>. |
200
Schema
{
"type": "object",
"properties": {
"attachments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"preview_only": {
"type": "boolean"
},
"from_body": {
"type": "boolean"
},
"position": {
"type": "number"
},
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
}
},
"required": [
"id",
"target",
"role",
"delivery",
"preview_only",
"from_body",
"position",
"asset"
]
}
},
"files": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"video",
"audio",
"image",
"pdf",
"file"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"width": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"height": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"duration": {
"description": "Seconds.",
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pages": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"url": {
"description": "A public file's lasting URL; null for a private one, or one whose bytes haven't landed.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"attachment_id": {
"description": "The binding a private file opens through; null when the reader can't open it.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"mime",
"name",
"bytes",
"width",
"height",
"duration",
"pages",
"status",
"url",
"attachment_id"
]
}
},
"access": {
"type": "array",
"items": {
"type": "object",
"properties": {
"resource": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"entry",
"quiz",
"attachment",
"page",
"download"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"channel": {
"type": "string",
"x-extensible-enum": [
"api",
"any",
"web",
"mcp",
"feed"
]
},
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"resource",
"channel",
"tier_id"
]
}
},
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"menu_position": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"draft",
"scheduled",
"published"
]
},
"published_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"storefront": {
"type": "object",
"properties": {
"no_index": {
"type": "boolean"
}
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"attachments",
"files",
"access",
"id",
"slug",
"title",
"description",
"menu_position",
"status",
"published_at",
"created_at",
"updated_at",
"settings",
"metadata"
]
}PATCH/v1/stores/{store}/pages/{page}
Updates a custom page's fields. Scope custompage:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
page | path | required | An id, or slug:<slug>. |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"slug": {
"description": "Made from the title when absent: its words, numbered past a twin.",
"type": "string",
"minLength": 1,
"maxLength": 120,
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"description": {
"anyOf": [
{
"type": "string",
"maxLength": 2000
},
{
"type": "null"
}
]
},
"menu_position": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 1000000
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"storefront": {
"type": "object",
"properties": {
"no_index": {
"type": "boolean"
}
},
"additionalProperties": false
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"attachments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"preview_only": {
"type": "boolean"
},
"from_body": {
"type": "boolean"
},
"position": {
"type": "number"
},
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
}
},
"required": [
"id",
"target",
"role",
"delivery",
"preview_only",
"from_body",
"position",
"asset"
]
}
},
"files": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"video",
"audio",
"image",
"pdf",
"file"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"width": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"height": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"duration": {
"description": "Seconds.",
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pages": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"url": {
"description": "A public file's lasting URL; null for a private one, or one whose bytes haven't landed.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"attachment_id": {
"description": "The binding a private file opens through; null when the reader can't open it.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"mime",
"name",
"bytes",
"width",
"height",
"duration",
"pages",
"status",
"url",
"attachment_id"
]
}
},
"access": {
"type": "array",
"items": {
"type": "object",
"properties": {
"resource": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"entry",
"quiz",
"attachment",
"page",
"download"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"channel": {
"type": "string",
"x-extensible-enum": [
"api",
"any",
"web",
"mcp",
"feed"
]
},
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"resource",
"channel",
"tier_id"
]
}
},
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"menu_position": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"draft",
"scheduled",
"published"
]
},
"published_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"storefront": {
"type": "object",
"properties": {
"no_index": {
"type": "boolean"
}
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"attachments",
"files",
"access",
"id",
"slug",
"title",
"description",
"menu_position",
"status",
"published_at",
"created_at",
"updated_at",
"settings",
"metadata"
]
}DELETE/v1/stores/{store}/pages/{page}
Deletes a custom page. Scope custompage:delete.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
page | path | required | An id, or slug:<slug>. |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
200
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"deleted": {
"type": "boolean",
"const": true
}
},
"required": [
"id",
"deleted"
]
}POST/v1/stores/{store}/pages/{page}/publish
Publishes a custom page now or schedules it. Scope custompage:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
page | path | required | An id, or slug:<slug>. |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"at": {
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2}))?$"
}
},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"attachments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"preview_only": {
"type": "boolean"
},
"from_body": {
"type": "boolean"
},
"position": {
"type": "number"
},
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
}
},
"required": [
"id",
"target",
"role",
"delivery",
"preview_only",
"from_body",
"position",
"asset"
]
}
},
"files": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"video",
"audio",
"image",
"pdf",
"file"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"width": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"height": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"duration": {
"description": "Seconds.",
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pages": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"url": {
"description": "A public file's lasting URL; null for a private one, or one whose bytes haven't landed.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"attachment_id": {
"description": "The binding a private file opens through; null when the reader can't open it.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"mime",
"name",
"bytes",
"width",
"height",
"duration",
"pages",
"status",
"url",
"attachment_id"
]
}
},
"access": {
"type": "array",
"items": {
"type": "object",
"properties": {
"resource": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"entry",
"quiz",
"attachment",
"page",
"download"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"channel": {
"type": "string",
"x-extensible-enum": [
"api",
"any",
"web",
"mcp",
"feed"
]
},
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"resource",
"channel",
"tier_id"
]
}
},
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"menu_position": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"draft",
"scheduled",
"published"
]
},
"published_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"storefront": {
"type": "object",
"properties": {
"no_index": {
"type": "boolean"
}
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"attachments",
"files",
"access",
"id",
"slug",
"title",
"description",
"menu_position",
"status",
"published_at",
"created_at",
"updated_at",
"settings",
"metadata"
]
}POST/v1/stores/{store}/pages/{page}/unpublish
Takes a custom page back to draft. Scope custompage:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
page | path | required | An id, or slug:<slug>. |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"expect": {
"description": "The status the caller saw; one that moved meanwhile, as a schedule that went live, refuses.",
"type": "string",
"enum": [
"scheduled",
"published"
]
}
},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"attachments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"preview_only": {
"type": "boolean"
},
"from_body": {
"type": "boolean"
},
"position": {
"type": "number"
},
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
}
},
"required": [
"id",
"target",
"role",
"delivery",
"preview_only",
"from_body",
"position",
"asset"
]
}
},
"files": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"video",
"audio",
"image",
"pdf",
"file"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"width": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"height": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"duration": {
"description": "Seconds.",
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pages": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"url": {
"description": "A public file's lasting URL; null for a private one, or one whose bytes haven't landed.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"attachment_id": {
"description": "The binding a private file opens through; null when the reader can't open it.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"mime",
"name",
"bytes",
"width",
"height",
"duration",
"pages",
"status",
"url",
"attachment_id"
]
}
},
"access": {
"type": "array",
"items": {
"type": "object",
"properties": {
"resource": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"entry",
"quiz",
"attachment",
"page",
"download"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"channel": {
"type": "string",
"x-extensible-enum": [
"api",
"any",
"web",
"mcp",
"feed"
]
},
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"resource",
"channel",
"tier_id"
]
}
},
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"menu_position": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"draft",
"scheduled",
"published"
]
},
"published_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"storefront": {
"type": "object",
"properties": {
"no_index": {
"type": "boolean"
}
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"attachments",
"files",
"access",
"id",
"slug",
"title",
"description",
"menu_position",
"status",
"published_at",
"created_at",
"updated_at",
"settings",
"metadata"
]
}discount
GET/v1/stores/{store}/discounts
Pages the store's discounts. Scope discount:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | Sorted by code, rows without a value come last either way. | |
direction | query | ||
limit | query | ||
cursor | query | ||
count | query | ||
search | query | ||
facets | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"scopes": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"tier",
"store",
"price"
]
},
"product_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"price_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"product_id",
"tier_id",
"price_id"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"id": {
"type": "string"
},
"code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"applies": {
"type": "string",
"x-extensible-enum": [
"automatically",
"by_code",
"never"
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"scheduled",
"archived",
"active",
"off",
"expired"
]
},
"amount_off": {
"type": "number"
},
"percent_off": {
"type": "number"
},
"currency": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"floor_amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"cap_amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"floor_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"priority": {
"type": "number"
},
"supply_total": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"supply_consumed": {
"type": "number"
},
"supply_per_customer": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"starts_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ends_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"archived_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"scopes",
"id",
"code",
"name",
"applies",
"status",
"amount_off",
"percent_off",
"currency",
"exponent",
"floor_amount",
"cap_amount",
"floor_percent",
"priority",
"supply_total",
"supply_consumed",
"supply_per_customer",
"starts_at",
"ends_at",
"archived_at",
"created_at"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}POST/v1/stores/{store}/discounts
Creates a discount. Scope discount:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
Body
Schema
{
"type": "object",
"properties": {
"amount_off": {
"type": "integer",
"minimum": 0
},
"percent_off": {
"type": "integer",
"minimum": 0,
"maximum": 10000
},
"currency": {
"anyOf": [
{
"type": "string",
"minLength": 3,
"maxLength": 3,
"pattern": "^[A-Za-z]{3}$"
},
{
"type": "null"
}
]
},
"code": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[A-Za-z0-9_-]+$"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"applies": {
"type": "string",
"enum": [
"automatically",
"by_code",
"never"
]
},
"priority": {
"type": "integer",
"minimum": -1000000,
"maximum": 1000000
},
"floor_amount": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "null"
}
]
},
"cap_amount": {
"anyOf": [
{
"type": "integer",
"minimum": 1
},
{
"type": "null"
}
]
},
"floor_percent": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9999
},
{
"type": "null"
}
]
},
"supply_total": {
"anyOf": [
{
"type": "integer",
"minimum": 1
},
{
"type": "null"
}
]
},
"supply_per_customer": {
"anyOf": [
{
"type": "integer",
"minimum": 1
},
{
"type": "null"
}
]
},
"starts_at": {
"anyOf": [
{
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2}))?$"
},
{
"type": "null"
}
]
},
"ends_at": {
"anyOf": [
{
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2}))?$"
},
{
"type": "null"
}
]
},
"scopes": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "store"
}
},
"required": [
"kind"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "product"
},
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"slug": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"slug"
],
"additionalProperties": false
}
]
}
},
"required": [
"kind",
"product"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "tier"
},
"tier": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"required": [
"kind",
"tier"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "price"
},
"price": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"required": [
"kind",
"price"
],
"additionalProperties": false
}
]
},
"maxItems": 100
}
},
"additionalProperties": false
}201
Schema
{
"type": "object",
"properties": {
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"scheduled",
"archived",
"active",
"off",
"expired"
]
},
"id": {
"type": "string"
},
"priority": {
"type": "number"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"currency": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"applies": {
"type": "string",
"x-extensible-enum": [
"automatically",
"by_code",
"never"
]
},
"amount_off": {
"type": "number"
},
"percent_off": {
"type": "number"
},
"floor_amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"cap_amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"floor_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"supply_total": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"supply_consumed": {
"type": "number"
},
"supply_per_customer": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"starts_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ends_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"archived_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"customers": {
"type": "array",
"items": {
"type": "string"
}
},
"scopes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"tier",
"store",
"price"
]
},
"product_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"price_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"product_id",
"tier_id",
"price_id"
]
}
},
"usage": {
"type": "object",
"properties": {
"customers": {
"type": "number"
},
"uses": {
"type": "number"
}
},
"required": [
"customers",
"uses"
]
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"affiliates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"earnings": {
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"properties": {
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"earned": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"unpaid": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"paid": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"commissions": {
"description": "How many earned it, voids left out, and how many are owed; counted to any reader.",
"type": "number"
},
"unpaid_commissions": {
"type": "number"
}
},
"required": [
"currency",
"exponent",
"earned",
"unpaid",
"paid",
"commissions",
"unpaid_commissions"
]
}
},
{
"type": "null"
}
]
},
"user_id": {
"type": "string"
},
"amount_earned": {
"type": "number"
},
"percent_earned": {
"type": "number"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"user": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"type": "string"
},
"avatar": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"email",
"avatar"
]
},
{
"type": "null"
}
]
}
},
"required": [
"earnings",
"user_id",
"amount_earned",
"percent_earned",
"updated_at",
"user"
]
}
}
},
"required": [
"name",
"status",
"id",
"priority",
"created_at",
"currency",
"code",
"applies",
"amount_off",
"percent_off",
"floor_amount",
"cap_amount",
"floor_percent",
"supply_total",
"supply_consumed",
"supply_per_customer",
"starts_at",
"ends_at",
"archived_at",
"customers",
"scopes",
"usage",
"exponent",
"affiliates"
]
}GET/v1/stores/{store}/discounts/{discount}
Reads one discount. Scope discount:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
discount | path | required |
200
Schema
{
"type": "object",
"properties": {
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"scheduled",
"archived",
"active",
"off",
"expired"
]
},
"id": {
"type": "string"
},
"priority": {
"type": "number"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"currency": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"applies": {
"type": "string",
"x-extensible-enum": [
"automatically",
"by_code",
"never"
]
},
"amount_off": {
"type": "number"
},
"percent_off": {
"type": "number"
},
"floor_amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"cap_amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"floor_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"supply_total": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"supply_consumed": {
"type": "number"
},
"supply_per_customer": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"starts_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ends_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"archived_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"customers": {
"type": "array",
"items": {
"type": "string"
}
},
"scopes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"tier",
"store",
"price"
]
},
"product_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"price_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"product_id",
"tier_id",
"price_id"
]
}
},
"usage": {
"type": "object",
"properties": {
"customers": {
"type": "number"
},
"uses": {
"type": "number"
}
},
"required": [
"customers",
"uses"
]
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"affiliates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"earnings": {
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"properties": {
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"earned": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"unpaid": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"paid": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"commissions": {
"description": "How many earned it, voids left out, and how many are owed; counted to any reader.",
"type": "number"
},
"unpaid_commissions": {
"type": "number"
}
},
"required": [
"currency",
"exponent",
"earned",
"unpaid",
"paid",
"commissions",
"unpaid_commissions"
]
}
},
{
"type": "null"
}
]
},
"user_id": {
"type": "string"
},
"amount_earned": {
"type": "number"
},
"percent_earned": {
"type": "number"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"user": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"type": "string"
},
"avatar": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"email",
"avatar"
]
},
{
"type": "null"
}
]
}
},
"required": [
"earnings",
"user_id",
"amount_earned",
"percent_earned",
"updated_at",
"user"
]
}
}
},
"required": [
"name",
"status",
"id",
"priority",
"created_at",
"currency",
"code",
"applies",
"amount_off",
"percent_off",
"floor_amount",
"cap_amount",
"floor_percent",
"supply_total",
"supply_consumed",
"supply_per_customer",
"starts_at",
"ends_at",
"archived_at",
"customers",
"scopes",
"usage",
"exponent",
"affiliates"
]
}PATCH/v1/stores/{store}/discounts/{discount}
Updates a discount's fields. Scope discount:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
discount | path | required |
Body
Schema
{
"type": "object",
"properties": {
"name": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"priority": {
"type": "integer",
"minimum": -1000000,
"maximum": 1000000
},
"applies": {
"type": "string",
"enum": [
"automatically",
"by_code",
"never"
]
},
"floor_amount": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "null"
}
]
},
"cap_amount": {
"anyOf": [
{
"type": "integer",
"minimum": 1
},
{
"type": "null"
}
]
},
"floor_percent": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9999
},
{
"type": "null"
}
]
},
"supply_total": {
"anyOf": [
{
"type": "integer",
"minimum": 1
},
{
"type": "null"
}
]
},
"supply_per_customer": {
"anyOf": [
{
"type": "integer",
"minimum": 1
},
{
"type": "null"
}
]
},
"starts_at": {
"anyOf": [
{
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2}))?$"
},
{
"type": "null"
}
]
},
"ends_at": {
"anyOf": [
{
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2}))?$"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"scheduled",
"archived",
"active",
"off",
"expired"
]
},
"id": {
"type": "string"
},
"priority": {
"type": "number"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"currency": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"applies": {
"type": "string",
"x-extensible-enum": [
"automatically",
"by_code",
"never"
]
},
"amount_off": {
"type": "number"
},
"percent_off": {
"type": "number"
},
"floor_amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"cap_amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"floor_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"supply_total": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"supply_consumed": {
"type": "number"
},
"supply_per_customer": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"starts_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ends_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"archived_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"customers": {
"type": "array",
"items": {
"type": "string"
}
},
"scopes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"tier",
"store",
"price"
]
},
"product_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"price_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"product_id",
"tier_id",
"price_id"
]
}
},
"usage": {
"type": "object",
"properties": {
"customers": {
"type": "number"
},
"uses": {
"type": "number"
}
},
"required": [
"customers",
"uses"
]
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"affiliates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"earnings": {
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"properties": {
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"earned": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"unpaid": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"paid": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"commissions": {
"description": "How many earned it, voids left out, and how many are owed; counted to any reader.",
"type": "number"
},
"unpaid_commissions": {
"type": "number"
}
},
"required": [
"currency",
"exponent",
"earned",
"unpaid",
"paid",
"commissions",
"unpaid_commissions"
]
}
},
{
"type": "null"
}
]
},
"user_id": {
"type": "string"
},
"amount_earned": {
"type": "number"
},
"percent_earned": {
"type": "number"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"user": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"type": "string"
},
"avatar": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"email",
"avatar"
]
},
{
"type": "null"
}
]
}
},
"required": [
"earnings",
"user_id",
"amount_earned",
"percent_earned",
"updated_at",
"user"
]
}
}
},
"required": [
"name",
"status",
"id",
"priority",
"created_at",
"currency",
"code",
"applies",
"amount_off",
"percent_off",
"floor_amount",
"cap_amount",
"floor_percent",
"supply_total",
"supply_consumed",
"supply_per_customer",
"starts_at",
"ends_at",
"archived_at",
"customers",
"scopes",
"usage",
"exponent",
"affiliates"
]
}DELETE/v1/stores/{store}/discounts/{discount}
Deletes a discount no order refers to. Scope discount:delete.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
discount | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
200
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"deleted": {
"type": "boolean",
"const": true
}
},
"required": [
"id",
"deleted"
]
}GET/v1/stores/{store}/discounts/stats
Counts the store's discounts by status. Scope discount:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
200
Schema
{
"type": "object",
"properties": {
"total": {
"type": "number"
},
"by_status": {
"type": "object",
"properties": {
"active": {
"type": "number"
},
"scheduled": {
"type": "number"
},
"off": {
"type": "number"
},
"expired": {
"type": "number"
},
"archived": {
"type": "number"
}
},
"required": [
"active",
"scheduled",
"off",
"expired",
"archived"
]
},
"automatic": {
"type": "number"
},
"uses": {
"type": "number"
},
"customers": {
"type": "number"
}
},
"required": [
"total",
"by_status",
"automatic",
"uses",
"customers"
]
}POST/v1/stores/{store}/discounts/{discount}/archive
Stops a discount from applying while keeping it. Scope discount:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
discount | path | required |
Body
Schema
{
"type": "object",
"properties": {},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"scheduled",
"archived",
"active",
"off",
"expired"
]
},
"id": {
"type": "string"
},
"priority": {
"type": "number"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"currency": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"applies": {
"type": "string",
"x-extensible-enum": [
"automatically",
"by_code",
"never"
]
},
"amount_off": {
"type": "number"
},
"percent_off": {
"type": "number"
},
"floor_amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"cap_amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"floor_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"supply_total": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"supply_consumed": {
"type": "number"
},
"supply_per_customer": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"starts_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ends_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"archived_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"customers": {
"type": "array",
"items": {
"type": "string"
}
},
"scopes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"tier",
"store",
"price"
]
},
"product_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"price_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"product_id",
"tier_id",
"price_id"
]
}
},
"usage": {
"type": "object",
"properties": {
"customers": {
"type": "number"
},
"uses": {
"type": "number"
}
},
"required": [
"customers",
"uses"
]
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"affiliates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"earnings": {
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"properties": {
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"earned": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"unpaid": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"paid": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"commissions": {
"description": "How many earned it, voids left out, and how many are owed; counted to any reader.",
"type": "number"
},
"unpaid_commissions": {
"type": "number"
}
},
"required": [
"currency",
"exponent",
"earned",
"unpaid",
"paid",
"commissions",
"unpaid_commissions"
]
}
},
{
"type": "null"
}
]
},
"user_id": {
"type": "string"
},
"amount_earned": {
"type": "number"
},
"percent_earned": {
"type": "number"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"user": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"type": "string"
},
"avatar": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"email",
"avatar"
]
},
{
"type": "null"
}
]
}
},
"required": [
"earnings",
"user_id",
"amount_earned",
"percent_earned",
"updated_at",
"user"
]
}
}
},
"required": [
"name",
"status",
"id",
"priority",
"created_at",
"currency",
"code",
"applies",
"amount_off",
"percent_off",
"floor_amount",
"cap_amount",
"floor_percent",
"supply_total",
"supply_consumed",
"supply_per_customer",
"starts_at",
"ends_at",
"archived_at",
"customers",
"scopes",
"usage",
"exponent",
"affiliates"
]
}POST/v1/stores/{store}/discounts/{discount}/restore
Lets an archived discount apply again. Scope discount:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
discount | path | required |
Body
Schema
{
"type": "object",
"properties": {},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"scheduled",
"archived",
"active",
"off",
"expired"
]
},
"id": {
"type": "string"
},
"priority": {
"type": "number"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"currency": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"applies": {
"type": "string",
"x-extensible-enum": [
"automatically",
"by_code",
"never"
]
},
"amount_off": {
"type": "number"
},
"percent_off": {
"type": "number"
},
"floor_amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"cap_amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"floor_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"supply_total": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"supply_consumed": {
"type": "number"
},
"supply_per_customer": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"starts_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ends_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"archived_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"customers": {
"type": "array",
"items": {
"type": "string"
}
},
"scopes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"tier",
"store",
"price"
]
},
"product_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"price_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"product_id",
"tier_id",
"price_id"
]
}
},
"usage": {
"type": "object",
"properties": {
"customers": {
"type": "number"
},
"uses": {
"type": "number"
}
},
"required": [
"customers",
"uses"
]
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"affiliates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"earnings": {
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"properties": {
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"earned": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"unpaid": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"paid": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"commissions": {
"description": "How many earned it, voids left out, and how many are owed; counted to any reader.",
"type": "number"
},
"unpaid_commissions": {
"type": "number"
}
},
"required": [
"currency",
"exponent",
"earned",
"unpaid",
"paid",
"commissions",
"unpaid_commissions"
]
}
},
{
"type": "null"
}
]
},
"user_id": {
"type": "string"
},
"amount_earned": {
"type": "number"
},
"percent_earned": {
"type": "number"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"user": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"type": "string"
},
"avatar": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"email",
"avatar"
]
},
{
"type": "null"
}
]
}
},
"required": [
"earnings",
"user_id",
"amount_earned",
"percent_earned",
"updated_at",
"user"
]
}
}
},
"required": [
"name",
"status",
"id",
"priority",
"created_at",
"currency",
"code",
"applies",
"amount_off",
"percent_off",
"floor_amount",
"cap_amount",
"floor_percent",
"supply_total",
"supply_consumed",
"supply_per_customer",
"starts_at",
"ends_at",
"archived_at",
"customers",
"scopes",
"usage",
"exponent",
"affiliates"
]
}POST/v1/stores/{store}/discounts/{discount}/restrict
Sets the products, tiers or prices a discount applies to. Scope discount:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
discount | path | required |
Body
Schema
{
"type": "object",
"properties": {
"customers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
"maxItems": 1000
}
},
"required": [
"customers"
],
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"scheduled",
"archived",
"active",
"off",
"expired"
]
},
"id": {
"type": "string"
},
"priority": {
"type": "number"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"currency": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"applies": {
"type": "string",
"x-extensible-enum": [
"automatically",
"by_code",
"never"
]
},
"amount_off": {
"type": "number"
},
"percent_off": {
"type": "number"
},
"floor_amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"cap_amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"floor_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"supply_total": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"supply_consumed": {
"type": "number"
},
"supply_per_customer": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"starts_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ends_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"archived_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"customers": {
"type": "array",
"items": {
"type": "string"
}
},
"scopes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"tier",
"store",
"price"
]
},
"product_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"price_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"product_id",
"tier_id",
"price_id"
]
}
},
"usage": {
"type": "object",
"properties": {
"customers": {
"type": "number"
},
"uses": {
"type": "number"
}
},
"required": [
"customers",
"uses"
]
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"affiliates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"earnings": {
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"properties": {
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"earned": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"unpaid": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"paid": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"commissions": {
"description": "How many earned it, voids left out, and how many are owed; counted to any reader.",
"type": "number"
},
"unpaid_commissions": {
"type": "number"
}
},
"required": [
"currency",
"exponent",
"earned",
"unpaid",
"paid",
"commissions",
"unpaid_commissions"
]
}
},
{
"type": "null"
}
]
},
"user_id": {
"type": "string"
},
"amount_earned": {
"type": "number"
},
"percent_earned": {
"type": "number"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"user": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"type": "string"
},
"avatar": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"email",
"avatar"
]
},
{
"type": "null"
}
]
}
},
"required": [
"earnings",
"user_id",
"amount_earned",
"percent_earned",
"updated_at",
"user"
]
}
}
},
"required": [
"name",
"status",
"id",
"priority",
"created_at",
"currency",
"code",
"applies",
"amount_off",
"percent_off",
"floor_amount",
"cap_amount",
"floor_percent",
"supply_total",
"supply_consumed",
"supply_per_customer",
"starts_at",
"ends_at",
"archived_at",
"customers",
"scopes",
"usage",
"exponent",
"affiliates"
]
}POST/v1/stores/{store}/discounts/{discount}/attach
Applies a discount to a product, tier or price. Scope discount:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
discount | path | required |
Body
Schema
{
"type": "object",
"properties": {
"scope": {
"anyOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "store"
}
},
"required": [
"kind"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "product"
},
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"slug": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"slug"
],
"additionalProperties": false
}
]
}
},
"required": [
"kind",
"product"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "tier"
},
"tier": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"required": [
"kind",
"tier"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "price"
},
"price": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"required": [
"kind",
"price"
],
"additionalProperties": false
}
]
}
},
"required": [
"scope"
],
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"scheduled",
"archived",
"active",
"off",
"expired"
]
},
"id": {
"type": "string"
},
"priority": {
"type": "number"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"currency": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"applies": {
"type": "string",
"x-extensible-enum": [
"automatically",
"by_code",
"never"
]
},
"amount_off": {
"type": "number"
},
"percent_off": {
"type": "number"
},
"floor_amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"cap_amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"floor_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"supply_total": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"supply_consumed": {
"type": "number"
},
"supply_per_customer": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"starts_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ends_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"archived_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"customers": {
"type": "array",
"items": {
"type": "string"
}
},
"scopes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"tier",
"store",
"price"
]
},
"product_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"price_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"product_id",
"tier_id",
"price_id"
]
}
},
"usage": {
"type": "object",
"properties": {
"customers": {
"type": "number"
},
"uses": {
"type": "number"
}
},
"required": [
"customers",
"uses"
]
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"affiliates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"earnings": {
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"properties": {
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"earned": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"unpaid": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"paid": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"commissions": {
"description": "How many earned it, voids left out, and how many are owed; counted to any reader.",
"type": "number"
},
"unpaid_commissions": {
"type": "number"
}
},
"required": [
"currency",
"exponent",
"earned",
"unpaid",
"paid",
"commissions",
"unpaid_commissions"
]
}
},
{
"type": "null"
}
]
},
"user_id": {
"type": "string"
},
"amount_earned": {
"type": "number"
},
"percent_earned": {
"type": "number"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"user": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"type": "string"
},
"avatar": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"email",
"avatar"
]
},
{
"type": "null"
}
]
}
},
"required": [
"earnings",
"user_id",
"amount_earned",
"percent_earned",
"updated_at",
"user"
]
}
}
},
"required": [
"name",
"status",
"id",
"priority",
"created_at",
"currency",
"code",
"applies",
"amount_off",
"percent_off",
"floor_amount",
"cap_amount",
"floor_percent",
"supply_total",
"supply_consumed",
"supply_per_customer",
"starts_at",
"ends_at",
"archived_at",
"customers",
"scopes",
"usage",
"exponent",
"affiliates"
]
}POST/v1/stores/{store}/discounts/{discount}/detach
Stops a discount applying to a product, tier or price. Scope discount:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
discount | path | required |
Body
Schema
{
"type": "object",
"properties": {
"scope": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"required": [
"scope"
],
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"scheduled",
"archived",
"active",
"off",
"expired"
]
},
"id": {
"type": "string"
},
"priority": {
"type": "number"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"currency": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"applies": {
"type": "string",
"x-extensible-enum": [
"automatically",
"by_code",
"never"
]
},
"amount_off": {
"type": "number"
},
"percent_off": {
"type": "number"
},
"floor_amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"cap_amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"floor_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"supply_total": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"supply_consumed": {
"type": "number"
},
"supply_per_customer": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"starts_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ends_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"archived_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"customers": {
"type": "array",
"items": {
"type": "string"
}
},
"scopes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"tier",
"store",
"price"
]
},
"product_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"price_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"product_id",
"tier_id",
"price_id"
]
}
},
"usage": {
"type": "object",
"properties": {
"customers": {
"type": "number"
},
"uses": {
"type": "number"
}
},
"required": [
"customers",
"uses"
]
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"affiliates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"earnings": {
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"properties": {
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"earned": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"unpaid": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"paid": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"commissions": {
"description": "How many earned it, voids left out, and how many are owed; counted to any reader.",
"type": "number"
},
"unpaid_commissions": {
"type": "number"
}
},
"required": [
"currency",
"exponent",
"earned",
"unpaid",
"paid",
"commissions",
"unpaid_commissions"
]
}
},
{
"type": "null"
}
]
},
"user_id": {
"type": "string"
},
"amount_earned": {
"type": "number"
},
"percent_earned": {
"type": "number"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"user": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"type": "string"
},
"avatar": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"email",
"avatar"
]
},
{
"type": "null"
}
]
}
},
"required": [
"earnings",
"user_id",
"amount_earned",
"percent_earned",
"updated_at",
"user"
]
}
}
},
"required": [
"name",
"status",
"id",
"priority",
"created_at",
"currency",
"code",
"applies",
"amount_off",
"percent_off",
"floor_amount",
"cap_amount",
"floor_percent",
"supply_total",
"supply_consumed",
"supply_per_customer",
"starts_at",
"ends_at",
"archived_at",
"customers",
"scopes",
"usage",
"exponent",
"affiliates"
]
}file
GET/v1/stores/{store}/{kind}/{id}/attachments
Lists the files attached to a resource. Scope file:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
kind | path | required | The target's kind, in the plural. |
id | path | required |
200
Schema
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"preview_only": {
"type": "boolean"
},
"from_body": {
"type": "boolean"
},
"position": {
"type": "number"
},
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
}
},
"required": [
"id",
"target",
"role",
"delivery",
"preview_only",
"from_body",
"position",
"asset"
]
}
}POST/v1/stores/{store}/{kind}/{id}/attachments
Attaches a file to a resource in a role. Scope file:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
kind | path | required | The target's kind, in the plural. |
id | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
"role": {
"type": "string",
"enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"enum": [
"inline",
"download",
"stream"
]
},
"preview_only": {
"type": "boolean"
},
"position": {
"type": "integer",
"minimum": 0,
"maximum": 1000000
},
"if_none": {
"description": "Refused when the target already holds one in this role, as the first stylesheet is chosen.",
"type": "boolean"
},
"if_none_of": {
"description": "Refused while the target holds a file of this kind in the role that its body didn't bind; the asset must be one.",
"type": "string",
"enum": [
"video",
"pdf"
]
}
},
"required": [
"asset",
"role"
],
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"preview_only": {
"type": "boolean"
},
"from_body": {
"type": "boolean"
},
"position": {
"type": "number"
},
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
}
},
"required": [
"id",
"target",
"role",
"delivery",
"preview_only",
"from_body",
"position",
"asset"
]
}GET/v1/stores/{store}/{kind}/{id}/body
Reads a product's, entry's, page's or quiz's body, published and staged. Scope file:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
kind | path | required | The target's kind, in the plural. |
id | path | required | |
staged | query |
200
Schema
{
"anyOf": [
{
"type": "object",
"properties": {
"attachment": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
]
},
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"content": {
"type": "string"
},
"files": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"video",
"audio",
"image",
"pdf",
"file"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"width": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"height": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"duration": {
"description": "Seconds.",
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pages": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"url": {
"description": "A public file's lasting URL; null for a private one, or one whose bytes haven't landed.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"attachment_id": {
"description": "The binding a private file opens through; null when the reader can't open it.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"mime",
"name",
"bytes",
"width",
"height",
"duration",
"pages",
"status",
"url",
"attachment_id"
]
}
}
},
"required": [
"attachment",
"asset",
"mime",
"content",
"files"
]
},
{
"type": "null"
}
]
}PUT/v1/stores/{store}/{kind}/{id}/body
Stages a new body for a product, entry, page or quiz. Scope file:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
kind | path | required | The target's kind, in the plural. |
id | path | required |
Body
Schema
{
"type": "object",
"properties": {
"content": {
"description": "The body's text, a blocks layout: 1 MiB of UTF-8, so a quarter as many characters always fit.",
"type": "string",
"minLength": 1,
"maxLength": 262144
},
"from": {
"description": "The asset the body (or the staged body) held when the caller read it; null when it had none.",
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"staged": {
"description": "Writes the unpublished next body instead of the live one.",
"type": "boolean"
},
"live": {
"description": "On a staged write, the live body's asset the caller started from; null when there was none.",
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"unpublished": {
"description": "On a live write, the caller saved it believing its page or product isn't live.",
"type": "boolean",
"const": true
}
},
"required": [
"content",
"from"
],
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"attachment": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
]
},
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
]
},
"attachments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"preview_only": {
"type": "boolean"
},
"from_body": {
"type": "boolean"
},
"position": {
"type": "number"
},
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
}
},
"required": [
"id",
"target",
"role",
"delivery",
"preview_only",
"from_body",
"position",
"asset"
]
}
}
},
"required": [
"attachment",
"asset",
"attachments"
]
}POST/v1/stores/{store}/{kind}/{id}/body/publish
Publishes the staged body. Scope file:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
kind | path | required | The target's kind, in the plural. |
id | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"from": {
"description": "The staged asset the caller saw.",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"required": [
"from"
],
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"attachment": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
]
},
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
]
},
"attachments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"preview_only": {
"type": "boolean"
},
"from_body": {
"type": "boolean"
},
"position": {
"type": "number"
},
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
}
},
"required": [
"id",
"target",
"role",
"delivery",
"preview_only",
"from_body",
"position",
"asset"
]
}
}
},
"required": [
"attachment",
"asset",
"attachments"
]
}POST/v1/stores/{store}/{kind}/{id}/body/discard
Discards the staged body, keeping the published one. Scope file:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
kind | path | required | The target's kind, in the plural. |
id | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"from": {
"description": "The staged asset the caller saw.",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"required": [
"from"
],
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"deleted": {
"type": "boolean",
"const": true
}
},
"required": [
"id",
"deleted"
]
}PATCH/v1/stores/{store}/attachments/{attachment}
Updates an attachment's role, delivery or preview flag. Scope file:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
attachment | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
"from": {
"description": "The asset the caller saw bound; any other refuses.",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
"from_role": {
"description": "The role the caller saw it hold; another refuses.",
"type": "string",
"enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"from_delivery": {
"description": "The delivery the caller saw it served by; another refuses.",
"type": "string",
"enum": [
"inline",
"download",
"stream"
]
},
"body": {
"description": "The body the caller saw on the target, null for none; another refuses.",
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"kind": {
"description": "The file it holds after the write must be of this kind, as a lesson's video swapped.",
"type": "string",
"enum": [
"video",
"pdf"
]
},
"role": {
"type": "string",
"enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"description": "The seller's pick, which a save of the text no longer flips with its use.",
"type": "string",
"enum": [
"inline",
"download",
"stream"
]
},
"preview_only": {
"description": "True drops every gate row of the attachment's own, which takes the gate's scopes.",
"type": "boolean"
},
"position": {
"type": "integer",
"minimum": 0,
"maximum": 1000000
},
"download_tier": {
"description": "Who may download a lesson's slides bound as a download: a tier and above, or null for whoever opens them; takes the gate's scopes.",
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"preview_only": {
"type": "boolean"
},
"from_body": {
"type": "boolean"
},
"position": {
"type": "number"
},
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
}
},
"required": [
"id",
"target",
"role",
"delivery",
"preview_only",
"from_body",
"position",
"asset"
]
}POST/v1/stores/{store}/{kind}/{id}/attachments/reorder
Sets the order of a resource's attachments. Scope file:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
kind | path | required | The target's kind, in the plural. |
id | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"role": {
"type": "string",
"enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"attachments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"expect": {
"description": "The group's order as the caller read it; another order now refuses.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
}
}
},
"required": [
"role",
"attachments"
],
"additionalProperties": false
}200
Schema
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"preview_only": {
"type": "boolean"
},
"from_body": {
"type": "boolean"
},
"position": {
"type": "number"
},
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
}
},
"required": [
"id",
"target",
"role",
"delivery",
"preview_only",
"from_body",
"position",
"asset"
]
}
}POST/v1/stores/{store}/attachments/{attachment}/detach
Detaches a file from a resource, keeping the file. Scope file:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
attachment | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"from": {
"description": "The asset the caller saw bound; any other refuses.",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
"from_role": {
"description": "The role the caller saw it hold; another refuses.",
"type": "string",
"enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"body": {
"description": "The body the caller saw on the target, null for none; another refuses.",
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"deleted": {
"type": "boolean",
"const": true
}
},
"required": [
"id",
"deleted"
]
}GET/v1/stores/{store}/products/{product}/prompts
Pages a product's MCP prompts with their text; needs product:read too. Scope file:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | ||
direction | query | ||
limit | query | ||
cursor | query | ||
count | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"body": {
"type": "string"
},
"arguments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
},
"access": {
"anyOf": [
{
"type": "object",
"properties": {
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"tier_id"
]
},
{
"type": "null"
}
]
},
"position": {
"type": "number"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"product_id",
"name",
"title",
"description",
"body",
"arguments",
"access",
"position",
"created_at"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}POST/v1/stores/{store}/products/{product}/prompts
Adds an MCP prompt to a product; needs product:write too. Scope file:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"name": {
"description": "A slash command, unique among the store's prompts.",
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[a-z0-9][a-z0-9-]*$"
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"description": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 500
},
{
"type": "null"
}
]
},
"body": {
"description": "The prompt's markdown: 100000 bytes of UTF-8, so a quarter as many characters always fit.",
"type": "string",
"minLength": 1,
"maxLength": 25000
},
"arguments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[A-Za-z_][A-Za-z0-9_-]*$"
},
"description": {
"anyOf": [
{
"type": "string",
"maxLength": 500
},
{
"type": "null"
}
]
},
"required": {
"description": "A required argument takes no default.",
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string",
"maxLength": 1000
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u`, each once, the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string",
"maxLength": 3,
"pattern": "^[isu]*$"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string",
"maxLength": 500
},
{
"type": "null"
}
]
},
"lenient": {
"description": "Whether a value `match` refuses falls back to the default; only an argument with one.",
"type": "boolean"
}
},
"required": [
"name"
],
"additionalProperties": false
},
"maxItems": 20
},
"access": {
"anyOf": [
{
"type": "object",
"properties": {
"tier": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"tier"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"name",
"title",
"body"
],
"additionalProperties": false
}201
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"body": {
"type": "string"
},
"arguments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
},
"access": {
"anyOf": [
{
"type": "object",
"properties": {
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"tier_id"
]
},
{
"type": "null"
}
]
},
"position": {
"type": "number"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"product_id",
"name",
"title",
"description",
"body",
"arguments",
"access",
"position",
"created_at"
]
}GET/v1/stores/{store}/prompts/{prompt}
Reads one of a product's MCP prompts; needs product:read too. Scope file:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
prompt | path | required |
200
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"body": {
"type": "string"
},
"arguments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
},
"access": {
"anyOf": [
{
"type": "object",
"properties": {
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"tier_id"
]
},
{
"type": "null"
}
]
},
"position": {
"type": "number"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"product_id",
"name",
"title",
"description",
"body",
"arguments",
"access",
"position",
"created_at"
]
}PATCH/v1/stores/{store}/prompts/{prompt}
Updates an MCP prompt's fields, text or access; needs product:write too. Scope file:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
prompt | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"name": {
"description": "A slash command, unique among the store's prompts.",
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[a-z0-9][a-z0-9-]*$"
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"description": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 500
},
{
"type": "null"
}
]
},
"body": {
"description": "The prompt's markdown: 100000 bytes of UTF-8, so a quarter as many characters always fit.",
"type": "string",
"minLength": 1,
"maxLength": 25000
},
"arguments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[A-Za-z_][A-Za-z0-9_-]*$"
},
"description": {
"anyOf": [
{
"type": "string",
"maxLength": 500
},
{
"type": "null"
}
]
},
"required": {
"description": "A required argument takes no default.",
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string",
"maxLength": 1000
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u`, each once, the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string",
"maxLength": 3,
"pattern": "^[isu]*$"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string",
"maxLength": 500
},
{
"type": "null"
}
]
},
"lenient": {
"description": "Whether a value `match` refuses falls back to the default; only an argument with one.",
"type": "boolean"
}
},
"required": [
"name"
],
"additionalProperties": false
},
"maxItems": 20
},
"access": {
"anyOf": [
{
"type": "object",
"properties": {
"tier": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"tier"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"body": {
"type": "string"
},
"arguments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
},
"access": {
"anyOf": [
{
"type": "object",
"properties": {
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"tier_id"
]
},
{
"type": "null"
}
]
},
"position": {
"type": "number"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"product_id",
"name",
"title",
"description",
"body",
"arguments",
"access",
"position",
"created_at"
]
}DELETE/v1/stores/{store}/prompts/{prompt}
Deletes an MCP prompt; needs product:write too. Scope file:delete.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
prompt | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
200
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"deleted": {
"type": "boolean",
"const": true
}
},
"required": [
"id",
"deleted"
]
}PUT/v1/stores/{store}/products/{product}/poster
Sets, swaps or clears a product's thumbnail, its first poster, if it is still the one the caller saw; needs product:write too. Scope file:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"asset": {
"description": "The file to show, or null to show none.",
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"from": {
"description": "The first poster the caller saw, or null for none; a product showing another refuses.",
"anyOf": [
{
"type": "object",
"properties": {
"attachment": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"required": [
"attachment",
"asset"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"asset",
"from"
],
"additionalProperties": false
}200
Schema
{
"anyOf": [
{
"type": "object",
"properties": {
"product": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
]
},
"poster": {
"type": "null"
}
},
"required": [
"product",
"poster"
]
},
{
"type": "object",
"properties": {
"product": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
]
},
"poster": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"preview_only": {
"type": "boolean"
},
"from_body": {
"type": "boolean"
},
"position": {
"type": "number"
},
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
}
},
"required": [
"id",
"target",
"role",
"delivery",
"preview_only",
"from_body",
"position",
"asset"
]
}
},
"required": [
"product",
"poster"
]
}
]
}GET/v1/stores/{store}/assets
Pages the store's files. Scope file:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | ||
direction | query | ||
limit | query | ||
cursor | query | ||
count | query | ||
search | query | ||
facets | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"uses": {
"type": "object",
"properties": {
"total": {
"type": "number"
},
"first": {
"anyOf": [
{
"type": "object",
"properties": {
"attachment_id": {
"type": "string"
},
"asset_id": {
"type": "string"
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"entry",
"store",
"quiz",
"certificate",
"page",
"holding",
"notification"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"detachable": {
"type": "boolean"
}
},
"required": [
"attachment_id",
"asset_id",
"role",
"delivery",
"target",
"detachable"
]
},
{
"type": "null"
}
]
}
},
"required": [
"total",
"first"
]
},
"replace_failed": {
"type": "boolean"
},
"movable": {
"type": "boolean"
},
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"uses",
"replace_failed",
"movable",
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}POST/v1/stores/{store}/assets
Creates a link file, such as an external video. Scope file:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"storage": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
"locator": {
"type": "string",
"minLength": 1,
"maxLength": 100000
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"pattern": "^[a-z0-9][a-z0-9-]*$"
},
"title": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 16
},
{
"type": "null"
}
]
},
"mime": {
"anyOf": [
{
"type": "string",
"maxLength": 128,
"pattern": "^\\s*(?:[a-zA-Z0-9][a-zA-Z0-9!#$&^_.+-]*\\/[a-zA-Z0-9][a-zA-Z0-9!#$&^_.+-]*(?:([\\t ]*;)(?:([\\t ]*)([!#$%&'*+.^_`|~0-9A-Za-z-]+)(=(?:[!#$%&'*+.^_`|~0-9A-Za-z-]+|\"(?:[\\t \\x21\\x23-\\x5b\\x5d-\\x7e]|\\\\[\\t\\x20-\\x7e])*\")))?)*)?\\s*$"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"enum": [
"public",
"external",
"signed"
]
},
"redacted": {
"type": "boolean"
},
"description": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 2000
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
},
"additionalProperties": false
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
],
"additionalProperties": false
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"storage",
"locator",
"name"
],
"additionalProperties": false
}201
Schema
{
"type": "object",
"properties": {
"transforms": {
"type": "array",
"items": {
"type": "object",
"properties": {
"stage": {
"type": "string",
"x-extensible-enum": [
"ingest",
"derive",
"deliver"
]
},
"processor": {
"type": "string"
},
"params": {
"type": "object",
"properties": {
"level": {
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"position": {
"type": "number"
}
},
"required": [
"stage",
"processor",
"params",
"position"
]
}
},
"deliveries": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"asset_id": {
"type": "string"
},
"customer_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"member_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"intent": {
"type": "string",
"x-extensible-enum": [
"preview",
"download",
"stream"
]
},
"channel": {
"type": "string",
"x-extensible-enum": [
"api",
"web",
"mcp",
"feed"
]
},
"issued_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"max_uses": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"used_count": {
"type": "number"
},
"used_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"asset_id",
"customer_id",
"member_id",
"intent",
"channel",
"issued_at",
"expires_at",
"revoked_at",
"max_uses",
"used_count",
"used_at"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"uses": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"attachment_id": {
"type": "string"
},
"asset_id": {
"type": "string"
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"entry",
"store",
"quiz",
"certificate",
"page",
"holding",
"notification"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"detachable": {
"type": "boolean"
}
},
"required": [
"attachment_id",
"asset_id",
"role",
"delivery",
"target",
"detachable"
]
}
},
"total": {
"type": "number"
},
"detachable": {
"type": "number"
}
},
"required": [
"items",
"total",
"detachable"
]
},
"children": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "string"
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"transforms",
"deliveries",
"uses",
"children",
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
}GET/v1/stores/{store}/assets/{asset}
Reads one file. Scope file:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
asset | path | required |
200
Schema
{
"type": "object",
"properties": {
"lineage": {
"type": "object",
"properties": {
"assets": {
"type": "number"
},
"uses": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"attachment_id": {
"type": "string"
},
"asset_id": {
"type": "string"
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"entry",
"store",
"quiz",
"certificate",
"page",
"holding",
"notification"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"detachable": {
"type": "boolean"
}
},
"required": [
"attachment_id",
"asset_id",
"role",
"delivery",
"target",
"detachable"
]
}
},
"total": {
"type": "number"
},
"detachable": {
"type": "number"
}
},
"required": [
"items",
"total",
"detachable"
]
},
"deliveries": {
"type": "object",
"properties": {
"total": {
"type": "number"
}
},
"required": [
"total"
]
},
"quota_bytes": {
"type": "number"
}
},
"required": [
"assets",
"uses",
"deliveries",
"quota_bytes"
]
},
"bindings": {
"type": "string"
},
"transforms": {
"type": "array",
"items": {
"type": "object",
"properties": {
"stage": {
"type": "string",
"x-extensible-enum": [
"ingest",
"derive",
"deliver"
]
},
"processor": {
"type": "string"
},
"params": {
"type": "object",
"properties": {
"level": {
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"position": {
"type": "number"
}
},
"required": [
"stage",
"processor",
"params",
"position"
]
}
},
"deliveries": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"asset_id": {
"type": "string"
},
"customer_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"member_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"intent": {
"type": "string",
"x-extensible-enum": [
"preview",
"download",
"stream"
]
},
"channel": {
"type": "string",
"x-extensible-enum": [
"api",
"web",
"mcp",
"feed"
]
},
"issued_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"max_uses": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"used_count": {
"type": "number"
},
"used_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"asset_id",
"customer_id",
"member_id",
"intent",
"channel",
"issued_at",
"expires_at",
"revoked_at",
"max_uses",
"used_count",
"used_at"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"uses": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"attachment_id": {
"type": "string"
},
"asset_id": {
"type": "string"
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"entry",
"store",
"quiz",
"certificate",
"page",
"holding",
"notification"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"detachable": {
"type": "boolean"
}
},
"required": [
"attachment_id",
"asset_id",
"role",
"delivery",
"target",
"detachable"
]
}
},
"total": {
"type": "number"
},
"detachable": {
"type": "number"
}
},
"required": [
"items",
"total",
"detachable"
]
},
"children": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "string"
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"lineage",
"bindings",
"transforms",
"deliveries",
"uses",
"children",
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
}PATCH/v1/stores/{store}/assets/{asset}
Updates a file's name, title and description. Scope file:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
asset | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"locator": {
"description": "A link's URL; only a link held elsewhere takes one.",
"type": "string",
"minLength": 1,
"maxLength": 100000
},
"security": {
"description": "The protection a stored PDF or spreadsheet is delivered with; null takes it off.",
"anyOf": [
{
"type": "string",
"enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"pattern": "^[a-z0-9][a-z0-9-]*$"
},
"title": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 2000
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
},
"additionalProperties": false
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
],
"additionalProperties": false
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"enforcement": {
"type": "string",
"enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string",
"maxLength": 128,
"pattern": "^\\s*(?:[a-zA-Z0-9][a-zA-Z0-9!#$&^_.+-]*\\/[a-zA-Z0-9][a-zA-Z0-9!#$&^_.+-]*(?:([\\t ]*;)(?:([\\t ]*)([!#$%&'*+.^_`|~0-9A-Za-z-]+)(=(?:[!#$%&'*+.^_`|~0-9A-Za-z-]+|\"(?:[\\t \\x21\\x23-\\x5b\\x5d-\\x7e]|\\\\[\\t\\x20-\\x7e])*\")))?)*)?\\s*$"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 16
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
}
},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"transforms": {
"type": "array",
"items": {
"type": "object",
"properties": {
"stage": {
"type": "string",
"x-extensible-enum": [
"ingest",
"derive",
"deliver"
]
},
"processor": {
"type": "string"
},
"params": {
"type": "object",
"properties": {
"level": {
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"position": {
"type": "number"
}
},
"required": [
"stage",
"processor",
"params",
"position"
]
}
},
"deliveries": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"asset_id": {
"type": "string"
},
"customer_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"member_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"intent": {
"type": "string",
"x-extensible-enum": [
"preview",
"download",
"stream"
]
},
"channel": {
"type": "string",
"x-extensible-enum": [
"api",
"web",
"mcp",
"feed"
]
},
"issued_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"max_uses": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"used_count": {
"type": "number"
},
"used_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"asset_id",
"customer_id",
"member_id",
"intent",
"channel",
"issued_at",
"expires_at",
"revoked_at",
"max_uses",
"used_count",
"used_at"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"uses": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"attachment_id": {
"type": "string"
},
"asset_id": {
"type": "string"
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"entry",
"store",
"quiz",
"certificate",
"page",
"holding",
"notification"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"detachable": {
"type": "boolean"
}
},
"required": [
"attachment_id",
"asset_id",
"role",
"delivery",
"target",
"detachable"
]
}
},
"total": {
"type": "number"
},
"detachable": {
"type": "number"
}
},
"required": [
"items",
"total",
"detachable"
]
},
"children": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "string"
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"transforms",
"deliveries",
"uses",
"children",
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
}DELETE/v1/stores/{store}/assets/{asset}
Deletes a file nothing uses. Scope file:delete.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
asset | path | required | |
detach | query | ||
bindings | query | The digest getAsset answers. | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
200
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"deleted": {
"type": "boolean",
"const": true
}
},
"required": [
"id",
"deleted"
]
}GET/v1/stores/{store}/quota
Reads the store's storage use against its plan's allowance. Scope file:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
200
Schema
{
"type": "object",
"properties": {
"used_bytes": {
"type": "number"
},
"assets": {
"type": "number"
},
"allowance_bytes": {
"type": "number"
},
"available_bytes": {
"type": "number"
},
"by_type": {
"type": "object",
"properties": {
"video": {
"type": "object",
"properties": {
"bytes": {
"type": "number"
},
"assets": {
"type": "number"
}
},
"required": [
"bytes",
"assets"
]
},
"audio": {
"type": "object",
"properties": {
"bytes": {
"type": "number"
},
"assets": {
"type": "number"
}
},
"required": [
"bytes",
"assets"
]
},
"image": {
"type": "object",
"properties": {
"bytes": {
"type": "number"
},
"assets": {
"type": "number"
}
},
"required": [
"bytes",
"assets"
]
},
"document": {
"type": "object",
"properties": {
"bytes": {
"type": "number"
},
"assets": {
"type": "number"
}
},
"required": [
"bytes",
"assets"
]
},
"other": {
"type": "object",
"properties": {
"bytes": {
"type": "number"
},
"assets": {
"type": "number"
}
},
"required": [
"bytes",
"assets"
]
}
},
"required": [
"video",
"audio",
"image",
"document",
"other"
]
},
"by_enforcement": {
"type": "object",
"properties": {
"public": {
"type": "object",
"properties": {
"bytes": {
"type": "number"
},
"assets": {
"type": "number"
}
},
"required": [
"bytes",
"assets"
]
},
"external": {
"type": "object",
"properties": {
"bytes": {
"type": "number"
},
"assets": {
"type": "number"
}
},
"required": [
"bytes",
"assets"
]
},
"signed": {
"type": "object",
"properties": {
"bytes": {
"type": "number"
},
"assets": {
"type": "number"
}
},
"required": [
"bytes",
"assets"
]
}
},
"required": [
"public",
"external",
"signed"
]
},
"by_destination": {
"type": "object",
"properties": {
"product": {
"type": "object",
"properties": {
"bytes": {
"type": "number"
},
"assets": {
"type": "number"
}
},
"required": [
"bytes",
"assets"
]
},
"entry": {
"type": "object",
"properties": {
"bytes": {
"type": "number"
},
"assets": {
"type": "number"
}
},
"required": [
"bytes",
"assets"
]
},
"store": {
"type": "object",
"properties": {
"bytes": {
"type": "number"
},
"assets": {
"type": "number"
}
},
"required": [
"bytes",
"assets"
]
},
"quiz": {
"type": "object",
"properties": {
"bytes": {
"type": "number"
},
"assets": {
"type": "number"
}
},
"required": [
"bytes",
"assets"
]
},
"certificate": {
"type": "object",
"properties": {
"bytes": {
"type": "number"
},
"assets": {
"type": "number"
}
},
"required": [
"bytes",
"assets"
]
},
"page": {
"type": "object",
"properties": {
"bytes": {
"type": "number"
},
"assets": {
"type": "number"
}
},
"required": [
"bytes",
"assets"
]
},
"holding": {
"type": "object",
"properties": {
"bytes": {
"type": "number"
},
"assets": {
"type": "number"
}
},
"required": [
"bytes",
"assets"
]
},
"notification": {
"type": "object",
"properties": {
"bytes": {
"type": "number"
},
"assets": {
"type": "number"
}
},
"required": [
"bytes",
"assets"
]
}
},
"required": [
"product",
"entry",
"store",
"quiz",
"certificate",
"page",
"holding",
"notification"
]
},
"unused": {
"type": "object",
"properties": {
"bytes": {
"type": "number"
},
"assets": {
"type": "number"
}
},
"required": [
"bytes",
"assets"
]
}
},
"required": [
"used_bytes",
"assets",
"allowance_bytes",
"available_bytes",
"by_type",
"by_enforcement",
"by_destination",
"unused"
]
}POST/v1/stores/{store}/uploads
Reserves a file and answers where to upload its bytes. Scope file:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
Body
Schema
{
"type": "object",
"properties": {
"storage": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"pattern": "^[a-z0-9][a-z0-9-]*$"
},
"title": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"mime": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9!#$&^_.+-]*\\/[a-zA-Z0-9][a-zA-Z0-9!#$&^_.+-]*$"
},
"bytes": {
"type": "integer",
"minimum": 1,
"maximum": 5368709120
},
"ext": {
"description": "The file's own extension; the mime's usual one when absent or null.",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 16,
"pattern": "^[a-zA-Z0-9]+$"
},
{
"type": "null"
}
]
},
"enforcement": {
"description": "What the bucket already decides, so only the enforcements a bucket has.",
"type": "string",
"enum": [
"public",
"signed"
]
}
},
"required": [
"storage",
"name",
"mime",
"bytes"
],
"additionalProperties": false
}201
Schema
{
"type": "object",
"properties": {
"asset": {
"type": "object",
"properties": {
"transforms": {
"type": "array",
"items": {
"type": "object",
"properties": {
"stage": {
"type": "string",
"x-extensible-enum": [
"ingest",
"derive",
"deliver"
]
},
"processor": {
"type": "string"
},
"params": {
"type": "object",
"properties": {
"level": {
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"position": {
"type": "number"
}
},
"required": [
"stage",
"processor",
"params",
"position"
]
}
},
"deliveries": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"asset_id": {
"type": "string"
},
"customer_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"member_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"intent": {
"type": "string",
"x-extensible-enum": [
"preview",
"download",
"stream"
]
},
"channel": {
"type": "string",
"x-extensible-enum": [
"api",
"web",
"mcp",
"feed"
]
},
"issued_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"max_uses": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"used_count": {
"type": "number"
},
"used_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"asset_id",
"customer_id",
"member_id",
"intent",
"channel",
"issued_at",
"expires_at",
"revoked_at",
"max_uses",
"used_count",
"used_at"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"uses": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"attachment_id": {
"type": "string"
},
"asset_id": {
"type": "string"
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"entry",
"store",
"quiz",
"certificate",
"page",
"holding",
"notification"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"detachable": {
"type": "boolean"
}
},
"required": [
"attachment_id",
"asset_id",
"role",
"delivery",
"target",
"detachable"
]
}
},
"total": {
"type": "number"
},
"detachable": {
"type": "number"
}
},
"required": [
"items",
"total",
"detachable"
]
},
"children": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "string"
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"transforms",
"deliveries",
"uses",
"children",
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
},
"upload": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"method": {
"type": "string",
"x-extensible-enum": [
"PUT"
]
},
"headers": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "string"
}
},
"expires_at": {
"type": "string"
}
},
"required": [
"url",
"method",
"headers",
"expires_at"
]
}
},
"required": [
"asset",
"upload"
]
}POST/v1/stores/{store}/assets/{asset}/complete
Marks an upload done once its bytes are in place. Scope file:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
asset | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"transforms": {
"type": "array",
"items": {
"type": "object",
"properties": {
"stage": {
"type": "string",
"x-extensible-enum": [
"ingest",
"derive",
"deliver"
]
},
"processor": {
"type": "string"
},
"params": {
"type": "object",
"properties": {
"level": {
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"position": {
"type": "number"
}
},
"required": [
"stage",
"processor",
"params",
"position"
]
}
},
"deliveries": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"asset_id": {
"type": "string"
},
"customer_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"member_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"intent": {
"type": "string",
"x-extensible-enum": [
"preview",
"download",
"stream"
]
},
"channel": {
"type": "string",
"x-extensible-enum": [
"api",
"web",
"mcp",
"feed"
]
},
"issued_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"max_uses": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"used_count": {
"type": "number"
},
"used_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"asset_id",
"customer_id",
"member_id",
"intent",
"channel",
"issued_at",
"expires_at",
"revoked_at",
"max_uses",
"used_count",
"used_at"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"uses": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"attachment_id": {
"type": "string"
},
"asset_id": {
"type": "string"
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"entry",
"store",
"quiz",
"certificate",
"page",
"holding",
"notification"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"detachable": {
"type": "boolean"
}
},
"required": [
"attachment_id",
"asset_id",
"role",
"delivery",
"target",
"detachable"
]
}
},
"total": {
"type": "number"
},
"detachable": {
"type": "number"
}
},
"required": [
"items",
"total",
"detachable"
]
},
"children": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "string"
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"transforms",
"deliveries",
"uses",
"children",
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
}POST/v1/stores/{store}/assets/{asset}/cancel
Cancels an upload that was never completed. Scope file:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
asset | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"deleted": {
"type": "boolean",
"const": true
}
},
"required": [
"id",
"deleted"
]
}POST/v1/stores/{store}/assets/{asset}/url
Mints a short-lived URL to a file's bytes. Scope file:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
asset | path | required |
Body
Schema
{
"type": "object",
"properties": {
"disposition": {
"type": "string",
"enum": [
"inline",
"attachment"
]
},
"expires_in": {
"type": "integer",
"minimum": 1,
"maximum": 604800
}
},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"url": {
"type": "string"
},
"expires_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"url",
"expires_at"
]
}POST/v1/stores/{store}/assets/{asset}/size
Records a file's measured pixel size or length, keeping its other metadata. Scope file:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
asset | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"width": {
"description": "Pixels, sent with `height`.",
"type": "integer",
"minimum": 1
},
"height": {
"description": "Pixels, sent with `width`.",
"type": "integer",
"minimum": 1
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
}
},
"additionalProperties": false
}201
Schema
{
"type": "object",
"properties": {
"transforms": {
"type": "array",
"items": {
"type": "object",
"properties": {
"stage": {
"type": "string",
"x-extensible-enum": [
"ingest",
"derive",
"deliver"
]
},
"processor": {
"type": "string"
},
"params": {
"type": "object",
"properties": {
"level": {
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"position": {
"type": "number"
}
},
"required": [
"stage",
"processor",
"params",
"position"
]
}
},
"deliveries": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"asset_id": {
"type": "string"
},
"customer_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"member_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"intent": {
"type": "string",
"x-extensible-enum": [
"preview",
"download",
"stream"
]
},
"channel": {
"type": "string",
"x-extensible-enum": [
"api",
"web",
"mcp",
"feed"
]
},
"issued_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"max_uses": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"used_count": {
"type": "number"
},
"used_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"asset_id",
"customer_id",
"member_id",
"intent",
"channel",
"issued_at",
"expires_at",
"revoked_at",
"max_uses",
"used_count",
"used_at"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"uses": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"attachment_id": {
"type": "string"
},
"asset_id": {
"type": "string"
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"entry",
"store",
"quiz",
"certificate",
"page",
"holding",
"notification"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"detachable": {
"type": "boolean"
}
},
"required": [
"attachment_id",
"asset_id",
"role",
"delivery",
"target",
"detachable"
]
}
},
"total": {
"type": "number"
},
"detachable": {
"type": "number"
}
},
"required": [
"items",
"total",
"detachable"
]
},
"children": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "string"
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"transforms",
"deliveries",
"uses",
"children",
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
}POST/v1/stores/{store}/assets/{asset}/move
Moves a file between public and private storage. Scope file:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
asset | path | required |
Body
Schema
{
"type": "object",
"properties": {
"storage": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"required": [
"storage"
],
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"transforms": {
"type": "array",
"items": {
"type": "object",
"properties": {
"stage": {
"type": "string",
"x-extensible-enum": [
"ingest",
"derive",
"deliver"
]
},
"processor": {
"type": "string"
},
"params": {
"type": "object",
"properties": {
"level": {
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"position": {
"type": "number"
}
},
"required": [
"stage",
"processor",
"params",
"position"
]
}
},
"deliveries": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"asset_id": {
"type": "string"
},
"customer_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"member_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"intent": {
"type": "string",
"x-extensible-enum": [
"preview",
"download",
"stream"
]
},
"channel": {
"type": "string",
"x-extensible-enum": [
"api",
"web",
"mcp",
"feed"
]
},
"issued_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"max_uses": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"used_count": {
"type": "number"
},
"used_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"asset_id",
"customer_id",
"member_id",
"intent",
"channel",
"issued_at",
"expires_at",
"revoked_at",
"max_uses",
"used_count",
"used_at"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"uses": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"attachment_id": {
"type": "string"
},
"asset_id": {
"type": "string"
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"entry",
"store",
"quiz",
"certificate",
"page",
"holding",
"notification"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"detachable": {
"type": "boolean"
}
},
"required": [
"attachment_id",
"asset_id",
"role",
"delivery",
"target",
"detachable"
]
}
},
"total": {
"type": "number"
},
"detachable": {
"type": "number"
}
},
"required": [
"items",
"total",
"detachable"
]
},
"children": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "string"
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"transforms",
"deliveries",
"uses",
"children",
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
}POST/v1/stores/{store}/assets/{asset}/replace
Replaces a file's bytes with another upload's, keeping where it is used. Scope file:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
asset | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"upload": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"required": [
"upload"
],
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"transforms": {
"type": "array",
"items": {
"type": "object",
"properties": {
"stage": {
"type": "string",
"x-extensible-enum": [
"ingest",
"derive",
"deliver"
]
},
"processor": {
"type": "string"
},
"params": {
"type": "object",
"properties": {
"level": {
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"position": {
"type": "number"
}
},
"required": [
"stage",
"processor",
"params",
"position"
]
}
},
"deliveries": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"asset_id": {
"type": "string"
},
"customer_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"member_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"intent": {
"type": "string",
"x-extensible-enum": [
"preview",
"download",
"stream"
]
},
"channel": {
"type": "string",
"x-extensible-enum": [
"api",
"web",
"mcp",
"feed"
]
},
"issued_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"max_uses": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"used_count": {
"type": "number"
},
"used_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"asset_id",
"customer_id",
"member_id",
"intent",
"channel",
"issued_at",
"expires_at",
"revoked_at",
"max_uses",
"used_count",
"used_at"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"uses": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"attachment_id": {
"type": "string"
},
"asset_id": {
"type": "string"
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"entry",
"store",
"quiz",
"certificate",
"page",
"holding",
"notification"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"detachable": {
"type": "boolean"
}
},
"required": [
"attachment_id",
"asset_id",
"role",
"delivery",
"target",
"detachable"
]
}
},
"total": {
"type": "number"
},
"detachable": {
"type": "number"
}
},
"required": [
"items",
"total",
"detachable"
]
},
"children": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "string"
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"transforms",
"deliveries",
"uses",
"children",
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
}GET/v1/stores/{store}/products/{product}/file_stats
Counts a product's files and links by kind. Scope file:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
200
Schema
{
"type": "object",
"properties": {
"files": {
"type": "number"
},
"links": {
"type": "number"
},
"bytes": {
"type": "number"
}
},
"required": [
"files",
"links",
"bytes"
]
}GET/v1/stores/{store}/asset_deliveries
Pages the deliveries of files to customers. Scope file:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | ||
direction | query | ||
limit | query | ||
cursor | query | ||
count | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"asset_id": {
"type": "string"
},
"customer_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"member_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"intent": {
"type": "string",
"x-extensible-enum": [
"preview",
"download",
"stream"
]
},
"channel": {
"type": "string",
"x-extensible-enum": [
"api",
"web",
"mcp",
"feed"
]
},
"issued_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"max_uses": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"used_count": {
"type": "number"
},
"used_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"asset_id",
"customer_id",
"member_id",
"intent",
"channel",
"issued_at",
"expires_at",
"revoked_at",
"max_uses",
"used_count",
"used_at"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}GET/v1/stores/{store}/asset_uses
Pages where files are used. Scope file:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | ||
direction | query | ||
limit | query | ||
cursor | query | ||
count | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"attachment_id": {
"type": "string"
},
"asset_id": {
"type": "string"
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"entry",
"store",
"quiz",
"certificate",
"page",
"holding",
"notification"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"detachable": {
"type": "boolean"
}
},
"required": [
"attachment_id",
"asset_id",
"role",
"delivery",
"target",
"detachable"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}integration
GET/v1/stores/{store}/integrations
Lists the store's integrations and their settings. Scope integration:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
200
Schema
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"kind": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"config_schema": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"config": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"secret_set": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "boolean"
}
}
},
"required": [
"id",
"name",
"description",
"kind",
"enabled",
"config_schema",
"config",
"secret_set"
]
}
}PUT/v1/stores/{store}/integrations/{integration}
Sets or clears an integration's settings. Scope integration:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
integration | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"config": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"enabled": {
"type": "boolean"
}
},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"kind": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"config_schema": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"secret_set": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "boolean"
}
}
},
"required": [
"id",
"name",
"description",
"kind",
"enabled",
"config_schema",
"secret_set"
]
}organization
GET/v1/stores/{store}/organization
Reads the store's business. Scope organization:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
200
Schema
{
"type": "object",
"properties": {
"plan": {
"anyOf": [
{
"type": "object",
"properties": {
"plan": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"tier": {
"type": "string",
"x-extensible-enum": [
"start",
"plus",
"ultra",
"lite",
"pro",
"enterprise"
]
},
"price_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"quantity": {
"type": "number"
},
"storage_bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"member_limit": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"active",
"past_due",
"cancelled"
]
},
"valid_from": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"valid_until": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"cancelled_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"source_kind": {
"type": "string",
"x-extensible-enum": [
"checkout",
"import",
"manual"
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"plan",
"name",
"tier",
"price_ref",
"quantity",
"storage_bytes",
"member_limit",
"status",
"valid_from",
"valid_until",
"cancelled_at",
"source_kind",
"updated_at"
]
},
{
"type": "null"
}
]
},
"legacy_billing": {
"description": "Legacy bills the business until cutover, so it opens stores without a plan of ours.",
"type": "boolean"
},
"has_customer": {
"description": "Whether the business is a customer at Stripe, so its billing portal can open.",
"type": "boolean"
},
"fee": {
"anyOf": [
{
"type": "object",
"properties": {
"rate_bps": {
"type": "number"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"rate_bps",
"updated_at"
]
},
{
"type": "null"
}
]
},
"connections": {
"type": "array",
"items": {
"type": "object",
"properties": {
"processor": {
"type": "string",
"x-extensible-enum": [
"stripe"
]
},
"external_ref": {
"type": "string"
},
"status": {
"type": "string",
"x-extensible-enum": [
"past_due",
"enabled",
"onboard",
"currently_due"
]
},
"enabled": {
"type": "boolean"
},
"held": {
"type": "boolean"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"processor",
"external_ref",
"status",
"enabled",
"held",
"updated_at"
]
}
},
"stores": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"locale": {
"type": "string"
},
"location": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"wnam",
"enam",
"sam",
"weur",
"eeur",
"apac",
"apac-ne",
"apac-se",
"oc",
"afr",
"me"
]
},
{
"type": "null"
}
]
},
"hostname": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"swatch": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"emerald",
"blue",
"teal",
"indigo",
"purple",
"pink",
"red",
"orange",
"yellow",
"gray"
]
},
{
"type": "null"
}
]
},
"icon": {
"type": "string"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"locale",
"location",
"hostname",
"swatch",
"icon",
"created_at"
]
}
},
"total": {
"type": "number"
},
"limit": {
"type": "number"
}
},
"required": [
"items",
"total",
"limit"
]
},
"members": {
"type": "object",
"properties": {
"total": {
"type": "number"
},
"limit": {
"type": "number"
}
},
"required": [
"total",
"limit"
]
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"short_name": {
"type": "string"
},
"email": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"swatch": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"emerald",
"blue",
"teal",
"indigo",
"purple",
"pink",
"red",
"orange",
"yellow",
"gray"
]
},
{
"type": "null"
}
]
},
"logo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"plan",
"legacy_billing",
"has_customer",
"fee",
"connections",
"stores",
"members",
"id",
"name",
"short_name",
"email",
"description",
"swatch",
"logo",
"created_at"
]
}PATCH/v1/stores/{store}/organization
Updates the business's name and details. Scope organization:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
Body
Schema
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"short_name": {
"type": "string",
"minLength": 3,
"maxLength": 63,
"pattern": "^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$"
},
"email": {
"type": "string",
"minLength": 1,
"maxLength": 254,
"pattern": "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"
},
"description": {
"anyOf": [
{
"type": "string",
"minLength": 0,
"maxLength": 2000
},
{
"type": "null"
}
]
},
"swatch": {
"anyOf": [
{
"type": "string",
"enum": [
"emerald",
"blue",
"teal",
"indigo",
"purple",
"pink",
"red",
"orange",
"yellow",
"gray"
]
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"plan": {
"anyOf": [
{
"type": "object",
"properties": {
"plan": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"tier": {
"type": "string",
"x-extensible-enum": [
"start",
"plus",
"ultra",
"lite",
"pro",
"enterprise"
]
},
"price_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"quantity": {
"type": "number"
},
"storage_bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"member_limit": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"active",
"past_due",
"cancelled"
]
},
"valid_from": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"valid_until": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"cancelled_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"source_kind": {
"type": "string",
"x-extensible-enum": [
"checkout",
"import",
"manual"
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"plan",
"name",
"tier",
"price_ref",
"quantity",
"storage_bytes",
"member_limit",
"status",
"valid_from",
"valid_until",
"cancelled_at",
"source_kind",
"updated_at"
]
},
{
"type": "null"
}
]
},
"legacy_billing": {
"description": "Legacy bills the business until cutover, so it opens stores without a plan of ours.",
"type": "boolean"
},
"has_customer": {
"description": "Whether the business is a customer at Stripe, so its billing portal can open.",
"type": "boolean"
},
"fee": {
"anyOf": [
{
"type": "object",
"properties": {
"rate_bps": {
"type": "number"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"rate_bps",
"updated_at"
]
},
{
"type": "null"
}
]
},
"connections": {
"type": "array",
"items": {
"type": "object",
"properties": {
"processor": {
"type": "string",
"x-extensible-enum": [
"stripe"
]
},
"external_ref": {
"type": "string"
},
"status": {
"type": "string",
"x-extensible-enum": [
"past_due",
"enabled",
"onboard",
"currently_due"
]
},
"enabled": {
"type": "boolean"
},
"held": {
"type": "boolean"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"processor",
"external_ref",
"status",
"enabled",
"held",
"updated_at"
]
}
},
"stores": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"locale": {
"type": "string"
},
"location": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"wnam",
"enam",
"sam",
"weur",
"eeur",
"apac",
"apac-ne",
"apac-se",
"oc",
"afr",
"me"
]
},
{
"type": "null"
}
]
},
"hostname": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"swatch": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"emerald",
"blue",
"teal",
"indigo",
"purple",
"pink",
"red",
"orange",
"yellow",
"gray"
]
},
{
"type": "null"
}
]
},
"icon": {
"type": "string"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"locale",
"location",
"hostname",
"swatch",
"icon",
"created_at"
]
}
},
"total": {
"type": "number"
},
"limit": {
"type": "number"
}
},
"required": [
"items",
"total",
"limit"
]
},
"members": {
"type": "object",
"properties": {
"total": {
"type": "number"
},
"limit": {
"type": "number"
}
},
"required": [
"total",
"limit"
]
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"short_name": {
"type": "string"
},
"email": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"swatch": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"emerald",
"blue",
"teal",
"indigo",
"purple",
"pink",
"red",
"orange",
"yellow",
"gray"
]
},
{
"type": "null"
}
]
},
"logo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"plan",
"legacy_billing",
"has_customer",
"fee",
"connections",
"stores",
"members",
"id",
"name",
"short_name",
"email",
"description",
"swatch",
"logo",
"created_at"
]
}PUT/v1/stores/{store}/organization/logo
Sets or clears the business's logo from a file. Scope organization:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
Body
Schema
{
"type": "object",
"properties": {
"image": {
"anyOf": [
{
"type": "string",
"contentEncoding": "base64"
},
{
"type": "string",
"contentEncoding": "base64"
},
{
"type": "null"
}
]
}
},
"required": [
"image"
],
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"plan": {
"anyOf": [
{
"type": "object",
"properties": {
"plan": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"tier": {
"type": "string",
"x-extensible-enum": [
"start",
"plus",
"ultra",
"lite",
"pro",
"enterprise"
]
},
"price_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"quantity": {
"type": "number"
},
"storage_bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"member_limit": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"active",
"past_due",
"cancelled"
]
},
"valid_from": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"valid_until": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"cancelled_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"source_kind": {
"type": "string",
"x-extensible-enum": [
"checkout",
"import",
"manual"
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"plan",
"name",
"tier",
"price_ref",
"quantity",
"storage_bytes",
"member_limit",
"status",
"valid_from",
"valid_until",
"cancelled_at",
"source_kind",
"updated_at"
]
},
{
"type": "null"
}
]
},
"legacy_billing": {
"description": "Legacy bills the business until cutover, so it opens stores without a plan of ours.",
"type": "boolean"
},
"has_customer": {
"description": "Whether the business is a customer at Stripe, so its billing portal can open.",
"type": "boolean"
},
"fee": {
"anyOf": [
{
"type": "object",
"properties": {
"rate_bps": {
"type": "number"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"rate_bps",
"updated_at"
]
},
{
"type": "null"
}
]
},
"connections": {
"type": "array",
"items": {
"type": "object",
"properties": {
"processor": {
"type": "string",
"x-extensible-enum": [
"stripe"
]
},
"external_ref": {
"type": "string"
},
"status": {
"type": "string",
"x-extensible-enum": [
"past_due",
"enabled",
"onboard",
"currently_due"
]
},
"enabled": {
"type": "boolean"
},
"held": {
"type": "boolean"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"processor",
"external_ref",
"status",
"enabled",
"held",
"updated_at"
]
}
},
"stores": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"locale": {
"type": "string"
},
"location": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"wnam",
"enam",
"sam",
"weur",
"eeur",
"apac",
"apac-ne",
"apac-se",
"oc",
"afr",
"me"
]
},
{
"type": "null"
}
]
},
"hostname": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"swatch": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"emerald",
"blue",
"teal",
"indigo",
"purple",
"pink",
"red",
"orange",
"yellow",
"gray"
]
},
{
"type": "null"
}
]
},
"icon": {
"type": "string"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"locale",
"location",
"hostname",
"swatch",
"icon",
"created_at"
]
}
},
"total": {
"type": "number"
},
"limit": {
"type": "number"
}
},
"required": [
"items",
"total",
"limit"
]
},
"members": {
"type": "object",
"properties": {
"total": {
"type": "number"
},
"limit": {
"type": "number"
}
},
"required": [
"total",
"limit"
]
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"short_name": {
"type": "string"
},
"email": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"swatch": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"emerald",
"blue",
"teal",
"indigo",
"purple",
"pink",
"red",
"orange",
"yellow",
"gray"
]
},
{
"type": "null"
}
]
},
"logo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"plan",
"legacy_billing",
"has_customer",
"fee",
"connections",
"stores",
"members",
"id",
"name",
"short_name",
"email",
"description",
"swatch",
"logo",
"created_at"
]
}GET/v1/stores/{store}/balance
Reads the business's payout balance. Scope organization:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
200
Schema
{
"type": "object",
"properties": {
"available": {
"type": "array",
"items": {
"type": "object",
"properties": {
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
}
},
"required": [
"amount",
"currency",
"exponent"
]
}
},
"pending": {
"type": "array",
"items": {
"type": "object",
"properties": {
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
}
},
"required": [
"amount",
"currency",
"exponent"
]
}
},
"in_transit": {
"type": "array",
"items": {
"type": "object",
"properties": {
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
}
},
"required": [
"amount",
"currency",
"exponent"
]
}
},
"next_payouts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"currency": {
"type": "string"
},
"arrives_at": {
"type": "string"
}
},
"required": [
"currency",
"arrives_at"
]
}
},
"complete": {
"type": "boolean"
}
},
"required": [
"available",
"pending",
"in_transit",
"next_payouts",
"complete"
]
}GET/v1/stores/{store}/payouts
Lists the business's payouts. Scope organization:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
limit | query | ||
cursor | query | ||
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string"
},
"method": {
"type": "string"
},
"type": {
"type": "string",
"x-extensible-enum": [
"bank_account",
"card"
]
},
"arrives_at": {
"type": "string"
},
"created_at": {
"type": "string"
},
"destination": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"bank_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"last4": {
"type": "string"
},
"currency": {
"type": "string"
}
},
"required": [
"id",
"bank_name",
"last4",
"currency"
]
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"bank_name": {
"type": "null"
},
"last4": {
"type": "string"
},
"currency": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"bank_name",
"last4",
"currency"
]
},
{
"type": "null"
}
]
},
"statement_descriptor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"failure_message": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"amount",
"currency",
"exponent",
"status",
"method",
"type",
"arrives_at",
"created_at",
"destination",
"statement_descriptor",
"failure_message"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}GET/v1/stores/{store}/notifications
Pages the store's customer notifications. Scope organization:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | ||
direction | query | ||
limit | query | ||
cursor | query | ||
count | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"event": {
"type": "string"
},
"target": {
"anyOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"entry"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
{
"type": "null"
}
]
},
"locale": {
"type": "string"
},
"channel": {
"type": "string",
"x-extensible-enum": [
"email",
"webhook"
]
},
"enabled": {
"type": "boolean"
},
"body": {
"anyOf": [
{
"type": "object",
"properties": {
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
]
}
},
"required": [
"asset"
]
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"event",
"target",
"locale",
"channel",
"enabled",
"body"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}POST/v1/stores/{store}/notifications
Creates a customer notification for an event. Scope organization:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"event": {
"type": "string",
"enum": [
"products.unlocked",
"discounts.unlocked",
"refund.processed",
"affiliate.earned",
"subscription.created",
"subscription.renewed",
"subscription.reminder",
"subscription.plan_changed",
"subscription.payment_failed",
"subscription.past_due",
"subscription.unpaid",
"subscription.canceled",
"subscription.reactivated"
]
},
"target": {
"anyOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"product",
"entry"
]
},
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"kind",
"id"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"locale": {
"type": "string",
"minLength": 1,
"maxLength": 5,
"pattern": "^[a-z]{2}(?:-[A-Z]{2})?$"
},
"channel": {
"type": "string",
"enum": [
"email",
"webhook"
]
},
"enabled": {
"type": "boolean"
},
"body": {
"description": "The template: an asset attached as the notification's body.",
"anyOf": [
{
"type": "object",
"properties": {
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"required": [
"asset"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"event"
],
"additionalProperties": false
}201
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"event": {
"type": "string"
},
"target": {
"anyOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"entry"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
{
"type": "null"
}
]
},
"locale": {
"type": "string"
},
"channel": {
"type": "string",
"x-extensible-enum": [
"email",
"webhook"
]
},
"enabled": {
"type": "boolean"
},
"body": {
"anyOf": [
{
"type": "object",
"properties": {
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
]
}
},
"required": [
"asset"
]
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"event",
"target",
"locale",
"channel",
"enabled",
"body"
]
}PATCH/v1/stores/{store}/notifications/{notification}
Updates a notification's template or whether it is enabled. Scope organization:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
notification | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"body": {
"description": "The template: an asset attached as the notification's body.",
"anyOf": [
{
"type": "object",
"properties": {
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"required": [
"asset"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"enabled": {
"type": "boolean"
}
},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"event": {
"type": "string"
},
"target": {
"anyOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"entry"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
{
"type": "null"
}
]
},
"locale": {
"type": "string"
},
"channel": {
"type": "string",
"x-extensible-enum": [
"email",
"webhook"
]
},
"enabled": {
"type": "boolean"
},
"body": {
"anyOf": [
{
"type": "object",
"properties": {
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
]
}
},
"required": [
"asset"
]
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"event",
"target",
"locale",
"channel",
"enabled",
"body"
]
}DELETE/v1/stores/{store}/notifications/{notification}
Deletes a notification. Scope organization:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
notification | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
200
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"deleted": {
"type": "boolean",
"const": true
}
},
"required": [
"id",
"deleted"
]
}GET/v1/merchants
Lists the businesses the token may act for, with their stores. Scope organization:read.
| Parameter | In | ||
|---|---|---|---|
merchant | query | An id. | |
store | query | An id. |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"short_name": {
"type": "string"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"scopes": {
"description": "The scopes their membership spells, not narrowed to the credential presented.",
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"swatch": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"emerald",
"blue",
"teal",
"indigo",
"purple",
"pink",
"red",
"orange",
"yellow",
"gray"
]
},
{
"type": "null"
}
]
},
"logo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"stores": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"hostname": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"swatch": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"icon": {
"type": "string"
}
},
"required": [
"id",
"name",
"hostname",
"swatch",
"icon"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
}
},
"required": [
"id",
"name",
"short_name",
"created_at",
"scopes",
"swatch",
"logo",
"stores"
]
}
},
"total": {
"type": "number"
},
"owns_suspended": {
"type": "boolean"
}
},
"required": [
"items",
"total",
"owns_suspended"
]
}portfolio
GET/v1/stores/{store}/products/{product}/portfolio
Reads a portfolio product's book: settings, metrics and value. Scope portfolio:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
200
Schema
{
"type": "object",
"properties": {
"product": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
"holdings": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"portfolio_id": {
"type": "string"
},
"symbol": {
"type": "string"
},
"shares": {
"type": "number"
},
"avg_cost": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"price_currency": {
"type": "string"
},
"price_exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"symbol_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"currency": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"note": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"removed_note": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"removed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"id",
"portfolio_id",
"symbol",
"shares",
"avg_cost",
"price_currency",
"price_exponent",
"name",
"symbol_type",
"currency",
"note",
"removed_note",
"removed_at",
"updated_at",
"metadata"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"events": {
"type": "number"
},
"snapshots": {
"type": "number"
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"show_absolute_values": {
"description": "Amounts, not only percentages.",
"type": "boolean"
},
"locked_chart_delay": {
"type": "string",
"x-extensible-enum": [
"week",
"month",
"none",
"current_quarter"
]
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"product",
"holdings",
"events",
"snapshots",
"id",
"product_id",
"currency",
"exponent",
"settings",
"created_at"
]
}PATCH/v1/stores/{store}/products/{product}/portfolio
Updates a portfolio's settings. Scope portfolio:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"settings": {
"description": "A merge patch over the stored settings: a null removes its key.",
"type": "object",
"properties": {
"show_absolute_values": {
"description": "Amounts, not only percentages.",
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"locked_chart_delay": {
"anyOf": [
{
"type": "string",
"enum": [
"week",
"month",
"none",
"current_quarter"
]
},
{
"type": "null"
}
]
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"currency": {
"description": "Only while the portfolio holds no holding, event or snapshot.",
"type": "string",
"minLength": 3,
"maxLength": 3
}
},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"product": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
"holdings": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"portfolio_id": {
"type": "string"
},
"symbol": {
"type": "string"
},
"shares": {
"type": "number"
},
"avg_cost": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"price_currency": {
"type": "string"
},
"price_exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"symbol_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"currency": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"note": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"removed_note": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"removed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"id",
"portfolio_id",
"symbol",
"shares",
"avg_cost",
"price_currency",
"price_exponent",
"name",
"symbol_type",
"currency",
"note",
"removed_note",
"removed_at",
"updated_at",
"metadata"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"events": {
"type": "number"
},
"snapshots": {
"type": "number"
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"show_absolute_values": {
"description": "Amounts, not only percentages.",
"type": "boolean"
},
"locked_chart_delay": {
"type": "string",
"x-extensible-enum": [
"week",
"month",
"none",
"current_quarter"
]
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"product",
"holdings",
"events",
"snapshots",
"id",
"product_id",
"currency",
"exponent",
"settings",
"created_at"
]
}GET/v1/stores/{store}/products/{product}/portfolio_holdings
Pages a portfolio's holdings. Scope portfolio:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | ||
direction | query | ||
limit | query | ||
cursor | query | ||
count | query | ||
search | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"portfolio_id": {
"type": "string"
},
"symbol": {
"type": "string"
},
"shares": {
"type": "number"
},
"avg_cost": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"price_currency": {
"type": "string"
},
"price_exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"symbol_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"currency": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"note": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"removed_note": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"removed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"id",
"portfolio_id",
"symbol",
"shares",
"avg_cost",
"price_currency",
"price_exponent",
"name",
"symbol_type",
"currency",
"note",
"removed_note",
"removed_at",
"updated_at",
"metadata"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}PATCH/v1/stores/{store}/portfolio_holdings/{holding}
Updates a holding's name and note. Scope portfolio:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
holding | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"name": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"note": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 2000
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"portfolio_id": {
"type": "string"
},
"symbol": {
"type": "string"
},
"shares": {
"type": "number"
},
"avg_cost": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"price_currency": {
"type": "string"
},
"price_exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"symbol_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"currency": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"note": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"removed_note": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"removed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"id",
"portfolio_id",
"symbol",
"shares",
"avg_cost",
"price_currency",
"price_exponent",
"name",
"symbol_type",
"currency",
"note",
"removed_note",
"removed_at",
"updated_at",
"metadata"
]
}GET/v1/stores/{store}/portfolio_holdings/{holding}/announced_files
Lists the files announced with a holding. Scope portfolio:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
holding | path | required |
200
Schema
{
"type": "object",
"properties": {
"asset_ids": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"asset_ids"
]
}GET/v1/stores/{store}/products/{product}/portfolio_events
Pages a portfolio's events: trades, cash and notes. Scope portfolio:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | ||
direction | query | ||
limit | query | ||
cursor | query | ||
count | query | ||
search | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"portfolio_id": {
"type": "string"
},
"symbol": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"type": {
"type": "string"
},
"shares": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"price": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"note": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"effective_date": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"symbol_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"price_currency": {
"type": "string"
},
"price_exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"allocation": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"allocation_change": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"ratio": {
"anyOf": [
{
"type": "object",
"properties": {
"num": {
"type": "number"
},
"den": {
"type": "number"
}
},
"required": [
"num",
"den"
]
},
{
"type": "null"
}
]
},
"occurred_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"recorded_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"source": {
"description": "`manual` for a member's entry, `auto` for the pipeline.",
"type": "string",
"x-extensible-enum": [
"manual",
"auto"
]
},
"recorded_by": {
"description": "The member who recorded a manual entry.",
"type": "string"
},
"file_ids": {
"description": "For a file event, the assets it announces on the holding.",
"type": "array",
"items": {
"type": "string"
}
},
"remediated": {
"description": "A later correction stands in for it.",
"type": "boolean"
},
"kind": {
"description": "For a split, what the ratio alone cannot tell apart.",
"type": "string",
"x-extensible-enum": [
"reverse",
"forward",
"stock_dividend"
]
},
"name": {
"description": "The instrument's name a manual entry named, which a repeat under its key must name alike.",
"type": "string"
},
"notify": {
"description": "A trade that mailed the customers with access.",
"type": "boolean"
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"id",
"portfolio_id",
"symbol",
"type",
"shares",
"price",
"amount",
"note",
"effective_date",
"symbol_type",
"currency",
"exponent",
"price_currency",
"price_exponent",
"allocation",
"allocation_change",
"ratio",
"occurred_at",
"recorded_at",
"metadata"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}POST/v1/stores/{store}/products/{product}/portfolio_events
Records a trade, cash movement or note in a portfolio. Scope portfolio:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
Body
Schema
{
"type": "object",
"anyOf": [
{
"type": "object",
"properties": {
"idempotency_key": {
"description": "The recorder's own key for the event: a repeat answers the event it recorded.",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[A-Za-z0-9_-]+$"
},
{
"type": "null"
}
]
},
"type": {
"type": "string",
"const": "file"
},
"price": {
"anyOf": [
{
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"symbol": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"symbol_type": {
"type": "string",
"enum": [
"stock",
"crypto"
]
},
"file_ids": {
"description": "For a file event, the assets its holding delivers.",
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"minItems": 1,
"maxItems": 100
}
},
"required": [
"type",
"symbol",
"symbol_type",
"file_ids"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"idempotency_key": {
"description": "The recorder's own key for the event: a repeat answers the event it recorded.",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[A-Za-z0-9_-]+$"
},
{
"type": "null"
}
]
},
"type": {
"type": "string",
"const": "buy"
},
"name": {
"description": "The instrument's name, filled onto a holding that has none.",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"currency": {
"description": "What the amounts are in, so a stale send is refused: the portfolio's own; a comment's price may name another.",
"anyOf": [
{
"type": "string",
"minLength": 3,
"maxLength": 3
},
{
"type": "null"
}
]
},
"note": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 2000
},
{
"type": "null"
}
]
},
"notify": {
"description": "For a trade, mail every customer with access to the portfolio.",
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"symbol": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"price": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"shares": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"symbol_type": {
"type": "string",
"enum": [
"stock",
"crypto"
]
},
"amount": {
"type": "null"
}
},
"required": [
"type",
"symbol",
"price",
"shares",
"symbol_type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"idempotency_key": {
"description": "The recorder's own key for the event: a repeat answers the event it recorded.",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[A-Za-z0-9_-]+$"
},
{
"type": "null"
}
]
},
"type": {
"type": "string",
"const": "sell"
},
"name": {
"description": "The instrument's name, filled onto a holding that has none.",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"currency": {
"description": "What the amounts are in, so a stale send is refused: the portfolio's own; a comment's price may name another.",
"anyOf": [
{
"type": "string",
"minLength": 3,
"maxLength": 3
},
{
"type": "null"
}
]
},
"note": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 2000
},
{
"type": "null"
}
]
},
"notify": {
"description": "For a trade, mail every customer with access to the portfolio.",
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"symbol": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"price": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"shares": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"symbol_type": {
"type": "string",
"enum": [
"stock",
"crypto"
]
},
"amount": {
"type": "null"
}
},
"required": [
"type",
"symbol",
"price",
"shares",
"symbol_type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"idempotency_key": {
"description": "The recorder's own key for the event: a repeat answers the event it recorded.",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[A-Za-z0-9_-]+$"
},
{
"type": "null"
}
]
},
"type": {
"type": "string",
"const": "deposit"
},
"currency": {
"description": "What the amounts are in, so a stale send is refused: the portfolio's own; a comment's price may name another.",
"anyOf": [
{
"type": "string",
"minLength": 3,
"maxLength": 3
},
{
"type": "null"
}
]
},
"note": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 2000
},
{
"type": "null"
}
]
},
"amount": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
}
},
"required": [
"type",
"amount"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"idempotency_key": {
"description": "The recorder's own key for the event: a repeat answers the event it recorded.",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[A-Za-z0-9_-]+$"
},
{
"type": "null"
}
]
},
"type": {
"type": "string",
"const": "withdraw"
},
"currency": {
"description": "What the amounts are in, so a stale send is refused: the portfolio's own; a comment's price may name another.",
"anyOf": [
{
"type": "string",
"minLength": 3,
"maxLength": 3
},
{
"type": "null"
}
]
},
"note": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 2000
},
{
"type": "null"
}
]
},
"amount": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
}
},
"required": [
"type",
"amount"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"idempotency_key": {
"description": "The recorder's own key for the event: a repeat answers the event it recorded.",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[A-Za-z0-9_-]+$"
},
{
"type": "null"
}
]
},
"type": {
"type": "string",
"const": "dividend"
},
"currency": {
"description": "What the amounts are in, so a stale send is refused: the portfolio's own; a comment's price may name another.",
"anyOf": [
{
"type": "string",
"minLength": 3,
"maxLength": 3
},
{
"type": "null"
}
]
},
"note": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 2000
},
{
"type": "null"
}
]
},
"price": {
"anyOf": [
{
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"symbol": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"amount": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"symbol_type": {
"type": "string",
"enum": [
"stock",
"crypto"
]
}
},
"required": [
"type",
"symbol",
"amount",
"symbol_type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"idempotency_key": {
"description": "The recorder's own key for the event: a repeat answers the event it recorded.",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[A-Za-z0-9_-]+$"
},
{
"type": "null"
}
]
},
"type": {
"type": "string",
"const": "comment"
},
"symbol": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 64
},
{
"type": "null"
}
]
},
"currency": {
"description": "What the amounts are in, so a stale send is refused: the portfolio's own; a comment's price may name another.",
"anyOf": [
{
"type": "string",
"minLength": 3,
"maxLength": 3
},
{
"type": "null"
}
]
},
"price": {
"anyOf": [
{
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"symbol_type": {
"anyOf": [
{
"type": "string",
"enum": [
"stock",
"crypto"
]
},
{
"type": "null"
}
]
},
"note": {
"type": "string",
"minLength": 1,
"maxLength": 2000
}
},
"required": [
"type",
"note"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"idempotency_key": {
"description": "The recorder's own key for the event: a repeat answers the event it recorded.",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[A-Za-z0-9_-]+$"
},
{
"type": "null"
}
]
},
"type": {
"type": "string",
"const": "watch"
},
"name": {
"description": "The instrument's name, filled onto a holding that has none.",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"currency": {
"description": "What the amounts are in, so a stale send is refused: the portfolio's own; a comment's price may name another.",
"anyOf": [
{
"type": "string",
"minLength": 3,
"maxLength": 3
},
{
"type": "null"
}
]
},
"note": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 2000
},
{
"type": "null"
}
]
},
"price": {
"anyOf": [
{
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"symbol": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"symbol_type": {
"type": "string",
"enum": [
"stock",
"crypto"
]
}
},
"required": [
"type",
"symbol",
"symbol_type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"idempotency_key": {
"description": "The recorder's own key for the event: a repeat answers the event it recorded.",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[A-Za-z0-9_-]+$"
},
{
"type": "null"
}
]
},
"type": {
"type": "string",
"const": "unwatch"
},
"note": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 2000
},
{
"type": "null"
}
]
},
"price": {
"anyOf": [
{
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"symbol": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"symbol_type": {
"type": "string",
"enum": [
"stock",
"crypto"
]
}
},
"required": [
"type",
"symbol",
"symbol_type"
],
"additionalProperties": false
}
],
"properties": {}
}201
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"portfolio_id": {
"type": "string"
},
"symbol": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"type": {
"type": "string"
},
"shares": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"price": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"note": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"effective_date": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"symbol_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"price_currency": {
"type": "string"
},
"price_exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"allocation": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"allocation_change": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"ratio": {
"anyOf": [
{
"type": "object",
"properties": {
"num": {
"type": "number"
},
"den": {
"type": "number"
}
},
"required": [
"num",
"den"
]
},
{
"type": "null"
}
]
},
"occurred_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"recorded_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"source": {
"description": "`manual` for a member's entry, `auto` for the pipeline.",
"type": "string",
"x-extensible-enum": [
"manual",
"auto"
]
},
"recorded_by": {
"description": "The member who recorded a manual entry.",
"type": "string"
},
"file_ids": {
"description": "For a file event, the assets it announces on the holding.",
"type": "array",
"items": {
"type": "string"
}
},
"remediated": {
"description": "A later correction stands in for it.",
"type": "boolean"
},
"kind": {
"description": "For a split, what the ratio alone cannot tell apart.",
"type": "string",
"x-extensible-enum": [
"reverse",
"forward",
"stock_dividend"
]
},
"name": {
"description": "The instrument's name a manual entry named, which a repeat under its key must name alike.",
"type": "string"
},
"notify": {
"description": "A trade that mailed the customers with access.",
"type": "boolean"
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"id",
"portfolio_id",
"symbol",
"type",
"shares",
"price",
"amount",
"note",
"effective_date",
"symbol_type",
"currency",
"exponent",
"price_currency",
"price_exponent",
"allocation",
"allocation_change",
"ratio",
"occurred_at",
"recorded_at",
"metadata"
]
}GET/v1/stores/{store}/products/{product}/portfolio_snapshots
Pages a portfolio's daily snapshots. Scope portfolio:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | ||
direction | query | ||
limit | query | ||
cursor | query | ||
count | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"value": {
"type": "number"
},
"cash": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"positions": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"twr": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"benchmark": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"state": {
"type": "string",
"x-extensible-enum": [
"provisional",
"settled"
]
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"portfolio_id": {
"type": "string"
},
"date": {
"type": "string"
}
},
"required": [
"value",
"cash",
"positions",
"twr",
"benchmark",
"state",
"currency",
"exponent",
"portfolio_id",
"date"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}GET/v1/stores/{store}/symbols
Searches the market for symbols by name or ticker. Scope portfolio:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
query | query | required | |
symbol_type | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"symbol": {
"type": "string"
},
"name": {
"type": "string"
},
"symbol_type": {
"type": "string",
"x-extensible-enum": [
"stock",
"crypto"
]
},
"region": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"currency": {
"description": "The lowercase ISO currency it is listed in, null when plutus names none.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"symbol",
"name",
"symbol_type",
"region",
"currency"
]
}
}
},
"required": [
"items"
]
}POST/v1/stores/{store}/symbols/quotes/query
Reads the latest quotes for symbols. Scope portfolio:read. Reads only; sent as a body since its arguments are too deep for a query string.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
Body
Schema
{
"type": "object",
"properties": {
"symbols": {
"type": "array",
"items": {
"type": "object",
"properties": {
"symbol": {
"type": "string",
"minLength": 1,
"maxLength": 32,
"pattern": "^[A-Za-z0-9.^=_-]{1,32}$"
},
"symbol_type": {
"type": "string",
"enum": [
"stock",
"crypto"
]
}
},
"required": [
"symbol",
"symbol_type"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 250
}
},
"required": [
"symbols"
],
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"symbol": {
"type": "string"
},
"symbol_type": {
"type": "string",
"x-extensible-enum": [
"stock",
"crypto"
]
},
"price": {
"description": "Per share or coin, in the currency's minor unit.",
"type": "number"
},
"currency": {
"type": "string"
},
"exponent": {
"type": "number"
},
"change_percent": {
"description": "The day's move in percent, null when plutus has no prior close or the quote is stale.",
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"as_of": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"stale": {
"description": "Too old to show as live.",
"type": "boolean"
}
},
"required": [
"symbol",
"symbol_type",
"price",
"currency",
"exponent",
"change_percent",
"as_of",
"stale"
]
}
},
"unpriced": {
"type": "array",
"items": {
"type": "object",
"properties": {
"symbol": {
"type": "string"
},
"symbol_type": {
"type": "string",
"x-extensible-enum": [
"stock",
"crypto"
]
}
},
"required": [
"symbol",
"symbol_type"
]
}
},
"failed_types": {
"description": "The types whose read failed, their symbols left unpriced, so a caller can ask again.",
"type": "array",
"items": {
"type": "string",
"x-extensible-enum": [
"stock",
"crypto"
]
}
}
},
"required": [
"items",
"unpriced",
"failed_types"
]
}price
GET/v1/stores/{store}/prices
Pages the prices of the store's products, or of one product. Scope price:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | query | An id, or slug:<slug>. | |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | ||
direction | query | ||
limit | query | ||
cursor | query | ||
count | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"tier": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
]
},
{
"type": "null"
}
]
},
"in_use": {
"type": "object",
"properties": {
"orders": {
"type": "number"
},
"subscriptions": {
"type": "number"
},
"checkouts": {
"type": "number"
},
"automations": {
"type": "number"
},
"discounts": {
"type": "number"
}
},
"required": [
"orders",
"subscriptions",
"checkouts",
"automations",
"discounts"
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"tier_id": {
"type": "string"
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"amount": {
"type": "number"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"one_time",
"recurring"
]
},
"period": {
"anyOf": [
{
"type": "object",
"properties": {
"unit": {
"type": "string",
"x-extensible-enum": [
"day",
"week",
"month",
"year"
]
},
"multiplier": {
"type": "number"
}
},
"required": [
"unit",
"multiplier"
]
},
{
"type": "null"
}
]
},
"highlighted": {
"type": "boolean"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"autorenew": {
"description": "Recurring only; false stops the renewal, absent renews.",
"type": "boolean"
},
"renewal_discount": {
"description": "Recurring only, a percent off every renewal.",
"type": "integer",
"minimum": 0,
"maximum": 100
},
"upgrade_multiplier": {
"description": "One-time only, a factor on the difference paid to move up a tier.",
"type": "number",
"minimum": 1,
"maximum": 10
},
"refund_policy": {
"description": "Overrides the product's.",
"type": "string",
"x-extensible-enum": [
"none",
"24h",
"72h",
"7d",
"14d",
"30d"
]
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"archived_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"product",
"tier",
"in_use",
"id",
"product_id",
"tier_id",
"currency",
"exponent",
"amount",
"kind",
"period",
"highlighted",
"title",
"description",
"settings",
"archived_at",
"created_at"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}POST/v1/stores/{store}/products/{product}/prices
Adds a price to a product's tier. Scope price:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"tier": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3
},
"amount": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"kind": {
"type": "string",
"enum": [
"one_time",
"recurring"
]
},
"period": {
"type": "object",
"properties": {
"unit": {
"type": "string",
"enum": [
"day",
"week",
"month",
"year"
]
},
"multiplier": {
"type": "integer",
"minimum": 1,
"maximum": 365
}
},
"required": [
"unit"
],
"additionalProperties": false
},
"highlighted": {
"type": "boolean"
},
"title": {
"description": "Shown in place of the tier's name where the price is offered.",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 30
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 50
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"autorenew": {
"description": "Recurring only; false stops the renewal, absent renews.",
"type": "boolean"
},
"renewal_discount": {
"description": "Recurring only, a percent off every renewal.",
"type": "integer",
"minimum": 0,
"maximum": 100
},
"upgrade_multiplier": {
"description": "One-time only, a factor on the difference paid to move up a tier.",
"type": "number",
"minimum": 1,
"maximum": 10
},
"refund_policy": {
"description": "Overrides the product's.",
"type": "string",
"enum": [
"none",
"24h",
"72h",
"7d",
"14d",
"30d"
]
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"tier",
"currency",
"amount"
],
"additionalProperties": false
}201
Schema
{
"type": "object",
"properties": {
"in_use": {
"type": "object",
"properties": {
"orders": {
"type": "number"
},
"subscriptions": {
"type": "number"
},
"checkouts": {
"type": "number"
},
"automations": {
"type": "number"
},
"discounts": {
"type": "number"
}
},
"required": [
"orders",
"subscriptions",
"checkouts",
"automations",
"discounts"
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"tier_id": {
"type": "string"
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"amount": {
"type": "number"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"one_time",
"recurring"
]
},
"period": {
"anyOf": [
{
"type": "object",
"properties": {
"unit": {
"type": "string",
"x-extensible-enum": [
"day",
"week",
"month",
"year"
]
},
"multiplier": {
"type": "number"
}
},
"required": [
"unit",
"multiplier"
]
},
{
"type": "null"
}
]
},
"highlighted": {
"type": "boolean"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"autorenew": {
"description": "Recurring only; false stops the renewal, absent renews.",
"type": "boolean"
},
"renewal_discount": {
"description": "Recurring only, a percent off every renewal.",
"type": "integer",
"minimum": 0,
"maximum": 100
},
"upgrade_multiplier": {
"description": "One-time only, a factor on the difference paid to move up a tier.",
"type": "number",
"minimum": 1,
"maximum": 10
},
"refund_policy": {
"description": "Overrides the product's.",
"type": "string",
"x-extensible-enum": [
"none",
"24h",
"72h",
"7d",
"14d",
"30d"
]
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"archived_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"in_use",
"id",
"product_id",
"tier_id",
"currency",
"exponent",
"amount",
"kind",
"period",
"highlighted",
"title",
"description",
"settings",
"archived_at",
"created_at"
]
}PATCH/v1/stores/{store}/prices/{price}
Updates a price's fields. Scope price:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
price | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"amount": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"title": {
"description": "Null clears it.",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 30
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 50
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"autorenew": {
"description": "Recurring only; false stops the renewal, absent renews.",
"type": "boolean"
},
"renewal_discount": {
"description": "Recurring only, a percent off every renewal.",
"type": "integer",
"minimum": 0,
"maximum": 100
},
"upgrade_multiplier": {
"description": "One-time only, a factor on the difference paid to move up a tier.",
"type": "number",
"minimum": 1,
"maximum": 10
},
"refund_policy": {
"description": "Overrides the product's.",
"type": "string",
"enum": [
"none",
"24h",
"72h",
"7d",
"14d",
"30d"
]
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"in_use": {
"type": "object",
"properties": {
"orders": {
"type": "number"
},
"subscriptions": {
"type": "number"
},
"checkouts": {
"type": "number"
},
"automations": {
"type": "number"
},
"discounts": {
"type": "number"
}
},
"required": [
"orders",
"subscriptions",
"checkouts",
"automations",
"discounts"
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"tier_id": {
"type": "string"
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"amount": {
"type": "number"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"one_time",
"recurring"
]
},
"period": {
"anyOf": [
{
"type": "object",
"properties": {
"unit": {
"type": "string",
"x-extensible-enum": [
"day",
"week",
"month",
"year"
]
},
"multiplier": {
"type": "number"
}
},
"required": [
"unit",
"multiplier"
]
},
{
"type": "null"
}
]
},
"highlighted": {
"type": "boolean"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"autorenew": {
"description": "Recurring only; false stops the renewal, absent renews.",
"type": "boolean"
},
"renewal_discount": {
"description": "Recurring only, a percent off every renewal.",
"type": "integer",
"minimum": 0,
"maximum": 100
},
"upgrade_multiplier": {
"description": "One-time only, a factor on the difference paid to move up a tier.",
"type": "number",
"minimum": 1,
"maximum": 10
},
"refund_policy": {
"description": "Overrides the product's.",
"type": "string",
"x-extensible-enum": [
"none",
"24h",
"72h",
"7d",
"14d",
"30d"
]
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"archived_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"in_use",
"id",
"product_id",
"tier_id",
"currency",
"exponent",
"amount",
"kind",
"period",
"highlighted",
"title",
"description",
"settings",
"archived_at",
"created_at"
]
}DELETE/v1/stores/{store}/prices/{price}
Deletes a price no order or subscription refers to. Scope price:delete.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
price | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
200
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"deleted": {
"type": "boolean",
"const": true
}
},
"required": [
"id",
"deleted"
]
}POST/v1/stores/{store}/prices/{price}/highlight
Makes a price the one a product's page features. Scope price:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
price | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"in_use": {
"type": "object",
"properties": {
"orders": {
"type": "number"
},
"subscriptions": {
"type": "number"
},
"checkouts": {
"type": "number"
},
"automations": {
"type": "number"
},
"discounts": {
"type": "number"
}
},
"required": [
"orders",
"subscriptions",
"checkouts",
"automations",
"discounts"
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"tier_id": {
"type": "string"
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"amount": {
"type": "number"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"one_time",
"recurring"
]
},
"period": {
"anyOf": [
{
"type": "object",
"properties": {
"unit": {
"type": "string",
"x-extensible-enum": [
"day",
"week",
"month",
"year"
]
},
"multiplier": {
"type": "number"
}
},
"required": [
"unit",
"multiplier"
]
},
{
"type": "null"
}
]
},
"highlighted": {
"type": "boolean"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"autorenew": {
"description": "Recurring only; false stops the renewal, absent renews.",
"type": "boolean"
},
"renewal_discount": {
"description": "Recurring only, a percent off every renewal.",
"type": "integer",
"minimum": 0,
"maximum": 100
},
"upgrade_multiplier": {
"description": "One-time only, a factor on the difference paid to move up a tier.",
"type": "number",
"minimum": 1,
"maximum": 10
},
"refund_policy": {
"description": "Overrides the product's.",
"type": "string",
"x-extensible-enum": [
"none",
"24h",
"72h",
"7d",
"14d",
"30d"
]
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"archived_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"in_use",
"id",
"product_id",
"tier_id",
"currency",
"exponent",
"amount",
"kind",
"period",
"highlighted",
"title",
"description",
"settings",
"archived_at",
"created_at"
]
}POST/v1/stores/{store}/prices/{price}/archive
Stops offering a price while keeping it for its buyers. Scope price:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
price | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"in_use": {
"type": "object",
"properties": {
"orders": {
"type": "number"
},
"subscriptions": {
"type": "number"
},
"checkouts": {
"type": "number"
},
"automations": {
"type": "number"
},
"discounts": {
"type": "number"
}
},
"required": [
"orders",
"subscriptions",
"checkouts",
"automations",
"discounts"
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"tier_id": {
"type": "string"
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"amount": {
"type": "number"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"one_time",
"recurring"
]
},
"period": {
"anyOf": [
{
"type": "object",
"properties": {
"unit": {
"type": "string",
"x-extensible-enum": [
"day",
"week",
"month",
"year"
]
},
"multiplier": {
"type": "number"
}
},
"required": [
"unit",
"multiplier"
]
},
{
"type": "null"
}
]
},
"highlighted": {
"type": "boolean"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"autorenew": {
"description": "Recurring only; false stops the renewal, absent renews.",
"type": "boolean"
},
"renewal_discount": {
"description": "Recurring only, a percent off every renewal.",
"type": "integer",
"minimum": 0,
"maximum": 100
},
"upgrade_multiplier": {
"description": "One-time only, a factor on the difference paid to move up a tier.",
"type": "number",
"minimum": 1,
"maximum": 10
},
"refund_policy": {
"description": "Overrides the product's.",
"type": "string",
"x-extensible-enum": [
"none",
"24h",
"72h",
"7d",
"14d",
"30d"
]
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"archived_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"in_use",
"id",
"product_id",
"tier_id",
"currency",
"exponent",
"amount",
"kind",
"period",
"highlighted",
"title",
"description",
"settings",
"archived_at",
"created_at"
]
}POST/v1/stores/{store}/prices/{price}/restore
Offers an archived price again. Scope price:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
price | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"in_use": {
"type": "object",
"properties": {
"orders": {
"type": "number"
},
"subscriptions": {
"type": "number"
},
"checkouts": {
"type": "number"
},
"automations": {
"type": "number"
},
"discounts": {
"type": "number"
}
},
"required": [
"orders",
"subscriptions",
"checkouts",
"automations",
"discounts"
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"tier_id": {
"type": "string"
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"amount": {
"type": "number"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"one_time",
"recurring"
]
},
"period": {
"anyOf": [
{
"type": "object",
"properties": {
"unit": {
"type": "string",
"x-extensible-enum": [
"day",
"week",
"month",
"year"
]
},
"multiplier": {
"type": "number"
}
},
"required": [
"unit",
"multiplier"
]
},
{
"type": "null"
}
]
},
"highlighted": {
"type": "boolean"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"autorenew": {
"description": "Recurring only; false stops the renewal, absent renews.",
"type": "boolean"
},
"renewal_discount": {
"description": "Recurring only, a percent off every renewal.",
"type": "integer",
"minimum": 0,
"maximum": 100
},
"upgrade_multiplier": {
"description": "One-time only, a factor on the difference paid to move up a tier.",
"type": "number",
"minimum": 1,
"maximum": 10
},
"refund_policy": {
"description": "Overrides the product's.",
"type": "string",
"x-extensible-enum": [
"none",
"24h",
"72h",
"7d",
"14d",
"30d"
]
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"archived_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"in_use",
"id",
"product_id",
"tier_id",
"currency",
"exponent",
"amount",
"kind",
"period",
"highlighted",
"title",
"description",
"settings",
"archived_at",
"created_at"
]
}product
GET/v1/stores/{store}/categories
Lists the product categories the store may use. Scope product:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
200
Schema
{
"type": "array",
"items": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"id": {
"type": "string"
},
"label": {
"type": "string"
},
"discountable": {
"type": "boolean"
},
"subscribable": {
"type": "boolean"
},
"reviewable": {
"type": "boolean"
},
"repeatable": {
"description": "Bought again and again: a coffee, a donation, an invoice, a seat, a slot.",
"type": "boolean"
},
"aside_size": {
"type": "string",
"x-extensible-enum": [
"small",
"none",
"large"
]
}
},
"required": [
"enabled",
"id",
"label",
"discountable",
"subscribable",
"reviewable",
"repeatable",
"aside_size"
]
}
}GET/v1/stores/{store}/products
Pages the store's products. Scope product:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | Sorted by published or rating, rows without a value come last either way. | |
direction | query | ||
limit | query | ||
cursor | query | ||
count | query | ||
search | query | ||
facets | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"sales": {
"type": "number"
},
"rating": {
"type": "object",
"properties": {
"count": {
"type": "number"
},
"average": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
}
},
"required": [
"count",
"average"
]
},
"poster": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"preview_only": {
"type": "boolean"
},
"from_body": {
"type": "boolean"
},
"position": {
"type": "number"
},
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"target",
"role",
"delivery",
"preview_only",
"from_body",
"position",
"asset",
"url"
]
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"category": {
"type": "string"
},
"listing": {
"type": "string",
"x-extensible-enum": [
"primary",
"secondary"
]
},
"priority": {
"type": "number"
},
"status": {
"type": "string",
"x-extensible-enum": [
"draft",
"scheduled",
"published",
"discontinued"
]
},
"unlisted": {
"type": "boolean"
},
"published_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"discontinued_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"unlisted_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"refund_policy": {
"type": "string",
"x-extensible-enum": [
"none",
"24h",
"72h",
"7d",
"14d",
"30d"
]
},
"progress_tracking": {
"type": "string",
"x-extensible-enum": [
"manual",
"on_open",
"on_complete",
"disabled"
]
},
"reviews_enabled": {
"type": "boolean"
},
"review_summary_visible": {
"description": "Whether customers see the generated review summary; it is written either way.",
"type": "boolean"
},
"purchase_note": {
"description": "Shown beside the buy button.",
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"calendar": {
"description": "A bookable product: the seller's cal.com handle and the host card beside the widget.",
"type": "object",
"properties": {
"calcom": {
"type": "object",
"properties": {
"username": {
"type": "string"
},
"event_slug": {
"type": "string"
}
}
},
"host": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"subtitle": {
"type": "string"
},
"description": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"icon": {
"type": "string"
}
}
}
}
},
"coffee": {
"description": "A tip button: what it is called and what it shows.",
"type": "object",
"properties": {
"emoji": {
"type": "string"
},
"descriptor": {
"type": "string",
"minLength": 3,
"maxLength": 15,
"pattern": "^\\S(.*\\S)?$"
}
}
},
"fundraising": {
"description": "A fundraiser: the goal, in minor units of its currency.",
"type": "object",
"properties": {
"goal": {
"type": "integer",
"minimum": 1
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3
}
},
"required": [
"goal",
"currency"
]
},
"storefront": {
"type": "object",
"properties": {
"sales_counter": {
"description": "A public count of orders on the product page.",
"type": "boolean"
},
"background_poster": {
"description": "The poster doubles as the page background.",
"type": "boolean"
},
"require_dark": {
"description": "The page renders dark whatever the visitor chose.",
"type": "boolean"
}
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"sales",
"rating",
"poster",
"id",
"slug",
"title",
"description",
"category",
"listing",
"priority",
"status",
"unlisted",
"published_at",
"discontinued_at",
"unlisted_at",
"created_at",
"updated_at",
"settings",
"metadata"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}POST/v1/stores/{store}/products
Creates a draft product. Scope product:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"slug": {
"description": "Made from the title when absent: its words, numbered past a twin.",
"type": "string",
"minLength": 1,
"maxLength": 120,
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"category": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"description": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 20000
},
{
"type": "null"
}
]
},
"text": {
"description": "The page's long text, in markdown.",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 100000
},
{
"type": "null"
}
]
},
"what_you_get": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 100000
},
{
"type": "null"
}
]
},
"listing": {
"type": "string",
"enum": [
"primary",
"secondary"
]
},
"priority": {
"type": "integer",
"minimum": 0,
"maximum": 1000000
},
"settings": {
"type": "object",
"properties": {
"refund_policy": {
"type": "string",
"enum": [
"none",
"24h",
"72h",
"7d",
"14d",
"30d"
]
},
"progress_tracking": {
"type": "string",
"enum": [
"manual",
"on_open",
"on_complete",
"disabled"
]
},
"reviews_enabled": {
"type": "boolean"
},
"review_summary_visible": {
"description": "Whether customers see the generated review summary; it is written either way.",
"type": "boolean"
},
"purchase_note": {
"description": "Shown beside the buy button.",
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"calendar": {
"description": "A bookable product: the seller's cal.com handle and the host card beside the widget.",
"type": "object",
"properties": {
"calcom": {
"type": "object",
"properties": {
"username": {
"type": "string"
},
"event_slug": {
"type": "string"
}
},
"additionalProperties": false
},
"host": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"subtitle": {
"type": "string"
},
"description": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"icon": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"coffee": {
"description": "A tip button: what it is called and what it shows.",
"type": "object",
"properties": {
"emoji": {
"type": "string"
},
"descriptor": {
"type": "string",
"minLength": 3,
"maxLength": 15,
"pattern": "^\\S(.*\\S)?$"
}
},
"additionalProperties": false
},
"fundraising": {
"description": "A fundraiser: the goal, in minor units of its currency.",
"type": "object",
"properties": {
"goal": {
"type": "integer",
"minimum": 1
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3
}
},
"required": [
"goal",
"currency"
],
"additionalProperties": false
},
"storefront": {
"type": "object",
"properties": {
"sales_counter": {
"description": "A public count of orders on the product page.",
"type": "boolean"
},
"background_poster": {
"description": "The poster doubles as the page background.",
"type": "boolean"
},
"require_dark": {
"description": "The page renders dark whatever the visitor chose.",
"type": "boolean"
}
},
"additionalProperties": false
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"title",
"category"
],
"additionalProperties": false
}201
Schema
{
"type": "object",
"properties": {
"poster": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"preview_only": {
"type": "boolean"
},
"from_body": {
"type": "boolean"
},
"position": {
"type": "number"
},
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
}
},
"required": [
"id",
"target",
"role",
"delivery",
"preview_only",
"from_body",
"position",
"asset"
]
},
{
"type": "null"
}
]
},
"text": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"what_you_get": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"files": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"video",
"audio",
"image",
"pdf",
"file"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"width": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"height": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"duration": {
"description": "Seconds.",
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pages": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"url": {
"description": "A public file's lasting URL; null for a private one, or one whose bytes haven't landed.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"attachment_id": {
"description": "The binding a private file opens through; null when the reader can't open it.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"mime",
"name",
"bytes",
"width",
"height",
"duration",
"pages",
"status",
"url",
"attachment_id"
]
}
},
"tiers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"in_use": {
"type": "object",
"properties": {
"prices": {
"type": "number"
},
"grants": {
"type": "number"
},
"orders": {
"type": "number"
},
"discounts": {
"type": "number"
},
"gates": {
"type": "number"
}
},
"required": [
"prices",
"grants",
"orders",
"discounts",
"gates"
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"rank": {
"type": "number"
},
"name": {
"type": "string"
}
},
"required": [
"in_use",
"id",
"product_id",
"rank",
"name"
]
}
},
"prices": {
"type": "array",
"items": {
"type": "object",
"properties": {
"in_use": {
"type": "object",
"properties": {
"orders": {
"type": "number"
},
"subscriptions": {
"type": "number"
},
"checkouts": {
"type": "number"
},
"automations": {
"type": "number"
},
"discounts": {
"type": "number"
}
},
"required": [
"orders",
"subscriptions",
"checkouts",
"automations",
"discounts"
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"tier_id": {
"type": "string"
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"amount": {
"type": "number"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"one_time",
"recurring"
]
},
"period": {
"anyOf": [
{
"type": "object",
"properties": {
"unit": {
"type": "string",
"x-extensible-enum": [
"day",
"week",
"month",
"year"
]
},
"multiplier": {
"type": "number"
}
},
"required": [
"unit",
"multiplier"
]
},
{
"type": "null"
}
]
},
"highlighted": {
"type": "boolean"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"autorenew": {
"description": "Recurring only; false stops the renewal, absent renews.",
"type": "boolean"
},
"renewal_discount": {
"description": "Recurring only, a percent off every renewal.",
"type": "integer",
"minimum": 0,
"maximum": 100
},
"upgrade_multiplier": {
"description": "One-time only, a factor on the difference paid to move up a tier.",
"type": "number",
"minimum": 1,
"maximum": 10
},
"refund_policy": {
"description": "Overrides the product's.",
"type": "string",
"x-extensible-enum": [
"none",
"24h",
"72h",
"7d",
"14d",
"30d"
]
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"archived_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"in_use",
"id",
"product_id",
"tier_id",
"currency",
"exponent",
"amount",
"kind",
"period",
"highlighted",
"title",
"description",
"settings",
"archived_at",
"created_at"
]
}
},
"in_use": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"count": {
"type": "number"
}
},
"required": [
"kind",
"count"
]
}
},
"delete_blocked_by": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"count": {
"type": "number"
}
},
"required": [
"kind",
"count"
]
}
},
"stats": {
"type": "array",
"items": {
"type": "object",
"properties": {
"gross": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"refunded": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"platform_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"processor_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"affiliate_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"currency": {
"type": "string"
},
"settlement": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"transactions": {
"type": "number"
},
"refunds": {
"type": "number"
},
"buyers": {
"type": "number"
}
},
"required": [
"gross",
"refunded",
"platform_fee",
"processor_fee",
"affiliate_fee",
"exponent",
"currency",
"settlement",
"transactions",
"refunds",
"buyers"
]
}
},
"ratings": {
"type": "object",
"properties": {
"published": {
"type": "object",
"properties": {
"count": {
"type": "number"
},
"average": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"histogram": {
"type": "object",
"properties": {
"1": {
"type": "number"
},
"2": {
"type": "number"
},
"3": {
"type": "number"
},
"4": {
"type": "number"
},
"5": {
"type": "number"
}
},
"required": [
"1",
"2",
"3",
"4",
"5"
]
}
},
"required": [
"count",
"average",
"histogram"
]
},
"live": {
"type": "object",
"properties": {
"hidden": {
"type": "number"
},
"count": {
"type": "number"
},
"average": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"histogram": {
"type": "object",
"properties": {
"1": {
"type": "number"
},
"2": {
"type": "number"
},
"3": {
"type": "number"
},
"4": {
"type": "number"
},
"5": {
"type": "number"
}
},
"required": [
"1",
"2",
"3",
"4",
"5"
]
}
},
"required": [
"hidden",
"count",
"average",
"histogram"
]
}
},
"required": [
"published",
"live"
]
},
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"category": {
"type": "string"
},
"listing": {
"type": "string",
"x-extensible-enum": [
"primary",
"secondary"
]
},
"priority": {
"type": "number"
},
"status": {
"type": "string",
"x-extensible-enum": [
"draft",
"scheduled",
"published",
"discontinued"
]
},
"unlisted": {
"type": "boolean"
},
"published_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"discontinued_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"unlisted_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"refund_policy": {
"type": "string",
"x-extensible-enum": [
"none",
"24h",
"72h",
"7d",
"14d",
"30d"
]
},
"progress_tracking": {
"type": "string",
"x-extensible-enum": [
"manual",
"on_open",
"on_complete",
"disabled"
]
},
"reviews_enabled": {
"type": "boolean"
},
"review_summary_visible": {
"description": "Whether customers see the generated review summary; it is written either way.",
"type": "boolean"
},
"purchase_note": {
"description": "Shown beside the buy button.",
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"calendar": {
"description": "A bookable product: the seller's cal.com handle and the host card beside the widget.",
"type": "object",
"properties": {
"calcom": {
"type": "object",
"properties": {
"username": {
"type": "string"
},
"event_slug": {
"type": "string"
}
}
},
"host": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"subtitle": {
"type": "string"
},
"description": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"icon": {
"type": "string"
}
}
}
}
},
"coffee": {
"description": "A tip button: what it is called and what it shows.",
"type": "object",
"properties": {
"emoji": {
"type": "string"
},
"descriptor": {
"type": "string",
"minLength": 3,
"maxLength": 15,
"pattern": "^\\S(.*\\S)?$"
}
}
},
"fundraising": {
"description": "A fundraiser: the goal, in minor units of its currency.",
"type": "object",
"properties": {
"goal": {
"type": "integer",
"minimum": 1
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3
}
},
"required": [
"goal",
"currency"
]
},
"storefront": {
"type": "object",
"properties": {
"sales_counter": {
"description": "A public count of orders on the product page.",
"type": "boolean"
},
"background_poster": {
"description": "The poster doubles as the page background.",
"type": "boolean"
},
"require_dark": {
"description": "The page renders dark whatever the visitor chose.",
"type": "boolean"
}
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"text",
"what_you_get",
"files",
"tiers",
"prices",
"in_use",
"delete_blocked_by",
"stats",
"ratings",
"id",
"slug",
"title",
"description",
"category",
"listing",
"priority",
"status",
"unlisted",
"published_at",
"discontinued_at",
"unlisted_at",
"created_at",
"updated_at",
"settings",
"metadata"
]
}GET/v1/stores/{store}/products/{product}
Reads one product with its tiers and prices. Scope product:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
200
Schema
{
"type": "object",
"properties": {
"holders": {
"type": "number"
},
"poster": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"preview_only": {
"type": "boolean"
},
"from_body": {
"type": "boolean"
},
"position": {
"type": "number"
},
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
}
},
"required": [
"id",
"target",
"role",
"delivery",
"preview_only",
"from_body",
"position",
"asset"
]
},
{
"type": "null"
}
]
},
"text": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"what_you_get": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"files": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"video",
"audio",
"image",
"pdf",
"file"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"width": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"height": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"duration": {
"description": "Seconds.",
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pages": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"url": {
"description": "A public file's lasting URL; null for a private one, or one whose bytes haven't landed.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"attachment_id": {
"description": "The binding a private file opens through; null when the reader can't open it.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"mime",
"name",
"bytes",
"width",
"height",
"duration",
"pages",
"status",
"url",
"attachment_id"
]
}
},
"tiers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"in_use": {
"type": "object",
"properties": {
"prices": {
"type": "number"
},
"grants": {
"type": "number"
},
"orders": {
"type": "number"
},
"discounts": {
"type": "number"
},
"gates": {
"type": "number"
}
},
"required": [
"prices",
"grants",
"orders",
"discounts",
"gates"
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"rank": {
"type": "number"
},
"name": {
"type": "string"
}
},
"required": [
"in_use",
"id",
"product_id",
"rank",
"name"
]
}
},
"prices": {
"type": "array",
"items": {
"type": "object",
"properties": {
"in_use": {
"type": "object",
"properties": {
"orders": {
"type": "number"
},
"subscriptions": {
"type": "number"
},
"checkouts": {
"type": "number"
},
"automations": {
"type": "number"
},
"discounts": {
"type": "number"
}
},
"required": [
"orders",
"subscriptions",
"checkouts",
"automations",
"discounts"
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"tier_id": {
"type": "string"
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"amount": {
"type": "number"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"one_time",
"recurring"
]
},
"period": {
"anyOf": [
{
"type": "object",
"properties": {
"unit": {
"type": "string",
"x-extensible-enum": [
"day",
"week",
"month",
"year"
]
},
"multiplier": {
"type": "number"
}
},
"required": [
"unit",
"multiplier"
]
},
{
"type": "null"
}
]
},
"highlighted": {
"type": "boolean"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"autorenew": {
"description": "Recurring only; false stops the renewal, absent renews.",
"type": "boolean"
},
"renewal_discount": {
"description": "Recurring only, a percent off every renewal.",
"type": "integer",
"minimum": 0,
"maximum": 100
},
"upgrade_multiplier": {
"description": "One-time only, a factor on the difference paid to move up a tier.",
"type": "number",
"minimum": 1,
"maximum": 10
},
"refund_policy": {
"description": "Overrides the product's.",
"type": "string",
"x-extensible-enum": [
"none",
"24h",
"72h",
"7d",
"14d",
"30d"
]
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"archived_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"in_use",
"id",
"product_id",
"tier_id",
"currency",
"exponent",
"amount",
"kind",
"period",
"highlighted",
"title",
"description",
"settings",
"archived_at",
"created_at"
]
}
},
"in_use": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"count": {
"type": "number"
}
},
"required": [
"kind",
"count"
]
}
},
"delete_blocked_by": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"count": {
"type": "number"
}
},
"required": [
"kind",
"count"
]
}
},
"stats": {
"type": "array",
"items": {
"type": "object",
"properties": {
"gross": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"refunded": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"platform_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"processor_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"affiliate_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"currency": {
"type": "string"
},
"settlement": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"transactions": {
"type": "number"
},
"refunds": {
"type": "number"
},
"buyers": {
"type": "number"
}
},
"required": [
"gross",
"refunded",
"platform_fee",
"processor_fee",
"affiliate_fee",
"exponent",
"currency",
"settlement",
"transactions",
"refunds",
"buyers"
]
}
},
"ratings": {
"type": "object",
"properties": {
"published": {
"type": "object",
"properties": {
"count": {
"type": "number"
},
"average": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"histogram": {
"type": "object",
"properties": {
"1": {
"type": "number"
},
"2": {
"type": "number"
},
"3": {
"type": "number"
},
"4": {
"type": "number"
},
"5": {
"type": "number"
}
},
"required": [
"1",
"2",
"3",
"4",
"5"
]
}
},
"required": [
"count",
"average",
"histogram"
]
},
"live": {
"type": "object",
"properties": {
"hidden": {
"type": "number"
},
"count": {
"type": "number"
},
"average": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"histogram": {
"type": "object",
"properties": {
"1": {
"type": "number"
},
"2": {
"type": "number"
},
"3": {
"type": "number"
},
"4": {
"type": "number"
},
"5": {
"type": "number"
}
},
"required": [
"1",
"2",
"3",
"4",
"5"
]
}
},
"required": [
"hidden",
"count",
"average",
"histogram"
]
}
},
"required": [
"published",
"live"
]
},
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"category": {
"type": "string"
},
"listing": {
"type": "string",
"x-extensible-enum": [
"primary",
"secondary"
]
},
"priority": {
"type": "number"
},
"status": {
"type": "string",
"x-extensible-enum": [
"draft",
"scheduled",
"published",
"discontinued"
]
},
"unlisted": {
"type": "boolean"
},
"published_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"discontinued_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"unlisted_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"refund_policy": {
"type": "string",
"x-extensible-enum": [
"none",
"24h",
"72h",
"7d",
"14d",
"30d"
]
},
"progress_tracking": {
"type": "string",
"x-extensible-enum": [
"manual",
"on_open",
"on_complete",
"disabled"
]
},
"reviews_enabled": {
"type": "boolean"
},
"review_summary_visible": {
"description": "Whether customers see the generated review summary; it is written either way.",
"type": "boolean"
},
"purchase_note": {
"description": "Shown beside the buy button.",
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"calendar": {
"description": "A bookable product: the seller's cal.com handle and the host card beside the widget.",
"type": "object",
"properties": {
"calcom": {
"type": "object",
"properties": {
"username": {
"type": "string"
},
"event_slug": {
"type": "string"
}
}
},
"host": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"subtitle": {
"type": "string"
},
"description": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"icon": {
"type": "string"
}
}
}
}
},
"coffee": {
"description": "A tip button: what it is called and what it shows.",
"type": "object",
"properties": {
"emoji": {
"type": "string"
},
"descriptor": {
"type": "string",
"minLength": 3,
"maxLength": 15,
"pattern": "^\\S(.*\\S)?$"
}
}
},
"fundraising": {
"description": "A fundraiser: the goal, in minor units of its currency.",
"type": "object",
"properties": {
"goal": {
"type": "integer",
"minimum": 1
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3
}
},
"required": [
"goal",
"currency"
]
},
"storefront": {
"type": "object",
"properties": {
"sales_counter": {
"description": "A public count of orders on the product page.",
"type": "boolean"
},
"background_poster": {
"description": "The poster doubles as the page background.",
"type": "boolean"
},
"require_dark": {
"description": "The page renders dark whatever the visitor chose.",
"type": "boolean"
}
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"holders",
"text",
"what_you_get",
"files",
"tiers",
"prices",
"in_use",
"delete_blocked_by",
"stats",
"ratings",
"id",
"slug",
"title",
"description",
"category",
"listing",
"priority",
"status",
"unlisted",
"published_at",
"discontinued_at",
"unlisted_at",
"created_at",
"updated_at",
"settings",
"metadata"
]
}PATCH/v1/stores/{store}/products/{product}
Updates a product's fields. Scope product:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"listing": {
"type": "string",
"enum": [
"primary",
"secondary"
]
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"description": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 20000
},
{
"type": "null"
}
]
},
"text": {
"description": "The page's long text, in markdown.",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 100000
},
{
"type": "null"
}
]
},
"what_you_get": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 100000
},
{
"type": "null"
}
]
},
"priority": {
"type": "integer",
"minimum": 0,
"maximum": 1000000
},
"settings": {
"type": "object",
"properties": {
"refund_policy": {
"type": "string",
"enum": [
"none",
"24h",
"72h",
"7d",
"14d",
"30d"
]
},
"progress_tracking": {
"type": "string",
"enum": [
"manual",
"on_open",
"on_complete",
"disabled"
]
},
"reviews_enabled": {
"type": "boolean"
},
"review_summary_visible": {
"description": "Whether customers see the generated review summary; it is written either way.",
"type": "boolean"
},
"purchase_note": {
"description": "Shown beside the buy button.",
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"calendar": {
"description": "A bookable product: the seller's cal.com handle and the host card beside the widget.",
"type": "object",
"properties": {
"calcom": {
"type": "object",
"properties": {
"username": {
"type": "string"
},
"event_slug": {
"type": "string"
}
},
"additionalProperties": false
},
"host": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"subtitle": {
"type": "string"
},
"description": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"icon": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"coffee": {
"description": "A tip button: what it is called and what it shows.",
"type": "object",
"properties": {
"emoji": {
"type": "string"
},
"descriptor": {
"type": "string",
"minLength": 3,
"maxLength": 15,
"pattern": "^\\S(.*\\S)?$"
}
},
"additionalProperties": false
},
"fundraising": {
"description": "A fundraiser: the goal, in minor units of its currency.",
"type": "object",
"properties": {
"goal": {
"type": "integer",
"minimum": 1
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3
}
},
"required": [
"goal",
"currency"
],
"additionalProperties": false
},
"storefront": {
"type": "object",
"properties": {
"sales_counter": {
"description": "A public count of orders on the product page.",
"type": "boolean"
},
"background_poster": {
"description": "The poster doubles as the page background.",
"type": "boolean"
},
"require_dark": {
"description": "The page renders dark whatever the visitor chose.",
"type": "boolean"
}
},
"additionalProperties": false
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"poster": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"preview_only": {
"type": "boolean"
},
"from_body": {
"type": "boolean"
},
"position": {
"type": "number"
},
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
}
},
"required": [
"id",
"target",
"role",
"delivery",
"preview_only",
"from_body",
"position",
"asset"
]
},
{
"type": "null"
}
]
},
"text": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"what_you_get": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"files": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"video",
"audio",
"image",
"pdf",
"file"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"width": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"height": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"duration": {
"description": "Seconds.",
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pages": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"url": {
"description": "A public file's lasting URL; null for a private one, or one whose bytes haven't landed.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"attachment_id": {
"description": "The binding a private file opens through; null when the reader can't open it.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"mime",
"name",
"bytes",
"width",
"height",
"duration",
"pages",
"status",
"url",
"attachment_id"
]
}
},
"tiers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"in_use": {
"type": "object",
"properties": {
"prices": {
"type": "number"
},
"grants": {
"type": "number"
},
"orders": {
"type": "number"
},
"discounts": {
"type": "number"
},
"gates": {
"type": "number"
}
},
"required": [
"prices",
"grants",
"orders",
"discounts",
"gates"
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"rank": {
"type": "number"
},
"name": {
"type": "string"
}
},
"required": [
"in_use",
"id",
"product_id",
"rank",
"name"
]
}
},
"prices": {
"type": "array",
"items": {
"type": "object",
"properties": {
"in_use": {
"type": "object",
"properties": {
"orders": {
"type": "number"
},
"subscriptions": {
"type": "number"
},
"checkouts": {
"type": "number"
},
"automations": {
"type": "number"
},
"discounts": {
"type": "number"
}
},
"required": [
"orders",
"subscriptions",
"checkouts",
"automations",
"discounts"
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"tier_id": {
"type": "string"
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"amount": {
"type": "number"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"one_time",
"recurring"
]
},
"period": {
"anyOf": [
{
"type": "object",
"properties": {
"unit": {
"type": "string",
"x-extensible-enum": [
"day",
"week",
"month",
"year"
]
},
"multiplier": {
"type": "number"
}
},
"required": [
"unit",
"multiplier"
]
},
{
"type": "null"
}
]
},
"highlighted": {
"type": "boolean"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"autorenew": {
"description": "Recurring only; false stops the renewal, absent renews.",
"type": "boolean"
},
"renewal_discount": {
"description": "Recurring only, a percent off every renewal.",
"type": "integer",
"minimum": 0,
"maximum": 100
},
"upgrade_multiplier": {
"description": "One-time only, a factor on the difference paid to move up a tier.",
"type": "number",
"minimum": 1,
"maximum": 10
},
"refund_policy": {
"description": "Overrides the product's.",
"type": "string",
"x-extensible-enum": [
"none",
"24h",
"72h",
"7d",
"14d",
"30d"
]
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"archived_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"in_use",
"id",
"product_id",
"tier_id",
"currency",
"exponent",
"amount",
"kind",
"period",
"highlighted",
"title",
"description",
"settings",
"archived_at",
"created_at"
]
}
},
"in_use": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"count": {
"type": "number"
}
},
"required": [
"kind",
"count"
]
}
},
"delete_blocked_by": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"count": {
"type": "number"
}
},
"required": [
"kind",
"count"
]
}
},
"stats": {
"type": "array",
"items": {
"type": "object",
"properties": {
"gross": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"refunded": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"platform_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"processor_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"affiliate_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"currency": {
"type": "string"
},
"settlement": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"transactions": {
"type": "number"
},
"refunds": {
"type": "number"
},
"buyers": {
"type": "number"
}
},
"required": [
"gross",
"refunded",
"platform_fee",
"processor_fee",
"affiliate_fee",
"exponent",
"currency",
"settlement",
"transactions",
"refunds",
"buyers"
]
}
},
"ratings": {
"type": "object",
"properties": {
"published": {
"type": "object",
"properties": {
"count": {
"type": "number"
},
"average": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"histogram": {
"type": "object",
"properties": {
"1": {
"type": "number"
},
"2": {
"type": "number"
},
"3": {
"type": "number"
},
"4": {
"type": "number"
},
"5": {
"type": "number"
}
},
"required": [
"1",
"2",
"3",
"4",
"5"
]
}
},
"required": [
"count",
"average",
"histogram"
]
},
"live": {
"type": "object",
"properties": {
"hidden": {
"type": "number"
},
"count": {
"type": "number"
},
"average": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"histogram": {
"type": "object",
"properties": {
"1": {
"type": "number"
},
"2": {
"type": "number"
},
"3": {
"type": "number"
},
"4": {
"type": "number"
},
"5": {
"type": "number"
}
},
"required": [
"1",
"2",
"3",
"4",
"5"
]
}
},
"required": [
"hidden",
"count",
"average",
"histogram"
]
}
},
"required": [
"published",
"live"
]
},
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"category": {
"type": "string"
},
"listing": {
"type": "string",
"x-extensible-enum": [
"primary",
"secondary"
]
},
"priority": {
"type": "number"
},
"status": {
"type": "string",
"x-extensible-enum": [
"draft",
"scheduled",
"published",
"discontinued"
]
},
"unlisted": {
"type": "boolean"
},
"published_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"discontinued_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"unlisted_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"refund_policy": {
"type": "string",
"x-extensible-enum": [
"none",
"24h",
"72h",
"7d",
"14d",
"30d"
]
},
"progress_tracking": {
"type": "string",
"x-extensible-enum": [
"manual",
"on_open",
"on_complete",
"disabled"
]
},
"reviews_enabled": {
"type": "boolean"
},
"review_summary_visible": {
"description": "Whether customers see the generated review summary; it is written either way.",
"type": "boolean"
},
"purchase_note": {
"description": "Shown beside the buy button.",
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"calendar": {
"description": "A bookable product: the seller's cal.com handle and the host card beside the widget.",
"type": "object",
"properties": {
"calcom": {
"type": "object",
"properties": {
"username": {
"type": "string"
},
"event_slug": {
"type": "string"
}
}
},
"host": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"subtitle": {
"type": "string"
},
"description": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"icon": {
"type": "string"
}
}
}
}
},
"coffee": {
"description": "A tip button: what it is called and what it shows.",
"type": "object",
"properties": {
"emoji": {
"type": "string"
},
"descriptor": {
"type": "string",
"minLength": 3,
"maxLength": 15,
"pattern": "^\\S(.*\\S)?$"
}
}
},
"fundraising": {
"description": "A fundraiser: the goal, in minor units of its currency.",
"type": "object",
"properties": {
"goal": {
"type": "integer",
"minimum": 1
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3
}
},
"required": [
"goal",
"currency"
]
},
"storefront": {
"type": "object",
"properties": {
"sales_counter": {
"description": "A public count of orders on the product page.",
"type": "boolean"
},
"background_poster": {
"description": "The poster doubles as the page background.",
"type": "boolean"
},
"require_dark": {
"description": "The page renders dark whatever the visitor chose.",
"type": "boolean"
}
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"text",
"what_you_get",
"files",
"tiers",
"prices",
"in_use",
"delete_blocked_by",
"stats",
"ratings",
"id",
"slug",
"title",
"description",
"category",
"listing",
"priority",
"status",
"unlisted",
"published_at",
"discontinued_at",
"unlisted_at",
"created_at",
"updated_at",
"settings",
"metadata"
]
}DELETE/v1/stores/{store}/products/{product}
Deletes a product no order, grant or subscription refers to. Scope product:delete.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
200
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"deleted": {
"type": "boolean",
"const": true
}
},
"required": [
"id",
"deleted"
]
}GET/v1/stores/{store}/products/summaries
Reads the short summaries of up to a page of products by id. Scope product:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
ids | query | required |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
}
}
},
"required": [
"items"
]
}POST/v1/stores/{store}/products/{product}/publish
Publishes a product now or schedules it. Scope product:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"at": {
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2}))?$"
}
},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"poster": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"preview_only": {
"type": "boolean"
},
"from_body": {
"type": "boolean"
},
"position": {
"type": "number"
},
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
}
},
"required": [
"id",
"target",
"role",
"delivery",
"preview_only",
"from_body",
"position",
"asset"
]
},
{
"type": "null"
}
]
},
"text": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"what_you_get": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"files": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"video",
"audio",
"image",
"pdf",
"file"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"width": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"height": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"duration": {
"description": "Seconds.",
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pages": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"url": {
"description": "A public file's lasting URL; null for a private one, or one whose bytes haven't landed.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"attachment_id": {
"description": "The binding a private file opens through; null when the reader can't open it.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"mime",
"name",
"bytes",
"width",
"height",
"duration",
"pages",
"status",
"url",
"attachment_id"
]
}
},
"tiers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"in_use": {
"type": "object",
"properties": {
"prices": {
"type": "number"
},
"grants": {
"type": "number"
},
"orders": {
"type": "number"
},
"discounts": {
"type": "number"
},
"gates": {
"type": "number"
}
},
"required": [
"prices",
"grants",
"orders",
"discounts",
"gates"
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"rank": {
"type": "number"
},
"name": {
"type": "string"
}
},
"required": [
"in_use",
"id",
"product_id",
"rank",
"name"
]
}
},
"prices": {
"type": "array",
"items": {
"type": "object",
"properties": {
"in_use": {
"type": "object",
"properties": {
"orders": {
"type": "number"
},
"subscriptions": {
"type": "number"
},
"checkouts": {
"type": "number"
},
"automations": {
"type": "number"
},
"discounts": {
"type": "number"
}
},
"required": [
"orders",
"subscriptions",
"checkouts",
"automations",
"discounts"
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"tier_id": {
"type": "string"
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"amount": {
"type": "number"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"one_time",
"recurring"
]
},
"period": {
"anyOf": [
{
"type": "object",
"properties": {
"unit": {
"type": "string",
"x-extensible-enum": [
"day",
"week",
"month",
"year"
]
},
"multiplier": {
"type": "number"
}
},
"required": [
"unit",
"multiplier"
]
},
{
"type": "null"
}
]
},
"highlighted": {
"type": "boolean"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"autorenew": {
"description": "Recurring only; false stops the renewal, absent renews.",
"type": "boolean"
},
"renewal_discount": {
"description": "Recurring only, a percent off every renewal.",
"type": "integer",
"minimum": 0,
"maximum": 100
},
"upgrade_multiplier": {
"description": "One-time only, a factor on the difference paid to move up a tier.",
"type": "number",
"minimum": 1,
"maximum": 10
},
"refund_policy": {
"description": "Overrides the product's.",
"type": "string",
"x-extensible-enum": [
"none",
"24h",
"72h",
"7d",
"14d",
"30d"
]
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"archived_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"in_use",
"id",
"product_id",
"tier_id",
"currency",
"exponent",
"amount",
"kind",
"period",
"highlighted",
"title",
"description",
"settings",
"archived_at",
"created_at"
]
}
},
"in_use": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"count": {
"type": "number"
}
},
"required": [
"kind",
"count"
]
}
},
"delete_blocked_by": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"count": {
"type": "number"
}
},
"required": [
"kind",
"count"
]
}
},
"stats": {
"type": "array",
"items": {
"type": "object",
"properties": {
"gross": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"refunded": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"platform_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"processor_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"affiliate_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"currency": {
"type": "string"
},
"settlement": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"transactions": {
"type": "number"
},
"refunds": {
"type": "number"
},
"buyers": {
"type": "number"
}
},
"required": [
"gross",
"refunded",
"platform_fee",
"processor_fee",
"affiliate_fee",
"exponent",
"currency",
"settlement",
"transactions",
"refunds",
"buyers"
]
}
},
"ratings": {
"type": "object",
"properties": {
"published": {
"type": "object",
"properties": {
"count": {
"type": "number"
},
"average": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"histogram": {
"type": "object",
"properties": {
"1": {
"type": "number"
},
"2": {
"type": "number"
},
"3": {
"type": "number"
},
"4": {
"type": "number"
},
"5": {
"type": "number"
}
},
"required": [
"1",
"2",
"3",
"4",
"5"
]
}
},
"required": [
"count",
"average",
"histogram"
]
},
"live": {
"type": "object",
"properties": {
"hidden": {
"type": "number"
},
"count": {
"type": "number"
},
"average": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"histogram": {
"type": "object",
"properties": {
"1": {
"type": "number"
},
"2": {
"type": "number"
},
"3": {
"type": "number"
},
"4": {
"type": "number"
},
"5": {
"type": "number"
}
},
"required": [
"1",
"2",
"3",
"4",
"5"
]
}
},
"required": [
"hidden",
"count",
"average",
"histogram"
]
}
},
"required": [
"published",
"live"
]
},
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"category": {
"type": "string"
},
"listing": {
"type": "string",
"x-extensible-enum": [
"primary",
"secondary"
]
},
"priority": {
"type": "number"
},
"status": {
"type": "string",
"x-extensible-enum": [
"draft",
"scheduled",
"published",
"discontinued"
]
},
"unlisted": {
"type": "boolean"
},
"published_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"discontinued_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"unlisted_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"refund_policy": {
"type": "string",
"x-extensible-enum": [
"none",
"24h",
"72h",
"7d",
"14d",
"30d"
]
},
"progress_tracking": {
"type": "string",
"x-extensible-enum": [
"manual",
"on_open",
"on_complete",
"disabled"
]
},
"reviews_enabled": {
"type": "boolean"
},
"review_summary_visible": {
"description": "Whether customers see the generated review summary; it is written either way.",
"type": "boolean"
},
"purchase_note": {
"description": "Shown beside the buy button.",
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"calendar": {
"description": "A bookable product: the seller's cal.com handle and the host card beside the widget.",
"type": "object",
"properties": {
"calcom": {
"type": "object",
"properties": {
"username": {
"type": "string"
},
"event_slug": {
"type": "string"
}
}
},
"host": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"subtitle": {
"type": "string"
},
"description": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"icon": {
"type": "string"
}
}
}
}
},
"coffee": {
"description": "A tip button: what it is called and what it shows.",
"type": "object",
"properties": {
"emoji": {
"type": "string"
},
"descriptor": {
"type": "string",
"minLength": 3,
"maxLength": 15,
"pattern": "^\\S(.*\\S)?$"
}
}
},
"fundraising": {
"description": "A fundraiser: the goal, in minor units of its currency.",
"type": "object",
"properties": {
"goal": {
"type": "integer",
"minimum": 1
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3
}
},
"required": [
"goal",
"currency"
]
},
"storefront": {
"type": "object",
"properties": {
"sales_counter": {
"description": "A public count of orders on the product page.",
"type": "boolean"
},
"background_poster": {
"description": "The poster doubles as the page background.",
"type": "boolean"
},
"require_dark": {
"description": "The page renders dark whatever the visitor chose.",
"type": "boolean"
}
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"text",
"what_you_get",
"files",
"tiers",
"prices",
"in_use",
"delete_blocked_by",
"stats",
"ratings",
"id",
"slug",
"title",
"description",
"category",
"listing",
"priority",
"status",
"unlisted",
"published_at",
"discontinued_at",
"unlisted_at",
"created_at",
"updated_at",
"settings",
"metadata"
]
}POST/v1/stores/{store}/products/{product}/unpublish
Takes a product back to draft. Scope product:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"poster": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"preview_only": {
"type": "boolean"
},
"from_body": {
"type": "boolean"
},
"position": {
"type": "number"
},
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
}
},
"required": [
"id",
"target",
"role",
"delivery",
"preview_only",
"from_body",
"position",
"asset"
]
},
{
"type": "null"
}
]
},
"text": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"what_you_get": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"files": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"video",
"audio",
"image",
"pdf",
"file"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"width": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"height": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"duration": {
"description": "Seconds.",
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pages": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"url": {
"description": "A public file's lasting URL; null for a private one, or one whose bytes haven't landed.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"attachment_id": {
"description": "The binding a private file opens through; null when the reader can't open it.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"mime",
"name",
"bytes",
"width",
"height",
"duration",
"pages",
"status",
"url",
"attachment_id"
]
}
},
"tiers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"in_use": {
"type": "object",
"properties": {
"prices": {
"type": "number"
},
"grants": {
"type": "number"
},
"orders": {
"type": "number"
},
"discounts": {
"type": "number"
},
"gates": {
"type": "number"
}
},
"required": [
"prices",
"grants",
"orders",
"discounts",
"gates"
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"rank": {
"type": "number"
},
"name": {
"type": "string"
}
},
"required": [
"in_use",
"id",
"product_id",
"rank",
"name"
]
}
},
"prices": {
"type": "array",
"items": {
"type": "object",
"properties": {
"in_use": {
"type": "object",
"properties": {
"orders": {
"type": "number"
},
"subscriptions": {
"type": "number"
},
"checkouts": {
"type": "number"
},
"automations": {
"type": "number"
},
"discounts": {
"type": "number"
}
},
"required": [
"orders",
"subscriptions",
"checkouts",
"automations",
"discounts"
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"tier_id": {
"type": "string"
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"amount": {
"type": "number"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"one_time",
"recurring"
]
},
"period": {
"anyOf": [
{
"type": "object",
"properties": {
"unit": {
"type": "string",
"x-extensible-enum": [
"day",
"week",
"month",
"year"
]
},
"multiplier": {
"type": "number"
}
},
"required": [
"unit",
"multiplier"
]
},
{
"type": "null"
}
]
},
"highlighted": {
"type": "boolean"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"autorenew": {
"description": "Recurring only; false stops the renewal, absent renews.",
"type": "boolean"
},
"renewal_discount": {
"description": "Recurring only, a percent off every renewal.",
"type": "integer",
"minimum": 0,
"maximum": 100
},
"upgrade_multiplier": {
"description": "One-time only, a factor on the difference paid to move up a tier.",
"type": "number",
"minimum": 1,
"maximum": 10
},
"refund_policy": {
"description": "Overrides the product's.",
"type": "string",
"x-extensible-enum": [
"none",
"24h",
"72h",
"7d",
"14d",
"30d"
]
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"archived_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"in_use",
"id",
"product_id",
"tier_id",
"currency",
"exponent",
"amount",
"kind",
"period",
"highlighted",
"title",
"description",
"settings",
"archived_at",
"created_at"
]
}
},
"in_use": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"count": {
"type": "number"
}
},
"required": [
"kind",
"count"
]
}
},
"delete_blocked_by": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"count": {
"type": "number"
}
},
"required": [
"kind",
"count"
]
}
},
"stats": {
"type": "array",
"items": {
"type": "object",
"properties": {
"gross": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"refunded": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"platform_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"processor_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"affiliate_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"currency": {
"type": "string"
},
"settlement": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"transactions": {
"type": "number"
},
"refunds": {
"type": "number"
},
"buyers": {
"type": "number"
}
},
"required": [
"gross",
"refunded",
"platform_fee",
"processor_fee",
"affiliate_fee",
"exponent",
"currency",
"settlement",
"transactions",
"refunds",
"buyers"
]
}
},
"ratings": {
"type": "object",
"properties": {
"published": {
"type": "object",
"properties": {
"count": {
"type": "number"
},
"average": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"histogram": {
"type": "object",
"properties": {
"1": {
"type": "number"
},
"2": {
"type": "number"
},
"3": {
"type": "number"
},
"4": {
"type": "number"
},
"5": {
"type": "number"
}
},
"required": [
"1",
"2",
"3",
"4",
"5"
]
}
},
"required": [
"count",
"average",
"histogram"
]
},
"live": {
"type": "object",
"properties": {
"hidden": {
"type": "number"
},
"count": {
"type": "number"
},
"average": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"histogram": {
"type": "object",
"properties": {
"1": {
"type": "number"
},
"2": {
"type": "number"
},
"3": {
"type": "number"
},
"4": {
"type": "number"
},
"5": {
"type": "number"
}
},
"required": [
"1",
"2",
"3",
"4",
"5"
]
}
},
"required": [
"hidden",
"count",
"average",
"histogram"
]
}
},
"required": [
"published",
"live"
]
},
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"category": {
"type": "string"
},
"listing": {
"type": "string",
"x-extensible-enum": [
"primary",
"secondary"
]
},
"priority": {
"type": "number"
},
"status": {
"type": "string",
"x-extensible-enum": [
"draft",
"scheduled",
"published",
"discontinued"
]
},
"unlisted": {
"type": "boolean"
},
"published_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"discontinued_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"unlisted_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"refund_policy": {
"type": "string",
"x-extensible-enum": [
"none",
"24h",
"72h",
"7d",
"14d",
"30d"
]
},
"progress_tracking": {
"type": "string",
"x-extensible-enum": [
"manual",
"on_open",
"on_complete",
"disabled"
]
},
"reviews_enabled": {
"type": "boolean"
},
"review_summary_visible": {
"description": "Whether customers see the generated review summary; it is written either way.",
"type": "boolean"
},
"purchase_note": {
"description": "Shown beside the buy button.",
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"calendar": {
"description": "A bookable product: the seller's cal.com handle and the host card beside the widget.",
"type": "object",
"properties": {
"calcom": {
"type": "object",
"properties": {
"username": {
"type": "string"
},
"event_slug": {
"type": "string"
}
}
},
"host": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"subtitle": {
"type": "string"
},
"description": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"icon": {
"type": "string"
}
}
}
}
},
"coffee": {
"description": "A tip button: what it is called and what it shows.",
"type": "object",
"properties": {
"emoji": {
"type": "string"
},
"descriptor": {
"type": "string",
"minLength": 3,
"maxLength": 15,
"pattern": "^\\S(.*\\S)?$"
}
}
},
"fundraising": {
"description": "A fundraiser: the goal, in minor units of its currency.",
"type": "object",
"properties": {
"goal": {
"type": "integer",
"minimum": 1
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3
}
},
"required": [
"goal",
"currency"
]
},
"storefront": {
"type": "object",
"properties": {
"sales_counter": {
"description": "A public count of orders on the product page.",
"type": "boolean"
},
"background_poster": {
"description": "The poster doubles as the page background.",
"type": "boolean"
},
"require_dark": {
"description": "The page renders dark whatever the visitor chose.",
"type": "boolean"
}
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"text",
"what_you_get",
"files",
"tiers",
"prices",
"in_use",
"delete_blocked_by",
"stats",
"ratings",
"id",
"slug",
"title",
"description",
"category",
"listing",
"priority",
"status",
"unlisted",
"published_at",
"discontinued_at",
"unlisted_at",
"created_at",
"updated_at",
"settings",
"metadata"
]
}POST/v1/stores/{store}/products/{product}/discontinue
Stops selling a product while keeping it for its holders. Scope product:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"poster": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"preview_only": {
"type": "boolean"
},
"from_body": {
"type": "boolean"
},
"position": {
"type": "number"
},
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
}
},
"required": [
"id",
"target",
"role",
"delivery",
"preview_only",
"from_body",
"position",
"asset"
]
},
{
"type": "null"
}
]
},
"text": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"what_you_get": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"files": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"video",
"audio",
"image",
"pdf",
"file"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"width": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"height": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"duration": {
"description": "Seconds.",
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pages": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"url": {
"description": "A public file's lasting URL; null for a private one, or one whose bytes haven't landed.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"attachment_id": {
"description": "The binding a private file opens through; null when the reader can't open it.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"mime",
"name",
"bytes",
"width",
"height",
"duration",
"pages",
"status",
"url",
"attachment_id"
]
}
},
"tiers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"in_use": {
"type": "object",
"properties": {
"prices": {
"type": "number"
},
"grants": {
"type": "number"
},
"orders": {
"type": "number"
},
"discounts": {
"type": "number"
},
"gates": {
"type": "number"
}
},
"required": [
"prices",
"grants",
"orders",
"discounts",
"gates"
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"rank": {
"type": "number"
},
"name": {
"type": "string"
}
},
"required": [
"in_use",
"id",
"product_id",
"rank",
"name"
]
}
},
"prices": {
"type": "array",
"items": {
"type": "object",
"properties": {
"in_use": {
"type": "object",
"properties": {
"orders": {
"type": "number"
},
"subscriptions": {
"type": "number"
},
"checkouts": {
"type": "number"
},
"automations": {
"type": "number"
},
"discounts": {
"type": "number"
}
},
"required": [
"orders",
"subscriptions",
"checkouts",
"automations",
"discounts"
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"tier_id": {
"type": "string"
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"amount": {
"type": "number"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"one_time",
"recurring"
]
},
"period": {
"anyOf": [
{
"type": "object",
"properties": {
"unit": {
"type": "string",
"x-extensible-enum": [
"day",
"week",
"month",
"year"
]
},
"multiplier": {
"type": "number"
}
},
"required": [
"unit",
"multiplier"
]
},
{
"type": "null"
}
]
},
"highlighted": {
"type": "boolean"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"autorenew": {
"description": "Recurring only; false stops the renewal, absent renews.",
"type": "boolean"
},
"renewal_discount": {
"description": "Recurring only, a percent off every renewal.",
"type": "integer",
"minimum": 0,
"maximum": 100
},
"upgrade_multiplier": {
"description": "One-time only, a factor on the difference paid to move up a tier.",
"type": "number",
"minimum": 1,
"maximum": 10
},
"refund_policy": {
"description": "Overrides the product's.",
"type": "string",
"x-extensible-enum": [
"none",
"24h",
"72h",
"7d",
"14d",
"30d"
]
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"archived_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"in_use",
"id",
"product_id",
"tier_id",
"currency",
"exponent",
"amount",
"kind",
"period",
"highlighted",
"title",
"description",
"settings",
"archived_at",
"created_at"
]
}
},
"in_use": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"count": {
"type": "number"
}
},
"required": [
"kind",
"count"
]
}
},
"delete_blocked_by": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"count": {
"type": "number"
}
},
"required": [
"kind",
"count"
]
}
},
"stats": {
"type": "array",
"items": {
"type": "object",
"properties": {
"gross": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"refunded": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"platform_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"processor_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"affiliate_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"currency": {
"type": "string"
},
"settlement": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"transactions": {
"type": "number"
},
"refunds": {
"type": "number"
},
"buyers": {
"type": "number"
}
},
"required": [
"gross",
"refunded",
"platform_fee",
"processor_fee",
"affiliate_fee",
"exponent",
"currency",
"settlement",
"transactions",
"refunds",
"buyers"
]
}
},
"ratings": {
"type": "object",
"properties": {
"published": {
"type": "object",
"properties": {
"count": {
"type": "number"
},
"average": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"histogram": {
"type": "object",
"properties": {
"1": {
"type": "number"
},
"2": {
"type": "number"
},
"3": {
"type": "number"
},
"4": {
"type": "number"
},
"5": {
"type": "number"
}
},
"required": [
"1",
"2",
"3",
"4",
"5"
]
}
},
"required": [
"count",
"average",
"histogram"
]
},
"live": {
"type": "object",
"properties": {
"hidden": {
"type": "number"
},
"count": {
"type": "number"
},
"average": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"histogram": {
"type": "object",
"properties": {
"1": {
"type": "number"
},
"2": {
"type": "number"
},
"3": {
"type": "number"
},
"4": {
"type": "number"
},
"5": {
"type": "number"
}
},
"required": [
"1",
"2",
"3",
"4",
"5"
]
}
},
"required": [
"hidden",
"count",
"average",
"histogram"
]
}
},
"required": [
"published",
"live"
]
},
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"category": {
"type": "string"
},
"listing": {
"type": "string",
"x-extensible-enum": [
"primary",
"secondary"
]
},
"priority": {
"type": "number"
},
"status": {
"type": "string",
"x-extensible-enum": [
"draft",
"scheduled",
"published",
"discontinued"
]
},
"unlisted": {
"type": "boolean"
},
"published_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"discontinued_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"unlisted_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"refund_policy": {
"type": "string",
"x-extensible-enum": [
"none",
"24h",
"72h",
"7d",
"14d",
"30d"
]
},
"progress_tracking": {
"type": "string",
"x-extensible-enum": [
"manual",
"on_open",
"on_complete",
"disabled"
]
},
"reviews_enabled": {
"type": "boolean"
},
"review_summary_visible": {
"description": "Whether customers see the generated review summary; it is written either way.",
"type": "boolean"
},
"purchase_note": {
"description": "Shown beside the buy button.",
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"calendar": {
"description": "A bookable product: the seller's cal.com handle and the host card beside the widget.",
"type": "object",
"properties": {
"calcom": {
"type": "object",
"properties": {
"username": {
"type": "string"
},
"event_slug": {
"type": "string"
}
}
},
"host": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"subtitle": {
"type": "string"
},
"description": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"icon": {
"type": "string"
}
}
}
}
},
"coffee": {
"description": "A tip button: what it is called and what it shows.",
"type": "object",
"properties": {
"emoji": {
"type": "string"
},
"descriptor": {
"type": "string",
"minLength": 3,
"maxLength": 15,
"pattern": "^\\S(.*\\S)?$"
}
}
},
"fundraising": {
"description": "A fundraiser: the goal, in minor units of its currency.",
"type": "object",
"properties": {
"goal": {
"type": "integer",
"minimum": 1
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3
}
},
"required": [
"goal",
"currency"
]
},
"storefront": {
"type": "object",
"properties": {
"sales_counter": {
"description": "A public count of orders on the product page.",
"type": "boolean"
},
"background_poster": {
"description": "The poster doubles as the page background.",
"type": "boolean"
},
"require_dark": {
"description": "The page renders dark whatever the visitor chose.",
"type": "boolean"
}
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"text",
"what_you_get",
"files",
"tiers",
"prices",
"in_use",
"delete_blocked_by",
"stats",
"ratings",
"id",
"slug",
"title",
"description",
"category",
"listing",
"priority",
"status",
"unlisted",
"published_at",
"discontinued_at",
"unlisted_at",
"created_at",
"updated_at",
"settings",
"metadata"
]
}POST/v1/stores/{store}/products/{product}/reinstate
Sells a discontinued product again. Scope product:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"poster": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"preview_only": {
"type": "boolean"
},
"from_body": {
"type": "boolean"
},
"position": {
"type": "number"
},
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
}
},
"required": [
"id",
"target",
"role",
"delivery",
"preview_only",
"from_body",
"position",
"asset"
]
},
{
"type": "null"
}
]
},
"text": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"what_you_get": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"files": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"video",
"audio",
"image",
"pdf",
"file"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"width": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"height": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"duration": {
"description": "Seconds.",
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pages": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"url": {
"description": "A public file's lasting URL; null for a private one, or one whose bytes haven't landed.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"attachment_id": {
"description": "The binding a private file opens through; null when the reader can't open it.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"mime",
"name",
"bytes",
"width",
"height",
"duration",
"pages",
"status",
"url",
"attachment_id"
]
}
},
"tiers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"in_use": {
"type": "object",
"properties": {
"prices": {
"type": "number"
},
"grants": {
"type": "number"
},
"orders": {
"type": "number"
},
"discounts": {
"type": "number"
},
"gates": {
"type": "number"
}
},
"required": [
"prices",
"grants",
"orders",
"discounts",
"gates"
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"rank": {
"type": "number"
},
"name": {
"type": "string"
}
},
"required": [
"in_use",
"id",
"product_id",
"rank",
"name"
]
}
},
"prices": {
"type": "array",
"items": {
"type": "object",
"properties": {
"in_use": {
"type": "object",
"properties": {
"orders": {
"type": "number"
},
"subscriptions": {
"type": "number"
},
"checkouts": {
"type": "number"
},
"automations": {
"type": "number"
},
"discounts": {
"type": "number"
}
},
"required": [
"orders",
"subscriptions",
"checkouts",
"automations",
"discounts"
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"tier_id": {
"type": "string"
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"amount": {
"type": "number"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"one_time",
"recurring"
]
},
"period": {
"anyOf": [
{
"type": "object",
"properties": {
"unit": {
"type": "string",
"x-extensible-enum": [
"day",
"week",
"month",
"year"
]
},
"multiplier": {
"type": "number"
}
},
"required": [
"unit",
"multiplier"
]
},
{
"type": "null"
}
]
},
"highlighted": {
"type": "boolean"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"autorenew": {
"description": "Recurring only; false stops the renewal, absent renews.",
"type": "boolean"
},
"renewal_discount": {
"description": "Recurring only, a percent off every renewal.",
"type": "integer",
"minimum": 0,
"maximum": 100
},
"upgrade_multiplier": {
"description": "One-time only, a factor on the difference paid to move up a tier.",
"type": "number",
"minimum": 1,
"maximum": 10
},
"refund_policy": {
"description": "Overrides the product's.",
"type": "string",
"x-extensible-enum": [
"none",
"24h",
"72h",
"7d",
"14d",
"30d"
]
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"archived_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"in_use",
"id",
"product_id",
"tier_id",
"currency",
"exponent",
"amount",
"kind",
"period",
"highlighted",
"title",
"description",
"settings",
"archived_at",
"created_at"
]
}
},
"in_use": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"count": {
"type": "number"
}
},
"required": [
"kind",
"count"
]
}
},
"delete_blocked_by": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"count": {
"type": "number"
}
},
"required": [
"kind",
"count"
]
}
},
"stats": {
"type": "array",
"items": {
"type": "object",
"properties": {
"gross": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"refunded": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"platform_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"processor_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"affiliate_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"currency": {
"type": "string"
},
"settlement": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"transactions": {
"type": "number"
},
"refunds": {
"type": "number"
},
"buyers": {
"type": "number"
}
},
"required": [
"gross",
"refunded",
"platform_fee",
"processor_fee",
"affiliate_fee",
"exponent",
"currency",
"settlement",
"transactions",
"refunds",
"buyers"
]
}
},
"ratings": {
"type": "object",
"properties": {
"published": {
"type": "object",
"properties": {
"count": {
"type": "number"
},
"average": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"histogram": {
"type": "object",
"properties": {
"1": {
"type": "number"
},
"2": {
"type": "number"
},
"3": {
"type": "number"
},
"4": {
"type": "number"
},
"5": {
"type": "number"
}
},
"required": [
"1",
"2",
"3",
"4",
"5"
]
}
},
"required": [
"count",
"average",
"histogram"
]
},
"live": {
"type": "object",
"properties": {
"hidden": {
"type": "number"
},
"count": {
"type": "number"
},
"average": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"histogram": {
"type": "object",
"properties": {
"1": {
"type": "number"
},
"2": {
"type": "number"
},
"3": {
"type": "number"
},
"4": {
"type": "number"
},
"5": {
"type": "number"
}
},
"required": [
"1",
"2",
"3",
"4",
"5"
]
}
},
"required": [
"hidden",
"count",
"average",
"histogram"
]
}
},
"required": [
"published",
"live"
]
},
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"category": {
"type": "string"
},
"listing": {
"type": "string",
"x-extensible-enum": [
"primary",
"secondary"
]
},
"priority": {
"type": "number"
},
"status": {
"type": "string",
"x-extensible-enum": [
"draft",
"scheduled",
"published",
"discontinued"
]
},
"unlisted": {
"type": "boolean"
},
"published_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"discontinued_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"unlisted_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"refund_policy": {
"type": "string",
"x-extensible-enum": [
"none",
"24h",
"72h",
"7d",
"14d",
"30d"
]
},
"progress_tracking": {
"type": "string",
"x-extensible-enum": [
"manual",
"on_open",
"on_complete",
"disabled"
]
},
"reviews_enabled": {
"type": "boolean"
},
"review_summary_visible": {
"description": "Whether customers see the generated review summary; it is written either way.",
"type": "boolean"
},
"purchase_note": {
"description": "Shown beside the buy button.",
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"calendar": {
"description": "A bookable product: the seller's cal.com handle and the host card beside the widget.",
"type": "object",
"properties": {
"calcom": {
"type": "object",
"properties": {
"username": {
"type": "string"
},
"event_slug": {
"type": "string"
}
}
},
"host": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"subtitle": {
"type": "string"
},
"description": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"icon": {
"type": "string"
}
}
}
}
},
"coffee": {
"description": "A tip button: what it is called and what it shows.",
"type": "object",
"properties": {
"emoji": {
"type": "string"
},
"descriptor": {
"type": "string",
"minLength": 3,
"maxLength": 15,
"pattern": "^\\S(.*\\S)?$"
}
}
},
"fundraising": {
"description": "A fundraiser: the goal, in minor units of its currency.",
"type": "object",
"properties": {
"goal": {
"type": "integer",
"minimum": 1
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3
}
},
"required": [
"goal",
"currency"
]
},
"storefront": {
"type": "object",
"properties": {
"sales_counter": {
"description": "A public count of orders on the product page.",
"type": "boolean"
},
"background_poster": {
"description": "The poster doubles as the page background.",
"type": "boolean"
},
"require_dark": {
"description": "The page renders dark whatever the visitor chose.",
"type": "boolean"
}
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"text",
"what_you_get",
"files",
"tiers",
"prices",
"in_use",
"delete_blocked_by",
"stats",
"ratings",
"id",
"slug",
"title",
"description",
"category",
"listing",
"priority",
"status",
"unlisted",
"published_at",
"discontinued_at",
"unlisted_at",
"created_at",
"updated_at",
"settings",
"metadata"
]
}POST/v1/stores/{store}/products/{product}/unlist
Hides a product from the store's listings while keeping its page reachable. Scope product:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"poster": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"preview_only": {
"type": "boolean"
},
"from_body": {
"type": "boolean"
},
"position": {
"type": "number"
},
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
}
},
"required": [
"id",
"target",
"role",
"delivery",
"preview_only",
"from_body",
"position",
"asset"
]
},
{
"type": "null"
}
]
},
"text": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"what_you_get": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"files": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"video",
"audio",
"image",
"pdf",
"file"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"width": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"height": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"duration": {
"description": "Seconds.",
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pages": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"url": {
"description": "A public file's lasting URL; null for a private one, or one whose bytes haven't landed.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"attachment_id": {
"description": "The binding a private file opens through; null when the reader can't open it.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"mime",
"name",
"bytes",
"width",
"height",
"duration",
"pages",
"status",
"url",
"attachment_id"
]
}
},
"tiers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"in_use": {
"type": "object",
"properties": {
"prices": {
"type": "number"
},
"grants": {
"type": "number"
},
"orders": {
"type": "number"
},
"discounts": {
"type": "number"
},
"gates": {
"type": "number"
}
},
"required": [
"prices",
"grants",
"orders",
"discounts",
"gates"
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"rank": {
"type": "number"
},
"name": {
"type": "string"
}
},
"required": [
"in_use",
"id",
"product_id",
"rank",
"name"
]
}
},
"prices": {
"type": "array",
"items": {
"type": "object",
"properties": {
"in_use": {
"type": "object",
"properties": {
"orders": {
"type": "number"
},
"subscriptions": {
"type": "number"
},
"checkouts": {
"type": "number"
},
"automations": {
"type": "number"
},
"discounts": {
"type": "number"
}
},
"required": [
"orders",
"subscriptions",
"checkouts",
"automations",
"discounts"
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"tier_id": {
"type": "string"
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"amount": {
"type": "number"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"one_time",
"recurring"
]
},
"period": {
"anyOf": [
{
"type": "object",
"properties": {
"unit": {
"type": "string",
"x-extensible-enum": [
"day",
"week",
"month",
"year"
]
},
"multiplier": {
"type": "number"
}
},
"required": [
"unit",
"multiplier"
]
},
{
"type": "null"
}
]
},
"highlighted": {
"type": "boolean"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"autorenew": {
"description": "Recurring only; false stops the renewal, absent renews.",
"type": "boolean"
},
"renewal_discount": {
"description": "Recurring only, a percent off every renewal.",
"type": "integer",
"minimum": 0,
"maximum": 100
},
"upgrade_multiplier": {
"description": "One-time only, a factor on the difference paid to move up a tier.",
"type": "number",
"minimum": 1,
"maximum": 10
},
"refund_policy": {
"description": "Overrides the product's.",
"type": "string",
"x-extensible-enum": [
"none",
"24h",
"72h",
"7d",
"14d",
"30d"
]
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"archived_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"in_use",
"id",
"product_id",
"tier_id",
"currency",
"exponent",
"amount",
"kind",
"period",
"highlighted",
"title",
"description",
"settings",
"archived_at",
"created_at"
]
}
},
"in_use": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"count": {
"type": "number"
}
},
"required": [
"kind",
"count"
]
}
},
"delete_blocked_by": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"count": {
"type": "number"
}
},
"required": [
"kind",
"count"
]
}
},
"stats": {
"type": "array",
"items": {
"type": "object",
"properties": {
"gross": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"refunded": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"platform_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"processor_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"affiliate_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"currency": {
"type": "string"
},
"settlement": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"transactions": {
"type": "number"
},
"refunds": {
"type": "number"
},
"buyers": {
"type": "number"
}
},
"required": [
"gross",
"refunded",
"platform_fee",
"processor_fee",
"affiliate_fee",
"exponent",
"currency",
"settlement",
"transactions",
"refunds",
"buyers"
]
}
},
"ratings": {
"type": "object",
"properties": {
"published": {
"type": "object",
"properties": {
"count": {
"type": "number"
},
"average": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"histogram": {
"type": "object",
"properties": {
"1": {
"type": "number"
},
"2": {
"type": "number"
},
"3": {
"type": "number"
},
"4": {
"type": "number"
},
"5": {
"type": "number"
}
},
"required": [
"1",
"2",
"3",
"4",
"5"
]
}
},
"required": [
"count",
"average",
"histogram"
]
},
"live": {
"type": "object",
"properties": {
"hidden": {
"type": "number"
},
"count": {
"type": "number"
},
"average": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"histogram": {
"type": "object",
"properties": {
"1": {
"type": "number"
},
"2": {
"type": "number"
},
"3": {
"type": "number"
},
"4": {
"type": "number"
},
"5": {
"type": "number"
}
},
"required": [
"1",
"2",
"3",
"4",
"5"
]
}
},
"required": [
"hidden",
"count",
"average",
"histogram"
]
}
},
"required": [
"published",
"live"
]
},
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"category": {
"type": "string"
},
"listing": {
"type": "string",
"x-extensible-enum": [
"primary",
"secondary"
]
},
"priority": {
"type": "number"
},
"status": {
"type": "string",
"x-extensible-enum": [
"draft",
"scheduled",
"published",
"discontinued"
]
},
"unlisted": {
"type": "boolean"
},
"published_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"discontinued_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"unlisted_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"refund_policy": {
"type": "string",
"x-extensible-enum": [
"none",
"24h",
"72h",
"7d",
"14d",
"30d"
]
},
"progress_tracking": {
"type": "string",
"x-extensible-enum": [
"manual",
"on_open",
"on_complete",
"disabled"
]
},
"reviews_enabled": {
"type": "boolean"
},
"review_summary_visible": {
"description": "Whether customers see the generated review summary; it is written either way.",
"type": "boolean"
},
"purchase_note": {
"description": "Shown beside the buy button.",
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"calendar": {
"description": "A bookable product: the seller's cal.com handle and the host card beside the widget.",
"type": "object",
"properties": {
"calcom": {
"type": "object",
"properties": {
"username": {
"type": "string"
},
"event_slug": {
"type": "string"
}
}
},
"host": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"subtitle": {
"type": "string"
},
"description": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"icon": {
"type": "string"
}
}
}
}
},
"coffee": {
"description": "A tip button: what it is called and what it shows.",
"type": "object",
"properties": {
"emoji": {
"type": "string"
},
"descriptor": {
"type": "string",
"minLength": 3,
"maxLength": 15,
"pattern": "^\\S(.*\\S)?$"
}
}
},
"fundraising": {
"description": "A fundraiser: the goal, in minor units of its currency.",
"type": "object",
"properties": {
"goal": {
"type": "integer",
"minimum": 1
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3
}
},
"required": [
"goal",
"currency"
]
},
"storefront": {
"type": "object",
"properties": {
"sales_counter": {
"description": "A public count of orders on the product page.",
"type": "boolean"
},
"background_poster": {
"description": "The poster doubles as the page background.",
"type": "boolean"
},
"require_dark": {
"description": "The page renders dark whatever the visitor chose.",
"type": "boolean"
}
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"text",
"what_you_get",
"files",
"tiers",
"prices",
"in_use",
"delete_blocked_by",
"stats",
"ratings",
"id",
"slug",
"title",
"description",
"category",
"listing",
"priority",
"status",
"unlisted",
"published_at",
"discontinued_at",
"unlisted_at",
"created_at",
"updated_at",
"settings",
"metadata"
]
}POST/v1/stores/{store}/products/{product}/relist
Shows an unlisted product in the store's listings again. Scope product:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"poster": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"preview_only": {
"type": "boolean"
},
"from_body": {
"type": "boolean"
},
"position": {
"type": "number"
},
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
}
},
"required": [
"id",
"target",
"role",
"delivery",
"preview_only",
"from_body",
"position",
"asset"
]
},
{
"type": "null"
}
]
},
"text": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"what_you_get": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"files": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"video",
"audio",
"image",
"pdf",
"file"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"width": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"height": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"duration": {
"description": "Seconds.",
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pages": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"url": {
"description": "A public file's lasting URL; null for a private one, or one whose bytes haven't landed.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"attachment_id": {
"description": "The binding a private file opens through; null when the reader can't open it.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"mime",
"name",
"bytes",
"width",
"height",
"duration",
"pages",
"status",
"url",
"attachment_id"
]
}
},
"tiers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"in_use": {
"type": "object",
"properties": {
"prices": {
"type": "number"
},
"grants": {
"type": "number"
},
"orders": {
"type": "number"
},
"discounts": {
"type": "number"
},
"gates": {
"type": "number"
}
},
"required": [
"prices",
"grants",
"orders",
"discounts",
"gates"
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"rank": {
"type": "number"
},
"name": {
"type": "string"
}
},
"required": [
"in_use",
"id",
"product_id",
"rank",
"name"
]
}
},
"prices": {
"type": "array",
"items": {
"type": "object",
"properties": {
"in_use": {
"type": "object",
"properties": {
"orders": {
"type": "number"
},
"subscriptions": {
"type": "number"
},
"checkouts": {
"type": "number"
},
"automations": {
"type": "number"
},
"discounts": {
"type": "number"
}
},
"required": [
"orders",
"subscriptions",
"checkouts",
"automations",
"discounts"
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"tier_id": {
"type": "string"
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"amount": {
"type": "number"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"one_time",
"recurring"
]
},
"period": {
"anyOf": [
{
"type": "object",
"properties": {
"unit": {
"type": "string",
"x-extensible-enum": [
"day",
"week",
"month",
"year"
]
},
"multiplier": {
"type": "number"
}
},
"required": [
"unit",
"multiplier"
]
},
{
"type": "null"
}
]
},
"highlighted": {
"type": "boolean"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"autorenew": {
"description": "Recurring only; false stops the renewal, absent renews.",
"type": "boolean"
},
"renewal_discount": {
"description": "Recurring only, a percent off every renewal.",
"type": "integer",
"minimum": 0,
"maximum": 100
},
"upgrade_multiplier": {
"description": "One-time only, a factor on the difference paid to move up a tier.",
"type": "number",
"minimum": 1,
"maximum": 10
},
"refund_policy": {
"description": "Overrides the product's.",
"type": "string",
"x-extensible-enum": [
"none",
"24h",
"72h",
"7d",
"14d",
"30d"
]
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"archived_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"in_use",
"id",
"product_id",
"tier_id",
"currency",
"exponent",
"amount",
"kind",
"period",
"highlighted",
"title",
"description",
"settings",
"archived_at",
"created_at"
]
}
},
"in_use": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"count": {
"type": "number"
}
},
"required": [
"kind",
"count"
]
}
},
"delete_blocked_by": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"count": {
"type": "number"
}
},
"required": [
"kind",
"count"
]
}
},
"stats": {
"type": "array",
"items": {
"type": "object",
"properties": {
"gross": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"refunded": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"platform_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"processor_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"affiliate_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"currency": {
"type": "string"
},
"settlement": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"transactions": {
"type": "number"
},
"refunds": {
"type": "number"
},
"buyers": {
"type": "number"
}
},
"required": [
"gross",
"refunded",
"platform_fee",
"processor_fee",
"affiliate_fee",
"exponent",
"currency",
"settlement",
"transactions",
"refunds",
"buyers"
]
}
},
"ratings": {
"type": "object",
"properties": {
"published": {
"type": "object",
"properties": {
"count": {
"type": "number"
},
"average": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"histogram": {
"type": "object",
"properties": {
"1": {
"type": "number"
},
"2": {
"type": "number"
},
"3": {
"type": "number"
},
"4": {
"type": "number"
},
"5": {
"type": "number"
}
},
"required": [
"1",
"2",
"3",
"4",
"5"
]
}
},
"required": [
"count",
"average",
"histogram"
]
},
"live": {
"type": "object",
"properties": {
"hidden": {
"type": "number"
},
"count": {
"type": "number"
},
"average": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"histogram": {
"type": "object",
"properties": {
"1": {
"type": "number"
},
"2": {
"type": "number"
},
"3": {
"type": "number"
},
"4": {
"type": "number"
},
"5": {
"type": "number"
}
},
"required": [
"1",
"2",
"3",
"4",
"5"
]
}
},
"required": [
"hidden",
"count",
"average",
"histogram"
]
}
},
"required": [
"published",
"live"
]
},
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"category": {
"type": "string"
},
"listing": {
"type": "string",
"x-extensible-enum": [
"primary",
"secondary"
]
},
"priority": {
"type": "number"
},
"status": {
"type": "string",
"x-extensible-enum": [
"draft",
"scheduled",
"published",
"discontinued"
]
},
"unlisted": {
"type": "boolean"
},
"published_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"discontinued_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"unlisted_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"refund_policy": {
"type": "string",
"x-extensible-enum": [
"none",
"24h",
"72h",
"7d",
"14d",
"30d"
]
},
"progress_tracking": {
"type": "string",
"x-extensible-enum": [
"manual",
"on_open",
"on_complete",
"disabled"
]
},
"reviews_enabled": {
"type": "boolean"
},
"review_summary_visible": {
"description": "Whether customers see the generated review summary; it is written either way.",
"type": "boolean"
},
"purchase_note": {
"description": "Shown beside the buy button.",
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"calendar": {
"description": "A bookable product: the seller's cal.com handle and the host card beside the widget.",
"type": "object",
"properties": {
"calcom": {
"type": "object",
"properties": {
"username": {
"type": "string"
},
"event_slug": {
"type": "string"
}
}
},
"host": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"subtitle": {
"type": "string"
},
"description": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"icon": {
"type": "string"
}
}
}
}
},
"coffee": {
"description": "A tip button: what it is called and what it shows.",
"type": "object",
"properties": {
"emoji": {
"type": "string"
},
"descriptor": {
"type": "string",
"minLength": 3,
"maxLength": 15,
"pattern": "^\\S(.*\\S)?$"
}
}
},
"fundraising": {
"description": "A fundraiser: the goal, in minor units of its currency.",
"type": "object",
"properties": {
"goal": {
"type": "integer",
"minimum": 1
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3
}
},
"required": [
"goal",
"currency"
]
},
"storefront": {
"type": "object",
"properties": {
"sales_counter": {
"description": "A public count of orders on the product page.",
"type": "boolean"
},
"background_poster": {
"description": "The poster doubles as the page background.",
"type": "boolean"
},
"require_dark": {
"description": "The page renders dark whatever the visitor chose.",
"type": "boolean"
}
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"text",
"what_you_get",
"files",
"tiers",
"prices",
"in_use",
"delete_blocked_by",
"stats",
"ratings",
"id",
"slug",
"title",
"description",
"category",
"listing",
"priority",
"status",
"unlisted",
"published_at",
"discontinued_at",
"unlisted_at",
"created_at",
"updated_at",
"settings",
"metadata"
]
}GET/v1/stores/{store}/tiers
Pages the tiers of the store's products, or of one product. Scope product:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | query | An id, or slug:<slug>. | |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | ||
direction | query | ||
limit | query | ||
cursor | query | ||
count | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"in_use": {
"type": "object",
"properties": {
"prices": {
"type": "number"
},
"grants": {
"type": "number"
},
"orders": {
"type": "number"
},
"discounts": {
"type": "number"
},
"gates": {
"type": "number"
}
},
"required": [
"prices",
"grants",
"orders",
"discounts",
"gates"
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"rank": {
"type": "number"
},
"name": {
"type": "string"
}
},
"required": [
"product",
"in_use",
"id",
"product_id",
"rank",
"name"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}POST/v1/stores/{store}/products/{product}/tiers
Adds a tier to a product. Scope product:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120
}
},
"required": [
"name"
],
"additionalProperties": false
}201
Schema
{
"type": "object",
"properties": {
"in_use": {
"type": "object",
"properties": {
"prices": {
"type": "number"
},
"grants": {
"type": "number"
},
"orders": {
"type": "number"
},
"discounts": {
"type": "number"
},
"gates": {
"type": "number"
}
},
"required": [
"prices",
"grants",
"orders",
"discounts",
"gates"
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"rank": {
"type": "number"
},
"name": {
"type": "string"
}
},
"required": [
"in_use",
"id",
"product_id",
"rank",
"name"
]
}PATCH/v1/stores/{store}/tiers/{tier}
Renames a tier. Scope product:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
tier | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120
}
},
"required": [
"name"
],
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"in_use": {
"type": "object",
"properties": {
"prices": {
"type": "number"
},
"grants": {
"type": "number"
},
"orders": {
"type": "number"
},
"discounts": {
"type": "number"
},
"gates": {
"type": "number"
}
},
"required": [
"prices",
"grants",
"orders",
"discounts",
"gates"
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"rank": {
"type": "number"
},
"name": {
"type": "string"
}
},
"required": [
"in_use",
"id",
"product_id",
"rank",
"name"
]
}DELETE/v1/stores/{store}/tiers/{tier}
Deletes a tier no price or holder refers to. Scope product:delete.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
tier | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
200
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"deleted": {
"type": "boolean",
"const": true
}
},
"required": [
"id",
"deleted"
]
}POST/v1/stores/{store}/products/{product}/tiers/reorder
Sets the order of a product's tiers. Scope product:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"tiers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 10000
},
"from": {
"description": "The order the seller saw; a reorder over a moved order is refused.",
"type": "object",
"properties": {
"tiers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 10000
}
},
"required": [
"tiers"
],
"additionalProperties": false
}
},
"required": [
"tiers"
],
"additionalProperties": false
}200
Schema
{
"type": "array",
"items": {
"type": "object",
"properties": {
"in_use": {
"type": "object",
"properties": {
"prices": {
"type": "number"
},
"grants": {
"type": "number"
},
"orders": {
"type": "number"
},
"discounts": {
"type": "number"
},
"gates": {
"type": "number"
}
},
"required": [
"prices",
"grants",
"orders",
"discounts",
"gates"
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"rank": {
"type": "number"
},
"name": {
"type": "string"
}
},
"required": [
"in_use",
"id",
"product_id",
"rank",
"name"
]
}
}GET/v1/stores/{store}/{kind}/{id}/access_requirements
Lists the tiers that unlock a product, entry, page or file. Scope product:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
kind | path | required | The target's kind, in the plural. |
id | path | required |
200
Schema
{
"type": "array",
"items": {
"type": "object",
"properties": {
"resource": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"entry",
"quiz",
"attachment",
"page",
"download"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"channel": {
"type": "string",
"x-extensible-enum": [
"api",
"any",
"web",
"mcp",
"feed"
]
},
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"resource",
"channel",
"tier_id"
]
}
}PUT/v1/stores/{store}/{kind}/{id}/access_requirements
Requires a tier to unlock a resource. Scope product:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
kind | path | required | The target's kind, in the plural. |
id | path | required |
Body
Schema
{
"type": "object",
"properties": {
"channel": {
"type": "string",
"enum": [
"api",
"any",
"web",
"mcp",
"feed"
]
},
"tier": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"from": {
"type": "object",
"properties": {
"preview_only": {
"type": "boolean"
},
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"additionalProperties": false
},
"if_none": {
"description": "Refused when the resource already has a row on the channel, as a rule put back over one set since.",
"type": "boolean"
}
},
"required": [
"channel",
"tier"
],
"additionalProperties": false
}200
Schema
{
"type": "array",
"items": {
"type": "object",
"properties": {
"resource": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"entry",
"quiz",
"attachment",
"page",
"download"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"channel": {
"type": "string",
"x-extensible-enum": [
"api",
"any",
"web",
"mcp",
"feed"
]
},
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"resource",
"channel",
"tier_id"
]
}
}DELETE/v1/stores/{store}/{kind}/{id}/access_requirements
Removes a tier requirement from a resource. Scope product:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
kind | path | required | The target's kind, in the plural. |
id | path | required | |
channel | query | required | |
from | query | ||
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
200
Schema
{
"type": "array",
"items": {
"type": "object",
"properties": {
"resource": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"entry",
"quiz",
"attachment",
"page",
"download"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"channel": {
"type": "string",
"x-extensible-enum": [
"api",
"any",
"web",
"mcp",
"feed"
]
},
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"resource",
"channel",
"tier_id"
]
}
}POST/v1/stores/{store}/access_requirements/query
Reads the access requirements of many resources at once. Scope product:read. Reads only; sent as a body since its arguments are too deep for a query string.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
Body
Schema
{
"type": "object",
"properties": {
"resources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"product",
"entry",
"quiz",
"attachment",
"page",
"download"
]
},
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"kind",
"id"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 500
}
},
"required": [
"resources"
],
"additionalProperties": false
}200
Schema
{
"type": "array",
"items": {
"type": "object",
"properties": {
"resource": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"entry",
"quiz",
"attachment",
"page",
"download"
]
},
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"kind",
"id"
]
},
"requirements": {
"type": "array",
"items": {
"type": "object",
"properties": {
"resource": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"entry",
"quiz",
"attachment",
"page",
"download"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"channel": {
"type": "string",
"x-extensible-enum": [
"api",
"any",
"web",
"mcp",
"feed"
]
},
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"resource",
"channel",
"tier_id"
]
}
}
},
"required": [
"resource",
"requirements"
]
}
}GET/v1/stores/{store}/products/{product}/stats
Reads a product's sales and audience stats over a period. Scope product:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
from | query | ||
to | query | ||
bucket | query |
200
Schema
{
"type": "object",
"properties": {
"rebuilding": {
"type": "boolean"
},
"currencies": {
"type": "array",
"items": {
"type": "object",
"properties": {
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"gross": {
"anyOf": [
{
"type": "object",
"properties": {
"current": {
"type": "number"
},
"previous": {
"type": "number"
}
},
"required": [
"current",
"previous"
]
},
{
"type": "null"
}
]
},
"refunded": {
"anyOf": [
{
"type": "object",
"properties": {
"current": {
"type": "number"
},
"previous": {
"type": "number"
}
},
"required": [
"current",
"previous"
]
},
{
"type": "null"
}
]
},
"platform_fee": {
"anyOf": [
{
"type": "object",
"properties": {
"current": {
"type": "number"
},
"previous": {
"type": "number"
}
},
"required": [
"current",
"previous"
]
},
{
"type": "null"
}
]
},
"processor_fee": {
"anyOf": [
{
"type": "object",
"properties": {
"current": {
"type": "number"
},
"previous": {
"type": "number"
}
},
"required": [
"current",
"previous"
]
},
{
"type": "null"
}
]
},
"affiliate_fee": {
"anyOf": [
{
"type": "object",
"properties": {
"current": {
"type": "number"
},
"previous": {
"type": "number"
}
},
"required": [
"current",
"previous"
]
},
{
"type": "null"
}
]
},
"net": {
"anyOf": [
{
"type": "object",
"properties": {
"current": {
"type": "number"
},
"previous": {
"type": "number"
}
},
"required": [
"current",
"previous"
]
},
{
"type": "null"
}
]
},
"transactions": {
"type": "object",
"properties": {
"current": {
"type": "number"
},
"previous": {
"type": "number"
}
},
"required": [
"current",
"previous"
]
},
"buyers": {
"type": "object",
"properties": {
"current": {
"type": "number"
},
"previous": {
"type": "number"
}
},
"required": [
"current",
"previous"
]
},
"refunds": {
"type": "object",
"properties": {
"current": {
"type": "number"
},
"previous": {
"type": "number"
}
},
"required": [
"current",
"previous"
]
},
"series": {
"type": "array",
"items": {
"type": "object",
"properties": {
"start": {
"type": "string"
},
"end": {
"type": "string"
},
"net": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"gross": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"buyers": {
"type": "number"
},
"previous_net": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"previous_gross": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"previous_buyers": {
"type": "number"
}
},
"required": [
"start",
"end",
"net",
"gross",
"buyers",
"previous_net",
"previous_gross",
"previous_buyers"
]
}
}
},
"required": [
"currency",
"exponent",
"gross",
"refunded",
"platform_fee",
"processor_fee",
"affiliate_fee",
"net",
"transactions",
"buyers",
"refunds",
"series"
]
}
},
"bucket": {
"type": "string",
"x-extensible-enum": [
"day",
"week",
"month"
]
},
"time_zone": {
"type": "string"
},
"from": {
"type": "string"
},
"to": {
"type": "string"
},
"previous_range": {
"type": "object",
"properties": {
"from": {
"type": "string"
},
"to": {
"type": "string"
}
},
"required": [
"from",
"to"
]
}
},
"required": [
"rebuilding",
"currencies",
"bucket",
"time_zone",
"from",
"to",
"previous_range"
]
}GET/v1/stores/{store}/products/stats
Counts the store's products by status. Scope product:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
200
Schema
{
"type": "object",
"properties": {
"products": {
"type": "number"
},
"sales": {
"type": "number"
},
"rating": {
"type": "object",
"properties": {
"count": {
"type": "number"
},
"average": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
}
},
"required": [
"count",
"average"
]
}
},
"required": [
"products",
"sales",
"rating"
]
}quiz
GET/v1/stores/{store}/attempts
Pages customers' quiz attempts. Scope quiz:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
customer | query | An id. | |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | ||
direction | query | ||
limit | query | ||
cursor | query | ||
count | query | ||
search | query | ||
facets | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"customer": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"erased": {
"type": "boolean"
}
},
"required": [
"id",
"name",
"email",
"phone",
"erased"
]
},
{
"type": "null"
}
]
},
"quiz": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
}
},
"required": [
"id",
"title"
]
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"quiz_id": {
"type": "string"
},
"customer_id": {
"type": "string"
},
"attempt": {
"type": "number"
},
"status": {
"type": "string",
"x-extensible-enum": [
"failed",
"started",
"submitted",
"passed",
"forfeited"
]
},
"answers": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {
"answer": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
},
"correct": {
"type": "boolean"
},
"weight": {
"type": "number"
},
"dropped": {
"description": "The import couldn't keep what was given, so a null `answer` is not a blank.",
"type": "boolean",
"const": true
}
},
"required": [
"answer",
"correct",
"weight"
],
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"score": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"correct": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"started_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"finished_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"customer",
"quiz",
"id",
"quiz_id",
"customer_id",
"attempt",
"status",
"answers",
"score",
"correct",
"started_at",
"finished_at"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}GET/v1/stores/{store}/attempts/{attempt}
Reads one quiz attempt with its answers. Scope quiz:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
attempt | path | required |
200
Schema
{
"type": "object",
"properties": {
"customer": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"erased": {
"type": "boolean"
}
},
"required": [
"id",
"name",
"email",
"phone",
"erased"
]
},
{
"type": "null"
}
]
},
"quiz": {
"type": "object",
"properties": {
"body": {
"type": "object",
"properties": {
"attachment_id": {
"type": "string"
},
"asset_id": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"blocks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
],
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"attachment_id",
"asset_id",
"title",
"blocks"
]
},
"files": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"video",
"audio",
"image",
"pdf",
"file"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"width": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"height": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"duration": {
"description": "Seconds.",
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pages": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"url": {
"description": "A public file's lasting URL; null for a private one, or one whose bytes haven't landed.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"attachment_id": {
"description": "The binding a private file opens through; null when the reader can't open it.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"mime",
"name",
"bytes",
"width",
"height",
"duration",
"pages",
"status",
"url",
"attachment_id"
]
}
},
"sittings": {
"type": "number"
},
"certificates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"logo": {
"anyOf": [
{
"type": "object",
"properties": {
"attachment_id": {
"type": "string"
},
"asset_id": {
"type": "string"
}
},
"required": [
"attachment_id",
"asset_id"
]
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"quiz_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"headline_copy": {
"type": "string"
},
"title_copy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"awarded_copy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"reason_copy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"score_copy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"out_of_score_copy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"template": {
"type": "string",
"x-extensible-enum": [
"classic",
"framed"
]
},
"accent": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"emerald",
"blue",
"teal",
"indigo",
"purple",
"pink",
"red",
"orange",
"yellow",
"gray"
]
},
{
"type": "null"
}
]
},
"requires_passing": {
"description": "Earned by passing the quiz, not by merely finishing it.",
"type": "boolean"
},
"earned_on": {
"description": "Set on a certificate no quiz awards, so finishing every entry earns it; losing its quiz never makes one.",
"type": "string",
"x-extensible-enum": [
"completion"
]
},
"shows": {
"type": "array",
"items": {
"type": "string",
"x-extensible-enum": [
"date",
"score",
"qr_code"
]
}
}
},
"required": [
"template",
"accent"
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"logo",
"id",
"product_id",
"quiz_id",
"headline_copy",
"title_copy",
"awarded_copy",
"reason_copy",
"score_copy",
"out_of_score_copy",
"settings",
"created_at"
]
}
},
"id": {
"type": "string"
},
"entry_id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"version": {
"type": "number"
},
"settings": {
"type": "object",
"properties": {
"attempts_allowed": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pass_mark": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"show_answers": {
"type": "boolean"
}
},
"required": [
"attempts_allowed",
"pass_mark",
"show_answers"
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"body",
"files",
"sittings",
"certificates",
"id",
"entry_id",
"product_id",
"version",
"settings",
"created_at",
"updated_at"
]
},
"id": {
"type": "string"
},
"quiz_id": {
"type": "string"
},
"customer_id": {
"type": "string"
},
"attempt": {
"type": "number"
},
"status": {
"type": "string",
"x-extensible-enum": [
"failed",
"started",
"submitted",
"passed",
"forfeited"
]
},
"answers": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {
"answer": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
},
"correct": {
"type": "boolean"
},
"weight": {
"type": "number"
},
"dropped": {
"description": "The import couldn't keep what was given, so a null `answer` is not a blank.",
"type": "boolean",
"const": true
}
},
"required": [
"answer",
"correct",
"weight"
],
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"score": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"correct": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"started_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"finished_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"customer",
"quiz",
"id",
"quiz_id",
"customer_id",
"attempt",
"status",
"answers",
"score",
"correct",
"started_at",
"finished_at"
]
}DELETE/v1/stores/{store}/attempts/{attempt}
Deletes one quiz attempt. Scope quiz:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
attempt | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
200
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"deleted": {
"type": "boolean",
"const": true
}
},
"required": [
"id",
"deleted"
]
}GET/v1/stores/{store}/entries/{entry}/quizzes
Pages an entry's quizzes. Scope quiz:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
entry | path | required | |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | ||
direction | query | ||
limit | query | ||
cursor | query | ||
count | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"sittings": {
"type": "number"
},
"id": {
"type": "string"
},
"entry_id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"version": {
"type": "number"
},
"settings": {
"type": "object",
"properties": {
"attempts_allowed": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pass_mark": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"show_answers": {
"type": "boolean"
}
},
"required": [
"attempts_allowed",
"pass_mark",
"show_answers"
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"sittings",
"id",
"entry_id",
"product_id",
"version",
"settings",
"created_at",
"updated_at"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}POST/v1/stores/{store}/entries/{entry}/quizzes
Creates a quiz on an entry. Scope quiz:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
entry | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"after": {
"description": "The newest version the caller started from, null for none; a newer one refuses the write.",
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"follows": {
"description": "The questions that version held as the caller read them; others there refuse the write.",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
"blocks": {
"description": "The blocks as the editor writes them; a key the schema does not know is dropped.",
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "multiple_choice"
},
"id": {
"type": "string"
},
"question": {
"type": "string"
},
"options": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"text": {
"type": "string"
}
},
"required": [
"id",
"text"
],
"additionalProperties": false
}
},
"correctOptionId": {
"type": "string"
},
"weight": {
"type": "number"
},
"hint": {
"type": "string"
},
"explanation": {
"type": "string"
}
},
"required": [
"type",
"id",
"question",
"options",
"correctOptionId",
"weight"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "scale"
},
"id": {
"type": "string"
},
"question": {
"type": "string"
},
"min": {
"type": "number"
},
"max": {
"type": "number"
},
"correctValue": {
"type": "number"
},
"weight": {
"type": "number"
},
"hint": {
"type": "string"
},
"explanation": {
"type": "string"
}
},
"required": [
"type",
"id",
"question",
"min",
"max",
"correctValue",
"weight"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "static_text"
},
"id": {
"type": "string"
},
"content": {
"type": "string"
}
},
"required": [
"type",
"id",
"content"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "section_break"
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "separator"
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "true_false"
},
"id": {
"type": "string"
},
"question": {
"type": "string"
},
"correctAnswer": {
"type": "boolean"
},
"weight": {
"type": "number"
},
"hint": {
"type": "string"
},
"explanation": {
"type": "string"
}
},
"required": [
"type",
"id",
"question",
"correctAnswer",
"weight"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "short_text"
},
"id": {
"type": "string"
},
"question": {
"type": "string"
},
"acceptedAnswers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"text": {
"type": "string"
}
},
"required": [
"id",
"text"
],
"additionalProperties": false
}
},
"weight": {
"type": "number"
},
"hint": {
"type": "string"
},
"explanation": {
"type": "string"
}
},
"required": [
"type",
"id",
"question",
"acceptedAnswers",
"weight"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "free_text"
},
"id": {
"type": "string"
},
"question": {
"type": "string"
}
},
"required": [
"type",
"id",
"question"
],
"additionalProperties": false
}
]
},
"minItems": 1,
"maxItems": 50
},
"title": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"attempts_allowed": {
"description": "Null is unlimited.",
"anyOf": [
{
"type": "integer",
"minimum": 1,
"maximum": 1000
},
{
"type": "null"
}
]
},
"pass_mark": {
"description": "Percent needed to pass; null passes any finished sitting.",
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 100
},
{
"type": "null"
}
]
},
"show_answers": {
"type": "boolean"
}
},
"additionalProperties": false
}
},
"required": [
"blocks"
],
"additionalProperties": false
}201
Schema
{
"type": "object",
"properties": {
"body": {
"type": "object",
"properties": {
"attachment_id": {
"type": "string"
},
"asset_id": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"blocks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
],
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"attachment_id",
"asset_id",
"title",
"blocks"
]
},
"files": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"video",
"audio",
"image",
"pdf",
"file"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"width": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"height": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"duration": {
"description": "Seconds.",
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pages": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"url": {
"description": "A public file's lasting URL; null for a private one, or one whose bytes haven't landed.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"attachment_id": {
"description": "The binding a private file opens through; null when the reader can't open it.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"mime",
"name",
"bytes",
"width",
"height",
"duration",
"pages",
"status",
"url",
"attachment_id"
]
}
},
"sittings": {
"type": "number"
},
"certificates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"logo": {
"anyOf": [
{
"type": "object",
"properties": {
"attachment_id": {
"type": "string"
},
"asset_id": {
"type": "string"
}
},
"required": [
"attachment_id",
"asset_id"
]
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"quiz_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"headline_copy": {
"type": "string"
},
"title_copy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"awarded_copy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"reason_copy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"score_copy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"out_of_score_copy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"template": {
"type": "string",
"x-extensible-enum": [
"classic",
"framed"
]
},
"accent": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"emerald",
"blue",
"teal",
"indigo",
"purple",
"pink",
"red",
"orange",
"yellow",
"gray"
]
},
{
"type": "null"
}
]
},
"requires_passing": {
"description": "Earned by passing the quiz, not by merely finishing it.",
"type": "boolean"
},
"earned_on": {
"description": "Set on a certificate no quiz awards, so finishing every entry earns it; losing its quiz never makes one.",
"type": "string",
"x-extensible-enum": [
"completion"
]
},
"shows": {
"type": "array",
"items": {
"type": "string",
"x-extensible-enum": [
"date",
"score",
"qr_code"
]
}
}
},
"required": [
"template",
"accent"
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"logo",
"id",
"product_id",
"quiz_id",
"headline_copy",
"title_copy",
"awarded_copy",
"reason_copy",
"score_copy",
"out_of_score_copy",
"settings",
"created_at"
]
}
},
"id": {
"type": "string"
},
"entry_id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"version": {
"type": "number"
},
"settings": {
"type": "object",
"properties": {
"attempts_allowed": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pass_mark": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"show_answers": {
"type": "boolean"
}
},
"required": [
"attempts_allowed",
"pass_mark",
"show_answers"
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"body",
"files",
"sittings",
"certificates",
"id",
"entry_id",
"product_id",
"version",
"settings",
"created_at",
"updated_at"
]
}GET/v1/stores/{store}/quizzes/{quiz}
Reads one quiz with its questions. Scope quiz:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
quiz | path | required |
200
Schema
{
"type": "object",
"properties": {
"body": {
"type": "object",
"properties": {
"attachment_id": {
"type": "string"
},
"asset_id": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"blocks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
],
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"attachment_id",
"asset_id",
"title",
"blocks"
]
},
"files": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"video",
"audio",
"image",
"pdf",
"file"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"width": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"height": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"duration": {
"description": "Seconds.",
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pages": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"url": {
"description": "A public file's lasting URL; null for a private one, or one whose bytes haven't landed.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"attachment_id": {
"description": "The binding a private file opens through; null when the reader can't open it.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"mime",
"name",
"bytes",
"width",
"height",
"duration",
"pages",
"status",
"url",
"attachment_id"
]
}
},
"sittings": {
"type": "number"
},
"certificates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"logo": {
"anyOf": [
{
"type": "object",
"properties": {
"attachment_id": {
"type": "string"
},
"asset_id": {
"type": "string"
}
},
"required": [
"attachment_id",
"asset_id"
]
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"quiz_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"headline_copy": {
"type": "string"
},
"title_copy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"awarded_copy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"reason_copy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"score_copy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"out_of_score_copy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"template": {
"type": "string",
"x-extensible-enum": [
"classic",
"framed"
]
},
"accent": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"emerald",
"blue",
"teal",
"indigo",
"purple",
"pink",
"red",
"orange",
"yellow",
"gray"
]
},
{
"type": "null"
}
]
},
"requires_passing": {
"description": "Earned by passing the quiz, not by merely finishing it.",
"type": "boolean"
},
"earned_on": {
"description": "Set on a certificate no quiz awards, so finishing every entry earns it; losing its quiz never makes one.",
"type": "string",
"x-extensible-enum": [
"completion"
]
},
"shows": {
"type": "array",
"items": {
"type": "string",
"x-extensible-enum": [
"date",
"score",
"qr_code"
]
}
}
},
"required": [
"template",
"accent"
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"logo",
"id",
"product_id",
"quiz_id",
"headline_copy",
"title_copy",
"awarded_copy",
"reason_copy",
"score_copy",
"out_of_score_copy",
"settings",
"created_at"
]
}
},
"id": {
"type": "string"
},
"entry_id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"version": {
"type": "number"
},
"settings": {
"type": "object",
"properties": {
"attempts_allowed": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pass_mark": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"show_answers": {
"type": "boolean"
}
},
"required": [
"attempts_allowed",
"pass_mark",
"show_answers"
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"body",
"files",
"sittings",
"certificates",
"id",
"entry_id",
"product_id",
"version",
"settings",
"created_at",
"updated_at"
]
}PATCH/v1/stores/{store}/quizzes/{quiz}
Updates a quiz's settings and questions. Scope quiz:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
quiz | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"title": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"attempts_allowed": {
"description": "Null is unlimited.",
"anyOf": [
{
"type": "integer",
"minimum": 1,
"maximum": 1000
},
{
"type": "null"
}
]
},
"pass_mark": {
"description": "Percent needed to pass; null passes any finished sitting.",
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 100
},
{
"type": "null"
}
]
},
"show_answers": {
"type": "boolean"
}
},
"additionalProperties": false
},
"blocks": {
"description": "New questions, for a version nobody sat.",
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "multiple_choice"
},
"id": {
"type": "string"
},
"question": {
"type": "string"
},
"options": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"text": {
"type": "string"
}
},
"required": [
"id",
"text"
],
"additionalProperties": false
}
},
"correctOptionId": {
"type": "string"
},
"weight": {
"type": "number"
},
"hint": {
"type": "string"
},
"explanation": {
"type": "string"
}
},
"required": [
"type",
"id",
"question",
"options",
"correctOptionId",
"weight"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "scale"
},
"id": {
"type": "string"
},
"question": {
"type": "string"
},
"min": {
"type": "number"
},
"max": {
"type": "number"
},
"correctValue": {
"type": "number"
},
"weight": {
"type": "number"
},
"hint": {
"type": "string"
},
"explanation": {
"type": "string"
}
},
"required": [
"type",
"id",
"question",
"min",
"max",
"correctValue",
"weight"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "static_text"
},
"id": {
"type": "string"
},
"content": {
"type": "string"
}
},
"required": [
"type",
"id",
"content"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "section_break"
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "separator"
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "true_false"
},
"id": {
"type": "string"
},
"question": {
"type": "string"
},
"correctAnswer": {
"type": "boolean"
},
"weight": {
"type": "number"
},
"hint": {
"type": "string"
},
"explanation": {
"type": "string"
}
},
"required": [
"type",
"id",
"question",
"correctAnswer",
"weight"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "short_text"
},
"id": {
"type": "string"
},
"question": {
"type": "string"
},
"acceptedAnswers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"text": {
"type": "string"
}
},
"required": [
"id",
"text"
],
"additionalProperties": false
}
},
"weight": {
"type": "number"
},
"hint": {
"type": "string"
},
"explanation": {
"type": "string"
}
},
"required": [
"type",
"id",
"question",
"acceptedAnswers",
"weight"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "free_text"
},
"id": {
"type": "string"
},
"question": {
"type": "string"
}
},
"required": [
"type",
"id",
"question"
],
"additionalProperties": false
}
]
},
"minItems": 1,
"maxItems": 50
},
"replaces": {
"description": "The body asset the new questions replace; another one there refuses them.",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
"newest": {
"description": "Refuse unless the version is still the entry's newest.",
"type": "boolean"
}
},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"body": {
"type": "object",
"properties": {
"attachment_id": {
"type": "string"
},
"asset_id": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"blocks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
],
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"attachment_id",
"asset_id",
"title",
"blocks"
]
},
"files": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"video",
"audio",
"image",
"pdf",
"file"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"width": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"height": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"duration": {
"description": "Seconds.",
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pages": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"url": {
"description": "A public file's lasting URL; null for a private one, or one whose bytes haven't landed.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"attachment_id": {
"description": "The binding a private file opens through; null when the reader can't open it.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"mime",
"name",
"bytes",
"width",
"height",
"duration",
"pages",
"status",
"url",
"attachment_id"
]
}
},
"sittings": {
"type": "number"
},
"certificates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"logo": {
"anyOf": [
{
"type": "object",
"properties": {
"attachment_id": {
"type": "string"
},
"asset_id": {
"type": "string"
}
},
"required": [
"attachment_id",
"asset_id"
]
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"quiz_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"headline_copy": {
"type": "string"
},
"title_copy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"awarded_copy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"reason_copy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"score_copy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"out_of_score_copy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"template": {
"type": "string",
"x-extensible-enum": [
"classic",
"framed"
]
},
"accent": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"emerald",
"blue",
"teal",
"indigo",
"purple",
"pink",
"red",
"orange",
"yellow",
"gray"
]
},
{
"type": "null"
}
]
},
"requires_passing": {
"description": "Earned by passing the quiz, not by merely finishing it.",
"type": "boolean"
},
"earned_on": {
"description": "Set on a certificate no quiz awards, so finishing every entry earns it; losing its quiz never makes one.",
"type": "string",
"x-extensible-enum": [
"completion"
]
},
"shows": {
"type": "array",
"items": {
"type": "string",
"x-extensible-enum": [
"date",
"score",
"qr_code"
]
}
}
},
"required": [
"template",
"accent"
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"logo",
"id",
"product_id",
"quiz_id",
"headline_copy",
"title_copy",
"awarded_copy",
"reason_copy",
"score_copy",
"out_of_score_copy",
"settings",
"created_at"
]
}
},
"id": {
"type": "string"
},
"entry_id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"version": {
"type": "number"
},
"settings": {
"type": "object",
"properties": {
"attempts_allowed": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pass_mark": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"show_answers": {
"type": "boolean"
}
},
"required": [
"attempts_allowed",
"pass_mark",
"show_answers"
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"body",
"files",
"sittings",
"certificates",
"id",
"entry_id",
"product_id",
"version",
"settings",
"created_at",
"updated_at"
]
}DELETE/v1/stores/{store}/quizzes/{quiz}
Deletes a quiz. Scope quiz:delete.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
quiz | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
200
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"deleted": {
"type": "boolean",
"const": true
}
},
"required": [
"id",
"deleted"
]
}GET/v1/stores/{store}/products/{product}/quizzes/stats
Reads a product's quiz results. Scope quiz:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
from | query | ||
to | query | ||
quiz | query | An id. |
200
Schema
{
"type": "object",
"properties": {
"entries": {
"type": "array",
"items": {
"type": "object",
"properties": {
"total": {
"type": "number"
},
"by_status": {
"type": "object",
"properties": {
"started": {
"type": "number"
},
"submitted": {
"type": "number"
},
"passed": {
"type": "number"
},
"failed": {
"type": "number"
},
"forfeited": {
"type": "number"
}
},
"required": [
"started",
"submitted",
"passed",
"failed",
"forfeited"
]
},
"pass_rate": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"average_score": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"average_seconds": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"entry_id": {
"type": "string"
}
},
"required": [
"total",
"by_status",
"pass_rate",
"average_score",
"average_seconds",
"entry_id"
]
}
},
"total": {
"type": "number"
},
"by_status": {
"type": "object",
"properties": {
"started": {
"type": "number"
},
"submitted": {
"type": "number"
},
"passed": {
"type": "number"
},
"failed": {
"type": "number"
},
"forfeited": {
"type": "number"
}
},
"required": [
"started",
"submitted",
"passed",
"failed",
"forfeited"
]
},
"pass_rate": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"average_score": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"average_seconds": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"time_zone": {
"type": "string"
},
"from": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"to": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"quizzes": {
"type": "number"
}
},
"required": [
"entries",
"total",
"by_status",
"pass_rate",
"average_score",
"average_seconds",
"time_zone",
"from",
"to",
"quizzes"
]
}POST/v1/stores/{store}/entries/{entry}/attempts/clear
Clears a customer's attempts at an entry's quizzes. Scope quiz:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
entry | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"customer": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"required": [
"customer"
],
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"deleted": {
"type": "number"
}
},
"required": [
"deleted"
]
}review
GET/v1/stores/{store}/reviews
Pages the store's product reviews. Scope review:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | query | An id, or slug:<slug>. | |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | ||
direction | query | ||
limit | query | ||
cursor | query | ||
count | query | ||
search | query | ||
facets | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"customer": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"erased": {
"type": "boolean"
}
},
"required": [
"id",
"name",
"email",
"phone",
"erased"
]
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"customer_id": {
"type": "string"
},
"order_item_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"rating": {
"type": "number"
},
"username": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"notes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"reply": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"replied_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"hidden_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"product",
"customer",
"id",
"product_id",
"customer_id",
"order_item_id",
"rating",
"username",
"notes",
"reply",
"replied_at",
"hidden_at",
"created_at",
"updated_at"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}GET/v1/stores/{store}/reviews/stats
Reads review counts and ratings. Scope review:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | query | An id, or slug:<slug>. |
200
Schema
{
"type": "object",
"properties": {
"products": {
"type": "number"
},
"summary": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"topics": {
"type": "array",
"items": {
"type": "object",
"properties": {
"topic": {
"type": "string",
"x-extensible-enum": [
"certificate",
"value_for_money",
"quality",
"support",
"ease_of_use",
"description_accuracy",
"content_depth",
"clarity",
"pacing",
"production_quality",
"exercises",
"up_to_date",
"performance",
"transparency",
"risk",
"update_frequency",
"communication",
"file_quality",
"formats",
"completeness",
"new_content",
"worth_renewing"
]
},
"positive": {
"type": "number"
},
"negative": {
"type": "number"
}
},
"required": [
"topic",
"positive",
"negative"
]
}
},
"hidden": {
"type": "number"
},
"count": {
"type": "number"
},
"average": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"histogram": {
"type": "object",
"properties": {
"1": {
"type": "number"
},
"2": {
"type": "number"
},
"3": {
"type": "number"
},
"4": {
"type": "number"
},
"5": {
"type": "number"
}
},
"required": [
"1",
"2",
"3",
"4",
"5"
]
}
},
"required": [
"products",
"summary",
"topics",
"hidden",
"count",
"average",
"histogram"
]
}POST/v1/stores/{store}/reviews/{review}/hide
Hides a review from the store. Scope review:moderate.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
review | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"customer": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"erased": {
"type": "boolean"
}
},
"required": [
"id",
"name",
"email",
"phone",
"erased"
]
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"customer_id": {
"type": "string"
},
"order_item_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"rating": {
"type": "number"
},
"username": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"notes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"reply": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"replied_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"hidden_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"product",
"customer",
"id",
"product_id",
"customer_id",
"order_item_id",
"rating",
"username",
"notes",
"reply",
"replied_at",
"hidden_at",
"created_at",
"updated_at"
]
}POST/v1/stores/{store}/reviews/{review}/unhide
Shows a hidden review again. Scope review:moderate.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
review | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"customer": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"erased": {
"type": "boolean"
}
},
"required": [
"id",
"name",
"email",
"phone",
"erased"
]
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"customer_id": {
"type": "string"
},
"order_item_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"rating": {
"type": "number"
},
"username": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"notes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"reply": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"replied_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"hidden_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"product",
"customer",
"id",
"product_id",
"customer_id",
"order_item_id",
"rating",
"username",
"notes",
"reply",
"replied_at",
"hidden_at",
"created_at",
"updated_at"
]
}POST/v1/stores/{store}/reviews/{review}/reply
Sets or clears the store's reply to a review. Scope review:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
review | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"reply": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 4000
},
{
"type": "null"
}
]
}
},
"required": [
"reply"
],
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"customer": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"erased": {
"type": "boolean"
}
},
"required": [
"id",
"name",
"email",
"phone",
"erased"
]
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"customer_id": {
"type": "string"
},
"order_item_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"rating": {
"type": "number"
},
"username": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"notes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"reply": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"replied_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"hidden_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"product",
"customer",
"id",
"product_id",
"customer_id",
"order_item_id",
"rating",
"username",
"notes",
"reply",
"replied_at",
"hidden_at",
"created_at",
"updated_at"
]
}site
GET/v1/stores/{store}
Reads the store: its name, hostname, branding and plan. Scope site:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
200
Schema
{
"type": "object",
"properties": {
"site": {
"type": "object",
"properties": {
"plan": {
"type": "string",
"x-extensible-enum": [
"start",
"plus",
"ultra",
"lite",
"pro",
"enterprise"
]
},
"limits": {
"anyOf": [
{
"type": "object",
"properties": {
"pages": {
"type": "number",
"const": 30
},
"menu": {
"type": "number",
"const": 4
},
"internal": {
"type": "number",
"const": 3
},
"external": {
"type": "number",
"const": 0
},
"stylesheet": {
"type": "boolean",
"const": false
},
"unbranded": {
"type": "boolean",
"const": false
}
},
"required": [
"pages",
"menu",
"internal",
"external",
"stylesheet",
"unbranded"
]
},
{
"type": "object",
"properties": {
"pages": {
"type": "number",
"const": 30
},
"menu": {
"type": "number",
"const": 4
},
"internal": {
"type": "number",
"const": 25
},
"external": {
"type": "number",
"const": 25
},
"stylesheet": {
"type": "boolean",
"const": false
},
"unbranded": {
"type": "boolean",
"const": false
}
},
"required": [
"pages",
"menu",
"internal",
"external",
"stylesheet",
"unbranded"
]
},
{
"type": "object",
"properties": {
"pages": {
"type": "number",
"const": 30
},
"menu": {
"type": "number",
"const": 4
},
"internal": {
"type": "number",
"const": 100
},
"external": {
"type": "number",
"const": 25
},
"stylesheet": {
"type": "boolean",
"const": true
},
"unbranded": {
"type": "boolean",
"const": true
}
},
"required": [
"pages",
"menu",
"internal",
"external",
"stylesheet",
"unbranded"
]
},
{
"type": "object",
"properties": {
"pages": {
"type": "number",
"const": 0
},
"menu": {
"type": "number",
"const": 4
},
"internal": {
"type": "number",
"const": 25
},
"external": {
"type": "number",
"const": 25
},
"stylesheet": {
"type": "boolean",
"const": false
},
"unbranded": {
"type": "boolean",
"const": false
}
},
"required": [
"pages",
"menu",
"internal",
"external",
"stylesheet",
"unbranded"
]
},
{
"type": "object",
"properties": {
"pages": {
"type": "number",
"const": 30
},
"menu": {
"type": "number",
"const": 4
},
"internal": {
"type": "number",
"const": 100
},
"external": {
"type": "number",
"const": 25
},
"stylesheet": {
"type": "boolean",
"const": true
},
"unbranded": {
"type": "boolean",
"const": true
}
},
"required": [
"pages",
"menu",
"internal",
"external",
"stylesheet",
"unbranded"
]
},
{
"type": "object",
"properties": {
"pages": {
"type": "number",
"const": 30
},
"menu": {
"type": "number",
"const": 4
},
"internal": {
"type": "number",
"const": 100
},
"external": {
"type": "number",
"const": 25
},
"stylesheet": {
"type": "boolean",
"const": true
},
"unbranded": {
"type": "boolean",
"const": true
}
},
"required": [
"pages",
"menu",
"internal",
"external",
"stylesheet",
"unbranded"
]
}
]
},
"used": {
"type": "object",
"properties": {
"pages": {
"type": "number"
},
"menu": {
"type": "number"
},
"internal": {
"type": "number"
},
"external": {
"type": "number"
}
},
"required": [
"pages",
"menu",
"internal",
"external"
]
}
},
"required": [
"plan",
"limits",
"used"
]
},
"plan": {
"type": "object",
"properties": {
"tier": {
"type": "string",
"x-extensible-enum": [
"start",
"plus",
"ultra",
"lite",
"pro",
"enterprise"
]
},
"features": {
"type": "object",
"properties": {
"domain": {
"type": "boolean"
},
"learning": {
"type": "boolean"
},
"api": {
"type": "boolean"
},
"self_hosted": {
"type": "boolean"
}
},
"required": [
"domain",
"learning",
"api",
"self_hosted"
]
},
"marketing_emails": {
"anyOf": [
{
"type": "number",
"const": 50000
},
{
"type": "number",
"const": 100000
},
{
"type": "null"
}
]
},
"customers": {
"anyOf": [
{
"type": "object",
"properties": {
"used": {
"type": "number"
},
"limit": {
"type": "number",
"const": 2500
}
},
"required": [
"used",
"limit"
]
},
{
"type": "null"
}
]
}
},
"required": [
"tier",
"features",
"marketing_emails",
"customers"
]
},
"files": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"video",
"audio",
"image",
"pdf",
"file"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"width": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"height": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"duration": {
"description": "Seconds.",
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pages": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"url": {
"description": "A public file's lasting URL; null for a private one, or one whose bytes haven't landed.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"attachment_id": {
"description": "The binding a private file opens through; null when the reader can't open it.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"mime",
"name",
"bytes",
"width",
"height",
"duration",
"pages",
"status",
"url",
"attachment_id"
]
}
},
"integrations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"kind": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"config_schema": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"secret_set": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "boolean"
}
}
},
"required": [
"id",
"name",
"description",
"kind",
"enabled",
"config_schema",
"secret_set"
]
}
},
"redirects": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"from_path": {
"type": "string"
},
"to_path": {
"type": "string"
},
"status": {
"type": "number"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"from_path",
"to_path",
"status",
"created_at"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"notifications": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"event": {
"type": "string"
},
"target": {
"anyOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"entry"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
{
"type": "null"
}
]
},
"locale": {
"type": "string"
},
"channel": {
"type": "string",
"x-extensible-enum": [
"email",
"webhook"
]
},
"enabled": {
"type": "boolean"
},
"body": {
"anyOf": [
{
"type": "object",
"properties": {
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
]
}
},
"required": [
"asset"
]
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"event",
"target",
"locale",
"channel",
"enabled",
"body"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"work": {
"type": "object",
"properties": {
"pending": {
"type": "number"
},
"parked": {
"type": "number"
}
},
"required": [
"pending",
"parked"
]
},
"locale": {
"type": "string"
},
"tint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"tint_dark": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"delivery_ttl_seconds": {
"type": "number"
},
"refund_revokes_access": {
"type": "boolean"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"time_zone": {
"type": "string"
},
"currency": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"storefront": {
"type": "object",
"properties": {
"external_site": {
"description": "The seller's own site, linked from the header.",
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"socials": {
"description": "Profile URLs, linked from the footer.",
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"maxItems": 20
},
"theme": {
"description": "The schemes visitors may pick; absent offers both.",
"type": "string",
"x-extensible-enum": [
"both",
"light",
"dark"
]
},
"no_index": {
"type": "boolean"
},
"powered_by": {
"type": "boolean"
},
"animated_background": {
"description": "The dots drifting behind the hero.",
"type": "boolean"
},
"header_hidden": {
"description": "Whether the site's header and footer are left off its pages.",
"type": "boolean"
},
"footer_hidden": {
"type": "boolean"
}
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"revision": {
"type": "number"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"merchant_id": {
"type": "string"
},
"hostname": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"hostnames": {
"type": "array",
"items": {
"type": "string"
}
},
"swatch": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"emerald",
"blue",
"teal",
"indigo",
"purple",
"pink",
"red",
"orange",
"yellow",
"gray"
]
},
{
"type": "null"
}
]
},
"icon": {
"type": "string"
}
},
"required": [
"site",
"plan",
"files",
"integrations",
"redirects",
"notifications",
"work",
"locale",
"tint",
"tint_dark",
"delivery_ttl_seconds",
"refund_revokes_access",
"description",
"time_zone",
"currency",
"settings",
"metadata",
"revision",
"updated_at",
"id",
"name",
"merchant_id",
"hostname",
"hostnames",
"swatch",
"icon"
]
}PATCH/v1/stores/{store}
Updates the store's name, description and branding. Scope site:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
Body
Schema
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"swatch": {
"anyOf": [
{
"type": "string",
"enum": [
"emerald",
"blue",
"teal",
"indigo",
"purple",
"pink",
"red",
"orange",
"yellow",
"gray"
]
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"locale": {
"type": "string"
},
"location": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"wnam",
"enam",
"sam",
"weur",
"eeur",
"apac",
"apac-ne",
"apac-se",
"oc",
"afr",
"me"
]
},
{
"type": "null"
}
]
},
"hostname": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"swatch": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"emerald",
"blue",
"teal",
"indigo",
"purple",
"pink",
"red",
"orange",
"yellow",
"gray"
]
},
{
"type": "null"
}
]
},
"icon": {
"type": "string"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"locale",
"location",
"hostname",
"swatch",
"icon",
"created_at"
]
}GET/v1/stores/{store}/settings
Reads the store's settings. Scope site:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
200
Schema
{
"type": "object",
"properties": {
"hostnames": {
"type": "array",
"items": {
"type": "string"
}
},
"locale": {
"type": "string"
},
"tint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"tint_dark": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"delivery_ttl_seconds": {
"type": "number"
},
"refund_revokes_access": {
"type": "boolean"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"time_zone": {
"type": "string"
},
"currency": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"storefront": {
"type": "object",
"properties": {
"external_site": {
"description": "The seller's own site, linked from the header.",
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"socials": {
"description": "Profile URLs, linked from the footer.",
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"maxItems": 20
},
"theme": {
"description": "The schemes visitors may pick; absent offers both.",
"type": "string",
"x-extensible-enum": [
"both",
"light",
"dark"
]
},
"no_index": {
"type": "boolean"
},
"powered_by": {
"type": "boolean"
},
"animated_background": {
"description": "The dots drifting behind the hero.",
"type": "boolean"
},
"header_hidden": {
"description": "Whether the site's header and footer are left off its pages.",
"type": "boolean"
},
"footer_hidden": {
"type": "boolean"
}
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"revision": {
"type": "number"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"hostnames",
"locale",
"tint",
"tint_dark",
"delivery_ttl_seconds",
"refund_revokes_access",
"description",
"time_zone",
"currency",
"settings",
"metadata",
"revision",
"updated_at"
]
}PATCH/v1/stores/{store}/settings
Updates the store's settings. Scope site:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"locale": {
"type": "string",
"minLength": 1,
"maxLength": 5,
"pattern": "^[a-z]{2}(?:-[A-Z]{2})?$"
},
"tint": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 7,
"pattern": "^#[0-9a-fA-F]{6}$"
},
{
"type": "null"
}
]
},
"tint_dark": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 7,
"pattern": "^#[0-9a-fA-F]{6}$"
},
{
"type": "null"
}
]
},
"delivery_ttl_seconds": {
"type": "integer",
"minimum": 60,
"maximum": 604800
},
"refund_revokes_access": {
"type": "boolean"
},
"description": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 2000
},
{
"type": "null"
}
]
},
"time_zone": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"currency": {
"description": "The currency the store reports in; null clears it.",
"anyOf": [
{
"type": "string",
"minLength": 3,
"maxLength": 3
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"storefront": {
"type": "object",
"properties": {
"external_site": {
"description": "The seller's own site, linked from the header.",
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"socials": {
"description": "Profile URLs, linked from the footer.",
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"maxItems": 20
},
"theme": {
"description": "The schemes visitors may pick; absent offers both.",
"type": "string",
"enum": [
"both",
"light",
"dark"
]
},
"no_index": {
"type": "boolean"
},
"powered_by": {
"type": "boolean"
},
"animated_background": {
"description": "The dots drifting behind the hero.",
"type": "boolean"
},
"header_hidden": {
"description": "Whether the site's header and footer are left off its pages.",
"type": "boolean"
},
"footer_hidden": {
"type": "boolean"
}
},
"additionalProperties": false
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"from": {
"description": "The revision the caller read; a write made since refuses.",
"type": "object",
"properties": {
"revision": {
"type": "integer",
"minimum": 0
}
},
"required": [
"revision"
],
"additionalProperties": false
}
},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"site": {
"type": "object",
"properties": {
"plan": {
"type": "string",
"x-extensible-enum": [
"start",
"plus",
"ultra",
"lite",
"pro",
"enterprise"
]
},
"limits": {
"anyOf": [
{
"type": "object",
"properties": {
"pages": {
"type": "number",
"const": 30
},
"menu": {
"type": "number",
"const": 4
},
"internal": {
"type": "number",
"const": 3
},
"external": {
"type": "number",
"const": 0
},
"stylesheet": {
"type": "boolean",
"const": false
},
"unbranded": {
"type": "boolean",
"const": false
}
},
"required": [
"pages",
"menu",
"internal",
"external",
"stylesheet",
"unbranded"
]
},
{
"type": "object",
"properties": {
"pages": {
"type": "number",
"const": 30
},
"menu": {
"type": "number",
"const": 4
},
"internal": {
"type": "number",
"const": 25
},
"external": {
"type": "number",
"const": 25
},
"stylesheet": {
"type": "boolean",
"const": false
},
"unbranded": {
"type": "boolean",
"const": false
}
},
"required": [
"pages",
"menu",
"internal",
"external",
"stylesheet",
"unbranded"
]
},
{
"type": "object",
"properties": {
"pages": {
"type": "number",
"const": 30
},
"menu": {
"type": "number",
"const": 4
},
"internal": {
"type": "number",
"const": 100
},
"external": {
"type": "number",
"const": 25
},
"stylesheet": {
"type": "boolean",
"const": true
},
"unbranded": {
"type": "boolean",
"const": true
}
},
"required": [
"pages",
"menu",
"internal",
"external",
"stylesheet",
"unbranded"
]
},
{
"type": "object",
"properties": {
"pages": {
"type": "number",
"const": 0
},
"menu": {
"type": "number",
"const": 4
},
"internal": {
"type": "number",
"const": 25
},
"external": {
"type": "number",
"const": 25
},
"stylesheet": {
"type": "boolean",
"const": false
},
"unbranded": {
"type": "boolean",
"const": false
}
},
"required": [
"pages",
"menu",
"internal",
"external",
"stylesheet",
"unbranded"
]
},
{
"type": "object",
"properties": {
"pages": {
"type": "number",
"const": 30
},
"menu": {
"type": "number",
"const": 4
},
"internal": {
"type": "number",
"const": 100
},
"external": {
"type": "number",
"const": 25
},
"stylesheet": {
"type": "boolean",
"const": true
},
"unbranded": {
"type": "boolean",
"const": true
}
},
"required": [
"pages",
"menu",
"internal",
"external",
"stylesheet",
"unbranded"
]
},
{
"type": "object",
"properties": {
"pages": {
"type": "number",
"const": 30
},
"menu": {
"type": "number",
"const": 4
},
"internal": {
"type": "number",
"const": 100
},
"external": {
"type": "number",
"const": 25
},
"stylesheet": {
"type": "boolean",
"const": true
},
"unbranded": {
"type": "boolean",
"const": true
}
},
"required": [
"pages",
"menu",
"internal",
"external",
"stylesheet",
"unbranded"
]
}
]
},
"used": {
"type": "object",
"properties": {
"pages": {
"type": "number"
},
"menu": {
"type": "number"
},
"internal": {
"type": "number"
},
"external": {
"type": "number"
}
},
"required": [
"pages",
"menu",
"internal",
"external"
]
}
},
"required": [
"plan",
"limits",
"used"
]
},
"plan": {
"type": "object",
"properties": {
"tier": {
"type": "string",
"x-extensible-enum": [
"start",
"plus",
"ultra",
"lite",
"pro",
"enterprise"
]
},
"features": {
"type": "object",
"properties": {
"domain": {
"type": "boolean"
},
"learning": {
"type": "boolean"
},
"api": {
"type": "boolean"
},
"self_hosted": {
"type": "boolean"
}
},
"required": [
"domain",
"learning",
"api",
"self_hosted"
]
},
"marketing_emails": {
"anyOf": [
{
"type": "number",
"const": 50000
},
{
"type": "number",
"const": 100000
},
{
"type": "null"
}
]
},
"customers": {
"anyOf": [
{
"type": "object",
"properties": {
"used": {
"type": "number"
},
"limit": {
"type": "number",
"const": 2500
}
},
"required": [
"used",
"limit"
]
},
{
"type": "null"
}
]
}
},
"required": [
"tier",
"features",
"marketing_emails",
"customers"
]
},
"files": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"video",
"audio",
"image",
"pdf",
"file"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"width": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"height": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"duration": {
"description": "Seconds.",
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pages": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"url": {
"description": "A public file's lasting URL; null for a private one, or one whose bytes haven't landed.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"attachment_id": {
"description": "The binding a private file opens through; null when the reader can't open it.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"mime",
"name",
"bytes",
"width",
"height",
"duration",
"pages",
"status",
"url",
"attachment_id"
]
}
},
"integrations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"kind": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"config_schema": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"secret_set": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "boolean"
}
}
},
"required": [
"id",
"name",
"description",
"kind",
"enabled",
"config_schema",
"secret_set"
]
}
},
"redirects": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"from_path": {
"type": "string"
},
"to_path": {
"type": "string"
},
"status": {
"type": "number"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"from_path",
"to_path",
"status",
"created_at"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"notifications": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"event": {
"type": "string"
},
"target": {
"anyOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"entry"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
{
"type": "null"
}
]
},
"locale": {
"type": "string"
},
"channel": {
"type": "string",
"x-extensible-enum": [
"email",
"webhook"
]
},
"enabled": {
"type": "boolean"
},
"body": {
"anyOf": [
{
"type": "object",
"properties": {
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
]
}
},
"required": [
"asset"
]
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"event",
"target",
"locale",
"channel",
"enabled",
"body"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"work": {
"type": "object",
"properties": {
"pending": {
"type": "number"
},
"parked": {
"type": "number"
}
},
"required": [
"pending",
"parked"
]
},
"locale": {
"type": "string"
},
"tint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"tint_dark": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"delivery_ttl_seconds": {
"type": "number"
},
"refund_revokes_access": {
"type": "boolean"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"time_zone": {
"type": "string"
},
"currency": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"storefront": {
"type": "object",
"properties": {
"external_site": {
"description": "The seller's own site, linked from the header.",
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"socials": {
"description": "Profile URLs, linked from the footer.",
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"maxItems": 20
},
"theme": {
"description": "The schemes visitors may pick; absent offers both.",
"type": "string",
"x-extensible-enum": [
"both",
"light",
"dark"
]
},
"no_index": {
"type": "boolean"
},
"powered_by": {
"type": "boolean"
},
"animated_background": {
"description": "The dots drifting behind the hero.",
"type": "boolean"
},
"header_hidden": {
"description": "Whether the site's header and footer are left off its pages.",
"type": "boolean"
},
"footer_hidden": {
"type": "boolean"
}
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"revision": {
"type": "number"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"merchant_id": {
"type": "string"
},
"hostname": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"hostnames": {
"type": "array",
"items": {
"type": "string"
}
},
"swatch": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"emerald",
"blue",
"teal",
"indigo",
"purple",
"pink",
"red",
"orange",
"yellow",
"gray"
]
},
{
"type": "null"
}
]
},
"icon": {
"type": "string"
}
},
"required": [
"site",
"plan",
"files",
"integrations",
"redirects",
"notifications",
"work",
"locale",
"tint",
"tint_dark",
"delivery_ttl_seconds",
"refund_revokes_access",
"description",
"time_zone",
"currency",
"settings",
"metadata",
"revision",
"updated_at",
"id",
"name",
"merchant_id",
"hostname",
"hostnames",
"swatch",
"icon"
]
}PUT/v1/stores/{store}/icon
Sets or clears the store's icon from a file. Scope site:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
Body
Schema
{
"type": "object",
"properties": {
"image": {
"anyOf": [
{
"type": "string",
"contentEncoding": "base64"
},
{
"type": "string",
"contentEncoding": "base64"
}
]
}
},
"required": [
"image"
],
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"locale": {
"type": "string"
},
"location": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"wnam",
"enam",
"sam",
"weur",
"eeur",
"apac",
"apac-ne",
"apac-se",
"oc",
"afr",
"me"
]
},
{
"type": "null"
}
]
},
"hostname": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"swatch": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"emerald",
"blue",
"teal",
"indigo",
"purple",
"pink",
"red",
"orange",
"yellow",
"gray"
]
},
{
"type": "null"
}
]
},
"icon": {
"type": "string"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"locale",
"location",
"hostname",
"swatch",
"icon",
"created_at"
]
}GET/v1/stores/{store}/redirects
Pages the store's redirects. Scope site:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | ||
direction | query | ||
limit | query | ||
cursor | query | ||
count | query | ||
search | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"from_path": {
"type": "string"
},
"to_path": {
"type": "string"
},
"status": {
"type": "number"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"from_path",
"to_path",
"status",
"created_at"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}POST/v1/stores/{store}/redirects
Creates a redirect from a path. Scope site:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"from_path": {
"type": "string",
"minLength": 1,
"maxLength": 2000,
"pattern": "^/[^\\s?#]*$"
},
"to_path": {
"type": "string",
"minLength": 1,
"maxLength": 2000,
"pattern": "^(?:/[^\\s\\x00-\\x1F\\x7F-\\x9F]*|https?://[^\\s\\x00-\\x1F\\x7F-\\x9F]+)$"
},
"status": {
"anyOf": [
{
"type": "number",
"const": 308
},
{
"type": "number",
"const": 301
},
{
"type": "number",
"const": 302
},
{
"type": "number",
"const": 307
}
]
}
},
"required": [
"from_path",
"to_path"
],
"additionalProperties": false
}201
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"from_path": {
"type": "string"
},
"to_path": {
"type": "string"
},
"status": {
"type": "number"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"from_path",
"to_path",
"status",
"created_at"
]
}PATCH/v1/stores/{store}/redirects/{redirect}
Updates a redirect's source or destination. Scope site:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
redirect | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"from_path": {
"type": "string",
"minLength": 1,
"maxLength": 2000,
"pattern": "^/[^\\s?#]*$"
},
"to_path": {
"type": "string",
"minLength": 1,
"maxLength": 2000,
"pattern": "^(?:/[^\\s\\x00-\\x1F\\x7F-\\x9F]*|https?://[^\\s\\x00-\\x1F\\x7F-\\x9F]+)$"
},
"status": {
"anyOf": [
{
"type": "number",
"const": 308
},
{
"type": "number",
"const": 301
},
{
"type": "number",
"const": 302
},
{
"type": "number",
"const": 307
}
]
}
},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"from_path": {
"type": "string"
},
"to_path": {
"type": "string"
},
"status": {
"type": "number"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"from_path",
"to_path",
"status",
"created_at"
]
}DELETE/v1/stores/{store}/redirects/{redirect}
Deletes a redirect. Scope site:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
redirect | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
200
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"deleted": {
"type": "boolean",
"const": true
}
},
"required": [
"id",
"deleted"
]
}GET/v1/stores/{store}/paths/check
Says whether a path is free for a page or redirect. Scope site:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
kind | query | required | |
value | query | required | |
except | query |
200
Schema
{
"type": "object",
"properties": {
"available": {
"type": "boolean"
},
"reason": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"product",
"invalid",
"page",
"redirect",
"reserved",
"home"
]
},
{
"type": "null"
}
]
},
"current": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"available",
"reason",
"current"
]
}store
POST/v1/stores/{store}/bulk
Runs one bulk-capable change over many rows in one transaction, answering each item's outcome. Any token of a seat on the business.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"accessor": {
"type": "string",
"enum": [
"publishProduct",
"unpublishProduct",
"discontinueProduct",
"reinstateProduct",
"unlistProduct",
"relistProduct",
"deleteProduct",
"publishEntry",
"unpublishEntry",
"deleteEntry",
"publishPage",
"unpublishPage",
"deletePage",
"hideReview",
"unhideReview"
]
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"minItems": 1,
"maxItems": 50
}
},
"required": [
"accessor",
"items"
],
"additionalProperties": false,
"oneOf": [
{
"properties": {
"accessor": {
"const": "publishProduct"
},
"items": {
"items": {
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"slug": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"slug"
],
"additionalProperties": false
}
]
},
"at": {
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2}))?$"
}
},
"required": [
"product"
],
"additionalProperties": false
}
}
}
},
{
"properties": {
"accessor": {
"const": "unpublishProduct"
},
"items": {
"items": {
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"slug": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"slug"
],
"additionalProperties": false
}
]
}
},
"required": [
"product"
],
"additionalProperties": false
}
}
}
},
{
"properties": {
"accessor": {
"const": "discontinueProduct"
},
"items": {
"items": {
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"slug": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"slug"
],
"additionalProperties": false
}
]
}
},
"required": [
"product"
],
"additionalProperties": false
}
}
}
},
{
"properties": {
"accessor": {
"const": "reinstateProduct"
},
"items": {
"items": {
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"slug": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"slug"
],
"additionalProperties": false
}
]
}
},
"required": [
"product"
],
"additionalProperties": false
}
}
}
},
{
"properties": {
"accessor": {
"const": "unlistProduct"
},
"items": {
"items": {
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"slug": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"slug"
],
"additionalProperties": false
}
]
}
},
"required": [
"product"
],
"additionalProperties": false
}
}
}
},
{
"properties": {
"accessor": {
"const": "relistProduct"
},
"items": {
"items": {
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"slug": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"slug"
],
"additionalProperties": false
}
]
}
},
"required": [
"product"
],
"additionalProperties": false
}
}
}
},
{
"properties": {
"accessor": {
"const": "deleteProduct"
},
"items": {
"items": {
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"slug": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"slug"
],
"additionalProperties": false
}
]
}
},
"required": [
"product"
],
"additionalProperties": false
}
}
}
},
{
"properties": {
"accessor": {
"const": "publishEntry"
},
"items": {
"items": {
"type": "object",
"properties": {
"entry": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"slug": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"slug"
],
"additionalProperties": false
}
]
},
"slug": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"product",
"slug"
],
"additionalProperties": false
}
]
},
"at": {
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2}))?$"
},
"expect": {
"description": "The status the caller saw; one that moved meanwhile, as a post taken down elsewhere, refuses.",
"type": "string",
"enum": [
"draft",
"scheduled",
"published"
]
}
},
"required": [
"entry"
],
"additionalProperties": false
}
}
}
},
{
"properties": {
"accessor": {
"const": "unpublishEntry"
},
"items": {
"items": {
"type": "object",
"properties": {
"entry": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"slug": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"slug"
],
"additionalProperties": false
}
]
},
"slug": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"product",
"slug"
],
"additionalProperties": false
}
]
}
},
"required": [
"entry"
],
"additionalProperties": false
}
}
}
},
{
"properties": {
"accessor": {
"const": "deleteEntry"
},
"items": {
"items": {
"type": "object",
"properties": {
"entry": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"slug": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"slug"
],
"additionalProperties": false
}
]
},
"slug": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"product",
"slug"
],
"additionalProperties": false
}
]
},
"discard_progress": {
"description": "Lets what customers did in it (completions, quiz sittings) and its notifications go with it; needs `customer:write` and `organization:write`.",
"type": "boolean",
"const": true
}
},
"required": [
"entry"
],
"additionalProperties": false
}
}
}
},
{
"properties": {
"accessor": {
"const": "publishPage"
},
"items": {
"items": {
"type": "object",
"properties": {
"page": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"slug": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"slug"
],
"additionalProperties": false
}
]
},
"at": {
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2}))?$"
}
},
"required": [
"page"
],
"additionalProperties": false
}
}
}
},
{
"properties": {
"accessor": {
"const": "unpublishPage"
},
"items": {
"items": {
"type": "object",
"properties": {
"page": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"slug": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"slug"
],
"additionalProperties": false
}
]
},
"expect": {
"description": "The status the caller saw; one that moved meanwhile, as a schedule that went live, refuses.",
"type": "string",
"enum": [
"scheduled",
"published"
]
}
},
"required": [
"page"
],
"additionalProperties": false
}
}
}
},
{
"properties": {
"accessor": {
"const": "deletePage"
},
"items": {
"items": {
"type": "object",
"properties": {
"page": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"slug": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"slug"
],
"additionalProperties": false
}
]
}
},
"required": [
"page"
],
"additionalProperties": false
}
}
}
},
{
"properties": {
"accessor": {
"const": "hideReview"
},
"items": {
"items": {
"type": "object",
"properties": {
"review": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"required": [
"review"
],
"additionalProperties": false
}
}
}
},
{
"properties": {
"accessor": {
"const": "unhideReview"
},
"items": {
"items": {
"type": "object",
"properties": {
"review": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"required": [
"review"
],
"additionalProperties": false
}
}
}
}
]
}200
Schema
{
"type": "object",
"properties": {
"results": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"outcome": {
"type": "string",
"const": "done"
}
},
"required": [
"outcome"
]
},
{
"type": "object",
"properties": {
"outcome": {
"type": "string",
"const": "refused"
},
"error": {
"anyOf": [
{
"type": "object",
"properties": {
"code": {
"type": "string",
"const": "internal"
},
"detail": {
"type": "object",
"properties": {}
}
},
"required": [
"code",
"detail"
]
},
{
"type": "object",
"properties": {
"code": {
"type": "string",
"const": "not_found"
},
"detail": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"ref": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"kind",
"ref"
]
}
},
"required": [
"code",
"detail"
]
},
{
"type": "object",
"properties": {
"code": {
"type": "string",
"const": "not_entitled"
},
"detail": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"entry",
"quiz",
"portfolio",
"attachment"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
}
},
"required": [
"code",
"detail"
]
},
{
"type": "object",
"properties": {
"code": {
"type": "string",
"const": "not_permitted"
},
"detail": {
"anyOf": [
{
"type": "object",
"properties": {
"reason": {
"type": "string",
"x-extensible-enum": [
"scope",
"credential",
"principal",
"plan",
"legacy"
]
}
},
"required": [
"reason"
]
},
{
"type": "object",
"properties": {
"reason": {
"type": "string",
"const": "limit"
},
"retry_at": {
"description": "When the limit lifts, where core knows it.",
"type": "string",
"format": "date-time"
}
},
"required": [
"reason"
]
}
]
}
},
"required": [
"code",
"detail"
]
},
{
"type": "object",
"properties": {
"code": {
"type": "string",
"const": "conflict"
},
"detail": {
"anyOf": [
{
"type": "object",
"properties": {
"field": {
"type": "string",
"x-extensible-enum": [
"menu",
"internal",
"external",
"items",
"value"
]
},
"current": {
"type": "number"
}
},
"required": [
"field"
]
},
{
"type": "object",
"properties": {
"field": {
"type": "string",
"x-extensible-enum": [
"symbol",
"name",
"slug",
"section",
"asset",
"customer",
"source_key",
"code",
"tier",
"processor_ref",
"attempts",
"email",
"role",
"body",
"path",
"event",
"scope",
"plan",
"quiz",
"attachment",
"delivery",
"attachments",
"member",
"grant_ref",
"staff",
"bindings"
]
},
"current": {
"type": "string"
}
},
"required": [
"field"
]
},
{
"type": "object",
"properties": {
"field": {
"type": "string",
"x-extensible-enum": [
"status",
"category",
"kind"
]
},
"current": {
"type": "string"
}
},
"required": [
"field"
]
},
{
"type": "object",
"properties": {
"field": {
"type": "string",
"const": "kind"
},
"current": {
"type": "string",
"const": "secured"
},
"level": {
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
}
},
"required": [
"field",
"current",
"level"
]
},
{
"type": "object",
"properties": {
"field": {
"type": "string",
"const": "mime"
},
"current": {
"type": "string"
}
},
"required": [
"field"
]
},
{
"type": "object",
"properties": {
"field": {
"type": "string",
"const": "idempotency_key"
},
"current": {
"type": "string",
"const": "applied"
}
},
"required": [
"field"
]
},
{
"type": "object",
"properties": {
"field": {
"type": "string",
"x-extensible-enum": [
"text",
"questions"
]
}
},
"required": [
"field"
]
},
{
"type": "object",
"properties": {
"field": {
"type": "string",
"const": "entries"
}
},
"required": [
"field"
]
},
{
"type": "object",
"properties": {
"field": {
"type": "string",
"x-extensible-enum": [
"video",
"poster"
]
}
},
"required": [
"field"
]
},
{
"type": "object",
"properties": {
"field": {
"type": "string",
"x-extensible-enum": [
"product",
"asset",
"discount",
"tier",
"entry",
"quiz",
"price",
"affiliate",
"certificate"
]
},
"blocked_by": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"count": {
"type": "number"
}
},
"required": [
"kind",
"count"
]
}
}
},
"required": [
"field",
"blocked_by"
]
}
]
}
},
"required": [
"code",
"detail"
]
},
{
"type": "object",
"properties": {
"code": {
"type": "string",
"const": "invalid"
},
"detail": {
"type": "object",
"properties": {
"path": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
}
},
"reason": {
"type": "string"
}
},
"required": [
"path",
"reason"
]
}
},
"required": [
"code",
"detail"
]
}
]
}
},
"required": [
"outcome",
"error"
]
}
]
}
}
},
"required": [
"results"
]
}subpage
GET/v1/stores/{store}/products/{product}/entries
Pages a product's entries. Scope subpage:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | Sorted by published, rows without a value come last either way. | |
direction | query | ||
limit | query | ||
cursor | query | ||
count | query | ||
search | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"summary": {
"type": "object",
"properties": {
"poster": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
},
{
"type": "null"
}
]
},
"has_video": {
"type": "boolean"
},
"duration": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"presentations": {
"type": "number"
},
"slides": {
"type": "number"
},
"files": {
"type": "number"
},
"links": {
"type": "number"
},
"has_body": {
"type": "boolean"
},
"has_quiz": {
"type": "boolean"
},
"has_certificate": {
"type": "boolean"
}
},
"required": [
"poster",
"has_video",
"duration",
"presentations",
"slides",
"files",
"links",
"has_body",
"has_quiz",
"has_certificate"
]
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"subtitle": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"section": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"preview": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"position": {
"type": "number"
},
"status": {
"type": "string",
"x-extensible-enum": [
"draft",
"scheduled",
"published"
]
},
"published_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"search": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"ai_generated": {
"description": "The description was machine-written, which readers are told.",
"type": "boolean"
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"summary",
"id",
"product_id",
"slug",
"title",
"subtitle",
"section",
"preview",
"position",
"status",
"published_at",
"search",
"created_at",
"updated_at",
"settings",
"metadata"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}POST/v1/stores/{store}/products/{product}/entries
Creates a draft entry in a product. Scope subpage:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"slug": {
"description": "Made from the title when absent: its words, numbered past a twin under the product.",
"type": "string",
"minLength": 1,
"maxLength": 120,
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"subtitle": {
"anyOf": [
{
"type": "string",
"maxLength": 500
},
{
"type": "null"
}
]
},
"section": {
"anyOf": [
{
"type": "string",
"maxLength": 120
},
{
"type": "null"
}
]
},
"preview": {
"description": "The teaser as stored HTML: 16 KiB of UTF-8, so a quarter as many characters always fit; empty clears it.",
"anyOf": [
{
"type": "string",
"maxLength": 4096
},
{
"type": "null"
}
]
},
"search": {
"anyOf": [
{
"type": "string",
"maxLength": 20000
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"ai_generated": {
"description": "The description was machine-written, which readers are told.",
"type": "boolean"
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"place": {
"description": "After the last entry of its chapter, or past the product's last when the chapter has none; an update moves it only when its section changes.",
"type": "string",
"const": "chapter"
},
"new_section": {
"description": "Refuse a section another chapter holds, so a new chapter never joins one by accident.",
"type": "boolean",
"const": true
}
},
"required": [
"title"
],
"additionalProperties": false
}201
Schema
{
"type": "object",
"properties": {
"attachments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"preview_only": {
"type": "boolean"
},
"from_body": {
"type": "boolean"
},
"position": {
"type": "number"
},
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
}
},
"required": [
"id",
"target",
"role",
"delivery",
"preview_only",
"from_body",
"position",
"asset"
]
}
},
"files": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"video",
"audio",
"image",
"pdf",
"file"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"width": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"height": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"duration": {
"description": "Seconds.",
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pages": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"url": {
"description": "A public file's lasting URL; null for a private one, or one whose bytes haven't landed.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"attachment_id": {
"description": "The binding a private file opens through; null when the reader can't open it.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"mime",
"name",
"bytes",
"width",
"height",
"duration",
"pages",
"status",
"url",
"attachment_id"
]
}
},
"access": {
"type": "array",
"items": {
"type": "object",
"properties": {
"resource": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"entry",
"quiz",
"attachment",
"page",
"download"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"channel": {
"type": "string",
"x-extensible-enum": [
"api",
"any",
"web",
"mcp",
"feed"
]
},
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"resource",
"channel",
"tier_id"
]
}
},
"quizzes": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"entry_id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"version": {
"type": "number"
},
"settings": {
"type": "object",
"properties": {
"attempts_allowed": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pass_mark": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"show_answers": {
"type": "boolean"
}
},
"required": [
"attempts_allowed",
"pass_mark",
"show_answers"
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"entry_id",
"product_id",
"version",
"settings",
"created_at",
"updated_at"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"in_use": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"count": {
"type": "number"
}
},
"required": [
"kind",
"count"
]
}
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"subtitle": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"section": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"preview": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"position": {
"type": "number"
},
"status": {
"type": "string",
"x-extensible-enum": [
"draft",
"scheduled",
"published"
]
},
"published_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"search": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"ai_generated": {
"description": "The description was machine-written, which readers are told.",
"type": "boolean"
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"attachments",
"files",
"access",
"quizzes",
"in_use",
"id",
"product_id",
"slug",
"title",
"subtitle",
"section",
"preview",
"position",
"status",
"published_at",
"search",
"created_at",
"updated_at",
"settings",
"metadata"
]
}GET/v1/stores/{store}/products/{product}/entries/details
Pages a product's entries, each read whole. Scope subpage:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | Sorted by published, rows without a value come last either way. | |
direction | query | ||
limit | query | ||
cursor | query | ||
count | query | ||
search | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"summary": {
"type": "object",
"properties": {
"poster": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
},
{
"type": "null"
}
]
},
"has_video": {
"type": "boolean"
},
"duration": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"presentations": {
"type": "number"
},
"slides": {
"type": "number"
},
"files": {
"type": "number"
},
"links": {
"type": "number"
},
"has_body": {
"type": "boolean"
},
"has_quiz": {
"type": "boolean"
},
"has_certificate": {
"type": "boolean"
}
},
"required": [
"poster",
"has_video",
"duration",
"presentations",
"slides",
"files",
"links",
"has_body",
"has_quiz",
"has_certificate"
]
},
"attachments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"preview_only": {
"type": "boolean"
},
"from_body": {
"type": "boolean"
},
"position": {
"type": "number"
},
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
}
},
"required": [
"id",
"target",
"role",
"delivery",
"preview_only",
"from_body",
"position",
"asset"
]
}
},
"files": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"video",
"audio",
"image",
"pdf",
"file"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"width": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"height": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"duration": {
"description": "Seconds.",
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pages": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"url": {
"description": "A public file's lasting URL; null for a private one, or one whose bytes haven't landed.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"attachment_id": {
"description": "The binding a private file opens through; null when the reader can't open it.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"mime",
"name",
"bytes",
"width",
"height",
"duration",
"pages",
"status",
"url",
"attachment_id"
]
}
},
"access": {
"type": "array",
"items": {
"type": "object",
"properties": {
"resource": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"entry",
"quiz",
"attachment",
"page",
"download"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"channel": {
"type": "string",
"x-extensible-enum": [
"api",
"any",
"web",
"mcp",
"feed"
]
},
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"resource",
"channel",
"tier_id"
]
}
},
"quizzes": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"entry_id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"version": {
"type": "number"
},
"settings": {
"type": "object",
"properties": {
"attempts_allowed": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pass_mark": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"show_answers": {
"type": "boolean"
}
},
"required": [
"attempts_allowed",
"pass_mark",
"show_answers"
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"entry_id",
"product_id",
"version",
"settings",
"created_at",
"updated_at"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"in_use": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"count": {
"type": "number"
}
},
"required": [
"kind",
"count"
]
}
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"subtitle": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"section": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"preview": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"position": {
"type": "number"
},
"status": {
"type": "string",
"x-extensible-enum": [
"draft",
"scheduled",
"published"
]
},
"published_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"search": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"ai_generated": {
"description": "The description was machine-written, which readers are told.",
"type": "boolean"
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"summary",
"attachments",
"files",
"access",
"quizzes",
"in_use",
"id",
"product_id",
"slug",
"title",
"subtitle",
"section",
"preview",
"position",
"status",
"published_at",
"search",
"created_at",
"updated_at",
"settings",
"metadata"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}GET/v1/stores/{store}/entries/{entry}
Reads one entry. Scope subpage:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
entry | path | required |
200
Schema
{
"type": "object",
"properties": {
"attachments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"preview_only": {
"type": "boolean"
},
"from_body": {
"type": "boolean"
},
"position": {
"type": "number"
},
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
}
},
"required": [
"id",
"target",
"role",
"delivery",
"preview_only",
"from_body",
"position",
"asset"
]
}
},
"files": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"video",
"audio",
"image",
"pdf",
"file"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"width": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"height": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"duration": {
"description": "Seconds.",
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pages": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"url": {
"description": "A public file's lasting URL; null for a private one, or one whose bytes haven't landed.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"attachment_id": {
"description": "The binding a private file opens through; null when the reader can't open it.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"mime",
"name",
"bytes",
"width",
"height",
"duration",
"pages",
"status",
"url",
"attachment_id"
]
}
},
"access": {
"type": "array",
"items": {
"type": "object",
"properties": {
"resource": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"entry",
"quiz",
"attachment",
"page",
"download"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"channel": {
"type": "string",
"x-extensible-enum": [
"api",
"any",
"web",
"mcp",
"feed"
]
},
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"resource",
"channel",
"tier_id"
]
}
},
"quizzes": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"entry_id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"version": {
"type": "number"
},
"settings": {
"type": "object",
"properties": {
"attempts_allowed": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pass_mark": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"show_answers": {
"type": "boolean"
}
},
"required": [
"attempts_allowed",
"pass_mark",
"show_answers"
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"entry_id",
"product_id",
"version",
"settings",
"created_at",
"updated_at"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"in_use": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"count": {
"type": "number"
}
},
"required": [
"kind",
"count"
]
}
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"subtitle": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"section": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"preview": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"position": {
"type": "number"
},
"status": {
"type": "string",
"x-extensible-enum": [
"draft",
"scheduled",
"published"
]
},
"published_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"search": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"ai_generated": {
"description": "The description was machine-written, which readers are told.",
"type": "boolean"
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"attachments",
"files",
"access",
"quizzes",
"in_use",
"id",
"product_id",
"slug",
"title",
"subtitle",
"section",
"preview",
"position",
"status",
"published_at",
"search",
"created_at",
"updated_at",
"settings",
"metadata"
]
}PATCH/v1/stores/{store}/entries/{entry}
Updates an entry's fields. Scope subpage:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
entry | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"search": {
"anyOf": [
{
"type": "string",
"maxLength": 20000
},
{
"type": "null"
}
]
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"settings": {
"type": "object",
"properties": {
"ai_generated": {
"description": "The description was machine-written, which readers are told.",
"type": "boolean"
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"section": {
"anyOf": [
{
"type": "string",
"maxLength": 120
},
{
"type": "null"
}
]
},
"subtitle": {
"anyOf": [
{
"type": "string",
"maxLength": 500
},
{
"type": "null"
}
]
},
"preview": {
"description": "The teaser as stored HTML: 16 KiB of UTF-8, so a quarter as many characters always fit; empty clears it.",
"anyOf": [
{
"type": "string",
"maxLength": 4096
},
{
"type": "null"
}
]
},
"place": {
"description": "After the last entry of its chapter, or past the product's last when the chapter has none; an update moves it only when its section changes.",
"type": "string",
"const": "chapter"
},
"new_section": {
"description": "Refuse a section another chapter holds, so a new chapter never joins one by accident.",
"type": "boolean",
"const": true
},
"from": {
"description": "The fields the caller read; one holding another value now refuses.",
"type": "object",
"properties": {
"title": {
"type": "string"
},
"subtitle": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"section": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"preview": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"description": "An entry without `ai_generated` holds false.",
"type": "object",
"properties": {
"ai_generated": {
"type": "boolean"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"attachments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"preview_only": {
"type": "boolean"
},
"from_body": {
"type": "boolean"
},
"position": {
"type": "number"
},
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
}
},
"required": [
"id",
"target",
"role",
"delivery",
"preview_only",
"from_body",
"position",
"asset"
]
}
},
"files": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"video",
"audio",
"image",
"pdf",
"file"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"width": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"height": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"duration": {
"description": "Seconds.",
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pages": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"url": {
"description": "A public file's lasting URL; null for a private one, or one whose bytes haven't landed.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"attachment_id": {
"description": "The binding a private file opens through; null when the reader can't open it.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"mime",
"name",
"bytes",
"width",
"height",
"duration",
"pages",
"status",
"url",
"attachment_id"
]
}
},
"access": {
"type": "array",
"items": {
"type": "object",
"properties": {
"resource": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"entry",
"quiz",
"attachment",
"page",
"download"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"channel": {
"type": "string",
"x-extensible-enum": [
"api",
"any",
"web",
"mcp",
"feed"
]
},
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"resource",
"channel",
"tier_id"
]
}
},
"quizzes": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"entry_id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"version": {
"type": "number"
},
"settings": {
"type": "object",
"properties": {
"attempts_allowed": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pass_mark": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"show_answers": {
"type": "boolean"
}
},
"required": [
"attempts_allowed",
"pass_mark",
"show_answers"
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"entry_id",
"product_id",
"version",
"settings",
"created_at",
"updated_at"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"in_use": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"count": {
"type": "number"
}
},
"required": [
"kind",
"count"
]
}
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"subtitle": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"section": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"preview": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"position": {
"type": "number"
},
"status": {
"type": "string",
"x-extensible-enum": [
"draft",
"scheduled",
"published"
]
},
"published_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"search": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"ai_generated": {
"description": "The description was machine-written, which readers are told.",
"type": "boolean"
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"attachments",
"files",
"access",
"quizzes",
"in_use",
"id",
"product_id",
"slug",
"title",
"subtitle",
"section",
"preview",
"position",
"status",
"published_at",
"search",
"created_at",
"updated_at",
"settings",
"metadata"
]
}DELETE/v1/stores/{store}/entries/{entry}
Deletes an entry. Scope subpage:delete.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
entry | path | required | |
discard_progress | query | Lets what customers did in it (completions, quiz sittings) and its notifications go with it; needs customer:write and organization:write. | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
200
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"deleted": {
"type": "boolean",
"const": true
}
},
"required": [
"id",
"deleted"
]
}GET/v1/stores/{store}/products/{product}/entries/stats
Counts a product's entries by status and section. Scope subpage:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
200
Schema
{
"type": "object",
"properties": {
"students": {
"type": "number"
},
"average_completion": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"entries": {
"type": "array",
"items": {
"type": "object",
"properties": {
"entry_id": {
"type": "string"
},
"completions": {
"type": "number"
},
"completed_fraction": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
}
},
"required": [
"entry_id",
"completions",
"completed_fraction"
]
}
}
},
"required": [
"students",
"average_completion",
"entries"
]
}POST/v1/stores/{store}/entries/{entry}/publish
Publishes an entry now or schedules it. Scope subpage:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
entry | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"at": {
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2}))?$"
},
"expect": {
"description": "The status the caller saw; one that moved meanwhile, as a post taken down elsewhere, refuses.",
"type": "string",
"enum": [
"draft",
"scheduled",
"published"
]
}
},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"attachments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"preview_only": {
"type": "boolean"
},
"from_body": {
"type": "boolean"
},
"position": {
"type": "number"
},
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
}
},
"required": [
"id",
"target",
"role",
"delivery",
"preview_only",
"from_body",
"position",
"asset"
]
}
},
"files": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"video",
"audio",
"image",
"pdf",
"file"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"width": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"height": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"duration": {
"description": "Seconds.",
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pages": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"url": {
"description": "A public file's lasting URL; null for a private one, or one whose bytes haven't landed.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"attachment_id": {
"description": "The binding a private file opens through; null when the reader can't open it.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"mime",
"name",
"bytes",
"width",
"height",
"duration",
"pages",
"status",
"url",
"attachment_id"
]
}
},
"access": {
"type": "array",
"items": {
"type": "object",
"properties": {
"resource": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"entry",
"quiz",
"attachment",
"page",
"download"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"channel": {
"type": "string",
"x-extensible-enum": [
"api",
"any",
"web",
"mcp",
"feed"
]
},
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"resource",
"channel",
"tier_id"
]
}
},
"quizzes": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"entry_id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"version": {
"type": "number"
},
"settings": {
"type": "object",
"properties": {
"attempts_allowed": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pass_mark": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"show_answers": {
"type": "boolean"
}
},
"required": [
"attempts_allowed",
"pass_mark",
"show_answers"
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"entry_id",
"product_id",
"version",
"settings",
"created_at",
"updated_at"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"in_use": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"count": {
"type": "number"
}
},
"required": [
"kind",
"count"
]
}
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"subtitle": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"section": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"preview": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"position": {
"type": "number"
},
"status": {
"type": "string",
"x-extensible-enum": [
"draft",
"scheduled",
"published"
]
},
"published_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"search": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"ai_generated": {
"description": "The description was machine-written, which readers are told.",
"type": "boolean"
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"attachments",
"files",
"access",
"quizzes",
"in_use",
"id",
"product_id",
"slug",
"title",
"subtitle",
"section",
"preview",
"position",
"status",
"published_at",
"search",
"created_at",
"updated_at",
"settings",
"metadata"
]
}POST/v1/stores/{store}/entries/{entry}/unpublish
Takes an entry back to draft. Scope subpage:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
entry | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"attachments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"role": {
"type": "string",
"x-extensible-enum": [
"body",
"staged",
"staged_file",
"prose",
"teaser",
"embed",
"deliverable",
"poster",
"logo",
"prompt",
"stylesheet"
]
},
"delivery": {
"type": "string",
"x-extensible-enum": [
"inline",
"download",
"stream"
]
},
"preview_only": {
"type": "boolean"
},
"from_body": {
"type": "boolean"
},
"position": {
"type": "number"
},
"asset": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"storage": {
"type": "string",
"x-extensible-enum": [
"r2",
"s3",
"inline"
]
},
"locator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string",
"x-extensible-enum": [
"uploaded",
"derived",
"internal",
"authored"
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"enforcement": {
"type": "string",
"x-extensible-enum": [
"public",
"external",
"signed"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"quota_bytes": {
"type": "number"
},
"name": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"redacted": {
"type": "boolean"
},
"security": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"basic",
"full"
]
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"processed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
},
"duration": {
"description": "Seconds, measured, so rarely whole.",
"type": "number",
"exclusiveMinimum": 0
},
"pages": {
"type": "integer",
"minimum": 0
},
"transcript": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"arguments": {
"description": "What an MCP prompt asks for; only an authored prompt carries it.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"required": {
"type": "boolean"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"match": {
"description": "Pattern the whole value must match, diacritic-insensitive.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"flags": {
"description": "Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"description": "What a refused value is told instead of the default reason.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lenient": {
"type": "boolean"
}
},
"required": [
"name",
"description",
"required",
"default",
"match",
"flags",
"message",
"lenient"
]
}
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"storage",
"locator",
"origin",
"custodian",
"enforcement",
"mime",
"bytes",
"quota_bytes",
"name",
"title",
"ext",
"status",
"parent_id",
"redacted",
"security",
"description",
"processed_at",
"metadata",
"created_at"
]
}
},
"required": [
"id",
"target",
"role",
"delivery",
"preview_only",
"from_body",
"position",
"asset"
]
}
},
"files": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"x-extensible-enum": [
"video",
"audio",
"image",
"pdf",
"file"
]
},
"mime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"bytes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"width": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"height": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"duration": {
"description": "Seconds.",
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pages": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"ready",
"failed",
"unavailable"
]
},
"url": {
"description": "A public file's lasting URL; null for a private one, or one whose bytes haven't landed.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"attachment_id": {
"description": "The binding a private file opens through; null when the reader can't open it.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"mime",
"name",
"bytes",
"width",
"height",
"duration",
"pages",
"status",
"url",
"attachment_id"
]
}
},
"access": {
"type": "array",
"items": {
"type": "object",
"properties": {
"resource": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"x-extensible-enum": [
"product",
"entry",
"quiz",
"attachment",
"page",
"download"
]
},
"id": {
"type": "string"
}
},
"required": [
"kind",
"id"
]
},
"channel": {
"type": "string",
"x-extensible-enum": [
"api",
"any",
"web",
"mcp",
"feed"
]
},
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"resource",
"channel",
"tier_id"
]
}
},
"quizzes": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"entry_id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"version": {
"type": "number"
},
"settings": {
"type": "object",
"properties": {
"attempts_allowed": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pass_mark": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"show_answers": {
"type": "boolean"
}
},
"required": [
"attempts_allowed",
"pass_mark",
"show_answers"
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"entry_id",
"product_id",
"version",
"settings",
"created_at",
"updated_at"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"in_use": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string"
},
"count": {
"type": "number"
}
},
"required": [
"kind",
"count"
]
}
},
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"subtitle": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"section": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"preview": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"position": {
"type": "number"
},
"status": {
"type": "string",
"x-extensible-enum": [
"draft",
"scheduled",
"published"
]
},
"published_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"search": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"ai_generated": {
"description": "The description was machine-written, which readers are told.",
"type": "boolean"
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"attachments",
"files",
"access",
"quizzes",
"in_use",
"id",
"product_id",
"slug",
"title",
"subtitle",
"section",
"preview",
"position",
"status",
"published_at",
"search",
"created_at",
"updated_at",
"settings",
"metadata"
]
}POST/v1/stores/{store}/products/{product}/entries/reorder
Sets the order of a product's entries. Scope subpage:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"entries": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
"minItems": 1
},
"expect": {
"description": "The order the caller read; another order now refuses, so two moves never overwrite each other.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
}
}
},
"required": [
"entries"
],
"additionalProperties": false
}200
Schema
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"subtitle": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"section": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"preview": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"position": {
"type": "number"
},
"status": {
"type": "string",
"x-extensible-enum": [
"draft",
"scheduled",
"published"
]
},
"published_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"search": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"ai_generated": {
"description": "The description was machine-written, which readers are told.",
"type": "boolean"
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"id",
"product_id",
"slug",
"title",
"subtitle",
"section",
"preview",
"position",
"status",
"published_at",
"search",
"created_at",
"updated_at",
"settings",
"metadata"
]
}
}GET/v1/stores/{store}/products/{product}/sections
Lists a product's entry sections. Scope subpage:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
200
Schema
{
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"section": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"entries": {
"type": "number"
},
"id": {
"type": "null"
}
},
"required": [
"section",
"entries",
"id"
]
},
{
"type": "object",
"properties": {
"section": {
"type": "string"
},
"entries": {
"type": "number"
},
"id": {
"type": "string"
}
},
"required": [
"section",
"entries",
"id"
]
}
]
}
}POST/v1/stores/{store}/products/{product}/sections
Adds an entry section to a product. Scope subpage:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"section": {
"type": "string",
"minLength": 1,
"maxLength": 120
}
},
"required": [
"section"
],
"additionalProperties": false
}201
Schema
{
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"section": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"entries": {
"type": "number"
},
"id": {
"type": "null"
}
},
"required": [
"section",
"entries",
"id"
]
},
{
"type": "object",
"properties": {
"section": {
"type": "string"
},
"entries": {
"type": "number"
},
"id": {
"type": "string"
}
},
"required": [
"section",
"entries",
"id"
]
}
]
}
}POST/v1/stores/{store}/products/{product}/sections/rename
Renames a product's entry section. Scope subpage:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"section": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 120
},
{
"type": "null"
}
]
},
"section_id": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"to": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 120
},
{
"type": "null"
}
]
}
},
"required": [
"to"
],
"additionalProperties": false
}200
Schema
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"subtitle": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"section": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"preview": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"position": {
"type": "number"
},
"status": {
"type": "string",
"x-extensible-enum": [
"draft",
"scheduled",
"published"
]
},
"published_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"search": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"ai_generated": {
"description": "The description was machine-written, which readers are told.",
"type": "boolean"
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"id",
"product_id",
"slug",
"title",
"subtitle",
"section",
"preview",
"position",
"status",
"published_at",
"search",
"created_at",
"updated_at",
"settings",
"metadata"
]
}
}POST/v1/stores/{store}/products/{product}/sections/remove
Removes a product's entry section, its entries kept outside any section. Scope subpage:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
product | path | required | An id, or slug:<slug>. |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"section": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 120
},
{
"type": "null"
}
]
},
"section_id": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"into": {
"description": "Where its entries go; absent for an empty chapter, refused once an entry took it.",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 120
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}200
Schema
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"subtitle": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"section": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"preview": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"position": {
"type": "number"
},
"status": {
"type": "string",
"x-extensible-enum": [
"draft",
"scheduled",
"published"
]
},
"published_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"search": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"settings": {
"type": "object",
"properties": {
"ai_generated": {
"description": "The description was machine-written, which readers are told.",
"type": "boolean"
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"id",
"product_id",
"slug",
"title",
"subtitle",
"section",
"preview",
"position",
"status",
"published_at",
"search",
"created_at",
"updated_at",
"settings",
"metadata"
]
}
}subscription
GET/v1/stores/{store}/subscriptions/stats
Reads the store's subscription stats over a period. Scope subscription:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
from | query | ||
to | query | ||
bucket | query | ||
product | query | An id. |
200
Schema
{
"type": "object",
"properties": {
"total": {
"type": "number"
},
"by_status": {
"type": "object",
"properties": {
"active": {
"type": "number"
},
"past_due": {
"type": "number"
},
"paused": {
"type": "number"
}
},
"required": [
"active",
"past_due",
"paused"
]
},
"cancelling": {
"type": "number"
},
"started": {
"type": "object",
"properties": {
"current": {
"type": "number"
},
"previous": {
"type": "number"
}
},
"required": [
"current",
"previous"
]
},
"mrr": {
"type": "array",
"items": {
"type": "object",
"properties": {
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"active": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"at_risk": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"ending": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
}
},
"required": [
"currency",
"exponent",
"active",
"at_risk",
"ending"
]
}
},
"churn": {
"type": "object",
"properties": {
"current": {
"type": "object",
"properties": {
"ended": {
"type": "number"
},
"base": {
"type": "number"
}
},
"required": [
"ended",
"base"
]
},
"previous": {
"type": "object",
"properties": {
"ended": {
"type": "number"
},
"base": {
"type": "number"
}
},
"required": [
"ended",
"base"
]
}
},
"required": [
"current",
"previous"
]
},
"series": {
"type": "array",
"items": {
"type": "object",
"properties": {
"previous_active": {
"type": "number"
},
"previous_past_due": {
"type": "number"
},
"previous_paused": {
"type": "number"
},
"start": {
"type": "string"
},
"end": {
"type": "string"
},
"active": {
"type": "number"
},
"past_due": {
"type": "number"
},
"paused": {
"type": "number"
}
},
"required": [
"previous_active",
"previous_past_due",
"previous_paused",
"start",
"end",
"active",
"past_due",
"paused"
]
}
},
"bucket": {
"type": "string",
"x-extensible-enum": [
"day",
"week",
"month"
]
},
"time_zone": {
"type": "string"
},
"from": {
"type": "string"
},
"to": {
"type": "string"
},
"previous_range": {
"type": "object",
"properties": {
"from": {
"type": "string"
},
"to": {
"type": "string"
}
},
"required": [
"from",
"to"
]
}
},
"required": [
"total",
"by_status",
"cancelling",
"started",
"mrr",
"churn",
"series",
"bucket",
"time_zone",
"from",
"to",
"previous_range"
]
}GET/v1/stores/{store}/subscriptions
Pages the store's subscriptions. Scope subscription:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | Sorted by ended, rows without a value come last either way. | |
direction | query | ||
limit | query | ||
cursor | query | ||
count | query | ||
search | query | ||
facets | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"customer": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"erased": {
"type": "boolean"
}
},
"required": [
"id",
"name",
"email",
"phone",
"erased"
]
},
{
"type": "null"
}
]
},
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"plan": {
"anyOf": [
{
"type": "object",
"properties": {
"created_at": {
"type": "string"
},
"id": {
"type": "string"
},
"price_id": {
"type": "string"
},
"amount": {
"type": "number"
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"period": {
"type": "object",
"properties": {
"unit": {
"type": "string",
"x-extensible-enum": [
"day",
"week",
"month",
"year"
]
},
"multiplier": {
"type": "number"
}
},
"required": [
"unit",
"multiplier"
]
},
"autorenew": {
"type": "boolean"
}
},
"required": [
"created_at",
"id",
"price_id",
"amount",
"currency",
"exponent",
"period",
"autorenew"
]
},
{
"type": "null"
}
]
},
"periods": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"subscription_id": {
"type": "string"
},
"starts_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ends_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"failed",
"paid",
"refunded"
]
},
"settlement_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"grant_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"subscription_id",
"starts_at",
"ends_at",
"status",
"settlement_id",
"grant_id"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"id": {
"type": "string"
},
"customer_id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"plan_id": {
"type": "string"
},
"processor": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"stripe"
]
},
{
"type": "null"
}
]
},
"external_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"account_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"unpaid",
"active",
"past_due",
"paused",
"cancelled",
"ended"
]
},
"cancel_at_period_end": {
"type": "boolean"
},
"instrument_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"cancel_reason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"billing_managed": {
"type": "boolean"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ended_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"customer",
"product",
"plan",
"periods",
"id",
"customer_id",
"product_id",
"plan_id",
"processor",
"external_ref",
"account_ref",
"status",
"cancel_at_period_end",
"instrument_ref",
"cancel_reason",
"billing_managed",
"created_at",
"ended_at"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}GET/v1/stores/{store}/subscription_periods
Pages the billing periods of subscriptions. Scope subscription:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | ||
direction | query | ||
limit | query | ||
cursor | query | ||
count | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"subscription_id": {
"type": "string"
},
"starts_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ends_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"failed",
"paid",
"refunded"
]
},
"settlement_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"grant_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"subscription_id",
"starts_at",
"ends_at",
"status",
"settlement_id",
"grant_id"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}GET/v1/stores/{store}/subscription_transitions
Pages the status changes of subscriptions. Scope subscription:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | ||
direction | query | ||
limit | query | ||
cursor | query | ||
count | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"subscription_id": {
"type": "string"
},
"from_status": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"unpaid",
"active",
"past_due",
"paused",
"cancelled",
"ended"
]
},
{
"type": "null"
}
]
},
"to_status": {
"type": "string",
"x-extensible-enum": [
"unpaid",
"active",
"past_due",
"paused",
"cancelled",
"ended"
]
},
"source": {
"type": "string",
"x-extensible-enum": [
"customer",
"import",
"processor",
"merchant",
"system"
]
},
"reason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"occurred_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"subscription_id",
"from_status",
"to_status",
"source",
"reason",
"occurred_at"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}GET/v1/stores/{store}/subscriptions/{subscription}
Reads one subscription. Scope subscription:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
subscription | path | required |
200
Schema
{
"type": "object",
"properties": {
"customer": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"erased": {
"type": "boolean"
}
},
"required": [
"id",
"name",
"email",
"phone",
"erased"
]
},
{
"type": "null"
}
]
},
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"plan": {
"anyOf": [
{
"type": "object",
"properties": {
"created_at": {
"type": "string"
},
"id": {
"type": "string"
},
"price_id": {
"type": "string"
},
"amount": {
"type": "number"
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"period": {
"type": "object",
"properties": {
"unit": {
"type": "string",
"x-extensible-enum": [
"day",
"week",
"month",
"year"
]
},
"multiplier": {
"type": "number"
}
},
"required": [
"unit",
"multiplier"
]
},
"autorenew": {
"type": "boolean"
}
},
"required": [
"created_at",
"id",
"price_id",
"amount",
"currency",
"exponent",
"period",
"autorenew"
]
},
{
"type": "null"
}
]
},
"periods": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"subscription_id": {
"type": "string"
},
"starts_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ends_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"failed",
"paid",
"refunded"
]
},
"settlement_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"grant_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"subscription_id",
"starts_at",
"ends_at",
"status",
"settlement_id",
"grant_id"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"id": {
"type": "string"
},
"customer_id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"plan_id": {
"type": "string"
},
"processor": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"stripe"
]
},
{
"type": "null"
}
]
},
"external_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"account_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"unpaid",
"active",
"past_due",
"paused",
"cancelled",
"ended"
]
},
"cancel_at_period_end": {
"type": "boolean"
},
"instrument_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"cancel_reason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"billing_managed": {
"type": "boolean"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ended_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"customer",
"product",
"plan",
"periods",
"id",
"customer_id",
"product_id",
"plan_id",
"processor",
"external_ref",
"account_ref",
"status",
"cancel_at_period_end",
"instrument_ref",
"cancel_reason",
"billing_managed",
"created_at",
"ended_at"
]
}POST/v1/stores/{store}/subscriptions/{subscription}/cancel
Cancels a subscription now or at the end of its period. Scope subscription:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
subscription | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"when": {
"type": "string",
"enum": [
"now",
"period_end"
]
},
"reason": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 500
},
{
"type": "null"
}
]
}
},
"required": [
"when"
],
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"customer": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"erased": {
"type": "boolean"
}
},
"required": [
"id",
"name",
"email",
"phone",
"erased"
]
},
{
"type": "null"
}
]
},
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"plan": {
"anyOf": [
{
"type": "object",
"properties": {
"created_at": {
"type": "string"
},
"id": {
"type": "string"
},
"price_id": {
"type": "string"
},
"amount": {
"type": "number"
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"period": {
"type": "object",
"properties": {
"unit": {
"type": "string",
"x-extensible-enum": [
"day",
"week",
"month",
"year"
]
},
"multiplier": {
"type": "number"
}
},
"required": [
"unit",
"multiplier"
]
},
"autorenew": {
"type": "boolean"
}
},
"required": [
"created_at",
"id",
"price_id",
"amount",
"currency",
"exponent",
"period",
"autorenew"
]
},
{
"type": "null"
}
]
},
"periods": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"subscription_id": {
"type": "string"
},
"starts_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ends_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"failed",
"paid",
"refunded"
]
},
"settlement_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"grant_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"subscription_id",
"starts_at",
"ends_at",
"status",
"settlement_id",
"grant_id"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"id": {
"type": "string"
},
"customer_id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"plan_id": {
"type": "string"
},
"processor": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"stripe"
]
},
{
"type": "null"
}
]
},
"external_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"account_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"unpaid",
"active",
"past_due",
"paused",
"cancelled",
"ended"
]
},
"cancel_at_period_end": {
"type": "boolean"
},
"instrument_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"cancel_reason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"billing_managed": {
"type": "boolean"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ended_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"customer",
"product",
"plan",
"periods",
"id",
"customer_id",
"product_id",
"plan_id",
"processor",
"external_ref",
"account_ref",
"status",
"cancel_at_period_end",
"instrument_ref",
"cancel_reason",
"billing_managed",
"created_at",
"ended_at"
]
}POST/v1/stores/{store}/subscriptions/{subscription}/resume
Withdraws a subscription's scheduled cancellation. Scope subscription:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
subscription | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {},
"additionalProperties": false
}200
Schema
{
"type": "object",
"properties": {
"customer": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"erased": {
"type": "boolean"
}
},
"required": [
"id",
"name",
"email",
"phone",
"erased"
]
},
{
"type": "null"
}
]
},
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"plan": {
"anyOf": [
{
"type": "object",
"properties": {
"created_at": {
"type": "string"
},
"id": {
"type": "string"
},
"price_id": {
"type": "string"
},
"amount": {
"type": "number"
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"period": {
"type": "object",
"properties": {
"unit": {
"type": "string",
"x-extensible-enum": [
"day",
"week",
"month",
"year"
]
},
"multiplier": {
"type": "number"
}
},
"required": [
"unit",
"multiplier"
]
},
"autorenew": {
"type": "boolean"
}
},
"required": [
"created_at",
"id",
"price_id",
"amount",
"currency",
"exponent",
"period",
"autorenew"
]
},
{
"type": "null"
}
]
},
"periods": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"subscription_id": {
"type": "string"
},
"starts_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ends_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"pending",
"failed",
"paid",
"refunded"
]
},
"settlement_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"grant_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"subscription_id",
"starts_at",
"ends_at",
"status",
"settlement_id",
"grant_id"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"id": {
"type": "string"
},
"customer_id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"plan_id": {
"type": "string"
},
"processor": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"stripe"
]
},
{
"type": "null"
}
]
},
"external_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"account_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"x-extensible-enum": [
"unpaid",
"active",
"past_due",
"paused",
"cancelled",
"ended"
]
},
"cancel_at_period_end": {
"type": "boolean"
},
"instrument_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"cancel_reason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"billing_managed": {
"type": "boolean"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ended_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"customer",
"product",
"plan",
"periods",
"id",
"customer_id",
"product_id",
"plan_id",
"processor",
"external_ref",
"account_ref",
"status",
"cancel_at_period_end",
"instrument_ref",
"cancel_reason",
"billing_managed",
"created_at",
"ended_at"
]
}transaction
GET/v1/stores/{store}/stats
Reads the store's takings and audience stats over a period. Scope transaction:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
from | query | ||
to | query | ||
bucket | query |
200
Schema
{
"type": "object",
"properties": {
"store_currency": {
"anyOf": [
{
"type": "object",
"properties": {
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
}
},
"required": [
"currency",
"exponent"
]
},
{
"type": "null"
}
]
},
"orders": {
"type": "object",
"properties": {
"current": {
"type": "number"
},
"previous": {
"type": "number"
}
},
"required": [
"current",
"previous"
]
},
"new_customers": {
"type": "object",
"properties": {
"current": {
"type": "number"
},
"previous": {
"type": "number"
}
},
"required": [
"current",
"previous"
]
},
"active_subscriptions": {
"type": "object",
"properties": {
"current": {
"type": "number"
},
"previous": {
"type": "number"
}
},
"required": [
"current",
"previous"
]
},
"currencies": {
"type": "array",
"items": {
"type": "object",
"properties": {
"net": {
"anyOf": [
{
"type": "object",
"properties": {
"current": {
"type": "number"
},
"previous": {
"type": "number"
}
},
"required": [
"current",
"previous"
]
},
{
"type": "null"
}
]
},
"orders": {
"type": "object",
"properties": {
"current": {
"type": "number"
},
"previous": {
"type": "number"
}
},
"required": [
"current",
"previous"
]
},
"series": {
"type": "array",
"items": {
"type": "object",
"properties": {
"start": {
"type": "string"
},
"end": {
"type": "string"
},
"gross": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"orders": {
"type": "number"
},
"refunded": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"platform_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"processor_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"affiliate_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"net": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"previous_gross": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"previous_orders": {
"type": "number"
},
"previous_refunded": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"previous_platform_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"previous_processor_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"previous_affiliate_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"previous_net": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
}
},
"required": [
"start",
"end",
"gross",
"orders",
"refunded",
"platform_fee",
"processor_fee",
"affiliate_fee",
"net",
"previous_gross",
"previous_orders",
"previous_refunded",
"previous_platform_fee",
"previous_processor_fee",
"previous_affiliate_fee",
"previous_net"
]
}
},
"platform_fee": {
"anyOf": [
{
"type": "object",
"properties": {
"current": {
"type": "number"
},
"previous": {
"type": "number"
}
},
"required": [
"current",
"previous"
]
},
{
"type": "null"
}
]
},
"processor_fee": {
"anyOf": [
{
"type": "object",
"properties": {
"current": {
"type": "number"
},
"previous": {
"type": "number"
}
},
"required": [
"current",
"previous"
]
},
{
"type": "null"
}
]
},
"affiliate_fee": {
"anyOf": [
{
"type": "object",
"properties": {
"current": {
"type": "number"
},
"previous": {
"type": "number"
}
},
"required": [
"current",
"previous"
]
},
{
"type": "null"
}
]
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"gross": {
"anyOf": [
{
"type": "object",
"properties": {
"current": {
"type": "number"
},
"previous": {
"type": "number"
}
},
"required": [
"current",
"previous"
]
},
{
"type": "null"
}
]
},
"refunded": {
"anyOf": [
{
"type": "object",
"properties": {
"current": {
"type": "number"
},
"previous": {
"type": "number"
}
},
"required": [
"current",
"previous"
]
},
{
"type": "null"
}
]
}
},
"required": [
"net",
"orders",
"series",
"platform_fee",
"processor_fee",
"affiliate_fee",
"currency",
"exponent",
"gross",
"refunded"
]
}
},
"bucket": {
"type": "string",
"x-extensible-enum": [
"day",
"week",
"month"
]
},
"time_zone": {
"type": "string"
},
"from": {
"type": "string"
},
"to": {
"type": "string"
},
"previous_range": {
"type": "object",
"properties": {
"from": {
"type": "string"
},
"to": {
"type": "string"
}
},
"required": [
"from",
"to"
]
}
},
"required": [
"store_currency",
"orders",
"new_customers",
"active_subscriptions",
"currencies",
"bucket",
"time_zone",
"from",
"to",
"previous_range"
]
}GET/v1/stores/{store}/orders/stats
Reads the store's order totals over a period. Scope transaction:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
from | query | ||
to | query |
200
Schema
{
"type": "object",
"properties": {
"orders": {
"type": "object",
"properties": {
"current": {
"type": "number"
},
"previous": {
"type": "number"
}
},
"required": [
"current",
"previous"
]
},
"currencies": {
"type": "array",
"items": {
"type": "object",
"properties": {
"net": {
"anyOf": [
{
"type": "object",
"properties": {
"current": {
"type": "number"
},
"previous": {
"type": "number"
}
},
"required": [
"current",
"previous"
]
},
{
"type": "null"
}
]
},
"average": {
"anyOf": [
{
"type": "object",
"properties": {
"current": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"previous": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
}
},
"required": [
"current",
"previous"
]
},
{
"type": "null"
}
]
},
"platform_fee": {
"anyOf": [
{
"type": "object",
"properties": {
"current": {
"type": "number"
},
"previous": {
"type": "number"
}
},
"required": [
"current",
"previous"
]
},
{
"type": "null"
}
]
},
"processor_fee": {
"anyOf": [
{
"type": "object",
"properties": {
"current": {
"type": "number"
},
"previous": {
"type": "number"
}
},
"required": [
"current",
"previous"
]
},
{
"type": "null"
}
]
},
"affiliate_fee": {
"anyOf": [
{
"type": "object",
"properties": {
"current": {
"type": "number"
},
"previous": {
"type": "number"
}
},
"required": [
"current",
"previous"
]
},
{
"type": "null"
}
]
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"gross": {
"anyOf": [
{
"type": "object",
"properties": {
"current": {
"type": "number"
},
"previous": {
"type": "number"
}
},
"required": [
"current",
"previous"
]
},
{
"type": "null"
}
]
},
"orders": {
"type": "object",
"properties": {
"current": {
"type": "number"
},
"previous": {
"type": "number"
}
},
"required": [
"current",
"previous"
]
},
"refunded": {
"anyOf": [
{
"type": "object",
"properties": {
"current": {
"type": "number"
},
"previous": {
"type": "number"
}
},
"required": [
"current",
"previous"
]
},
{
"type": "null"
}
]
}
},
"required": [
"net",
"average",
"platform_fee",
"processor_fee",
"affiliate_fee",
"currency",
"exponent",
"gross",
"orders",
"refunded"
]
}
},
"time_zone": {
"type": "string"
},
"from": {
"type": "string"
},
"to": {
"type": "string"
},
"previous_range": {
"type": "object",
"properties": {
"from": {
"type": "string"
},
"to": {
"type": "string"
}
},
"required": [
"from",
"to"
]
}
},
"required": [
"orders",
"currencies",
"time_zone",
"from",
"to",
"previous_range"
]
}GET/v1/stores/{store}/orders
Pages the store's orders. Scope transaction:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | Sorted by customer or coupon, rows without a value come last either way. | |
direction | query | ||
limit | query | ||
cursor | query | ||
count | query | ||
search | query | ||
facets | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"customer": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"erased": {
"type": "boolean"
}
},
"required": [
"id",
"name",
"email",
"phone",
"erased"
]
},
{
"type": "null"
}
]
},
"settled": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"refunded": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"lines": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"platform_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"processor_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"affiliate_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"refunded": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"order_id": {
"type": "string"
},
"product_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"price_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"position": {
"type": "number"
},
"quantity": {
"type": "number"
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"discount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"total": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"descriptor": {
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"price": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"tier": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"coupon": {
"type": "string"
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"product",
"platform_fee",
"processor_fee",
"affiliate_fee",
"refunded",
"id",
"order_id",
"product_id",
"tier_id",
"price_id",
"position",
"quantity",
"currency",
"exponent",
"amount",
"discount",
"total",
"descriptor"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"settlements": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"order_id": {
"type": "string"
},
"processor": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"stripe"
]
},
{
"type": "null"
}
]
},
"processor_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"account_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"platform_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"processor_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"occurred_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"recorded_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"order_id",
"processor",
"processor_ref",
"account_ref",
"custodian",
"currency",
"exponent",
"amount",
"platform_fee",
"processor_fee",
"occurred_at",
"recorded_at"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"refunds": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"settlement_id": {
"type": "string"
},
"order_id": {
"type": "string"
},
"processor_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"reason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"occurred_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"recorded_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"settlement_id",
"order_id",
"processor_ref",
"amount",
"currency",
"exponent",
"reason",
"occurred_at",
"recorded_at"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"affiliates": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"settlement_id": {
"type": "string"
},
"order_item_id": {
"type": "string"
},
"order_id": {
"type": "string"
},
"user_id": {
"type": "string"
},
"discount_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"resolution_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"settlement_id",
"order_item_id",
"order_id",
"user_id",
"discount_id",
"currency",
"exponent",
"fee",
"resolution_id"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"id": {
"type": "string"
},
"number": {
"type": "number"
},
"customer_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"discount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"total": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"fees": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"source": {
"type": "string",
"x-extensible-enum": [
"checkout",
"api",
"import",
"manual"
]
},
"source_key": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"statements": {
"type": "object",
"properties": {
"customer_status": {
"description": "How well the buyer was known; `fake` is a seeded order.",
"type": "string",
"x-extensible-enum": [
"anon",
"verified",
"fake"
]
},
"coupon": {
"type": "string"
},
"method": {
"description": "The payment method the processor reported.",
"type": "string"
},
"refund_waiver": {
"description": "Carried from the checkout.",
"type": "object",
"properties": {
"policy": {
"description": "The strictest policy among the lines, the one consented to.",
"type": "string"
},
"accepted_at": {
"type": "string"
}
},
"required": [
"policy",
"accepted_at"
]
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"note": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"occurred_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"recorded_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"customer",
"settled",
"refunded",
"lines",
"settlements",
"refunds",
"affiliates",
"id",
"number",
"customer_id",
"currency",
"exponent",
"amount",
"discount",
"total",
"fees",
"source",
"source_key",
"statements",
"note",
"occurred_at",
"recorded_at"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}POST/v1/stores/{store}/orders
Records an order paid outside the store, granting what it bought. Scope transaction:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
Body
Schema
{
"type": "object",
"properties": {
"customer": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"pattern": "^[A-Za-z]{3}$"
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"slug": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"slug"
],
"additionalProperties": false
}
]
},
"tier": {
"description": "The tier sold; the price's own when a price is named.",
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"price": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"quantity": {
"type": "integer",
"minimum": 1,
"maximum": 1000
},
"amount": {
"type": "integer",
"minimum": 0
},
"discount": {
"description": "At most the line's amount.",
"type": "integer",
"minimum": 0
},
"code": {
"description": "The discount code the line sold with, so a rule bound to it fires.",
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"product",
"amount"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 100
},
"source_key": {
"description": "The writer's own id for the sale, so a retried record is not a second order.",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"note": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 2000
},
{
"type": "null"
}
]
},
"occurred_at": {
"anyOf": [
{
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2}))?$"
},
{
"type": "null"
}
]
},
"grants": {
"description": "Whether each line grants its product from when the sale occurred; on unless said otherwise.",
"type": "boolean"
}
},
"required": [
"customer",
"currency",
"items"
],
"additionalProperties": false
}201
Schema
{
"type": "object",
"properties": {
"customer": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"erased": {
"type": "boolean"
}
},
"required": [
"id",
"name",
"email",
"phone",
"erased"
]
},
{
"type": "null"
}
]
},
"settled": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"refunded": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"lines": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"platform_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"processor_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"affiliate_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"refunded": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"order_id": {
"type": "string"
},
"product_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"price_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"position": {
"type": "number"
},
"quantity": {
"type": "number"
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"discount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"total": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"descriptor": {
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"price": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"tier": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"coupon": {
"type": "string"
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"product",
"platform_fee",
"processor_fee",
"affiliate_fee",
"refunded",
"id",
"order_id",
"product_id",
"tier_id",
"price_id",
"position",
"quantity",
"currency",
"exponent",
"amount",
"discount",
"total",
"descriptor"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"settlements": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"order_id": {
"type": "string"
},
"processor": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"stripe"
]
},
{
"type": "null"
}
]
},
"processor_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"account_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"platform_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"processor_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"occurred_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"recorded_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"order_id",
"processor",
"processor_ref",
"account_ref",
"custodian",
"currency",
"exponent",
"amount",
"platform_fee",
"processor_fee",
"occurred_at",
"recorded_at"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"refunds": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"settlement_id": {
"type": "string"
},
"order_id": {
"type": "string"
},
"processor_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"reason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"occurred_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"recorded_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"settlement_id",
"order_id",
"processor_ref",
"amount",
"currency",
"exponent",
"reason",
"occurred_at",
"recorded_at"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"affiliates": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"settlement_id": {
"type": "string"
},
"order_item_id": {
"type": "string"
},
"order_id": {
"type": "string"
},
"user_id": {
"type": "string"
},
"discount_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"resolution_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"settlement_id",
"order_item_id",
"order_id",
"user_id",
"discount_id",
"currency",
"exponent",
"fee",
"resolution_id"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"id": {
"type": "string"
},
"number": {
"type": "number"
},
"customer_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"discount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"total": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"fees": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"source": {
"type": "string",
"x-extensible-enum": [
"checkout",
"api",
"import",
"manual"
]
},
"source_key": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"statements": {
"type": "object",
"properties": {
"customer_status": {
"description": "How well the buyer was known; `fake` is a seeded order.",
"type": "string",
"x-extensible-enum": [
"anon",
"verified",
"fake"
]
},
"coupon": {
"type": "string"
},
"method": {
"description": "The payment method the processor reported.",
"type": "string"
},
"refund_waiver": {
"description": "Carried from the checkout.",
"type": "object",
"properties": {
"policy": {
"description": "The strictest policy among the lines, the one consented to.",
"type": "string"
},
"accepted_at": {
"type": "string"
}
},
"required": [
"policy",
"accepted_at"
]
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"note": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"occurred_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"recorded_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"customer",
"settled",
"refunded",
"lines",
"settlements",
"refunds",
"affiliates",
"id",
"number",
"customer_id",
"currency",
"exponent",
"amount",
"discount",
"total",
"fees",
"source",
"source_key",
"statements",
"note",
"occurred_at",
"recorded_at"
]
}GET/v1/stores/{store}/orders/{order}
Reads one order. Scope transaction:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
order | path | required |
200
Schema
{
"type": "object",
"properties": {
"customer": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"erased": {
"type": "boolean"
}
},
"required": [
"id",
"name",
"email",
"phone",
"erased"
]
},
{
"type": "null"
}
]
},
"settled": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"refunded": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"lines": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"platform_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"processor_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"affiliate_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"refunded": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"order_id": {
"type": "string"
},
"product_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"price_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"position": {
"type": "number"
},
"quantity": {
"type": "number"
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"discount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"total": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"descriptor": {
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"price": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"tier": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"coupon": {
"type": "string"
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"product",
"platform_fee",
"processor_fee",
"affiliate_fee",
"refunded",
"id",
"order_id",
"product_id",
"tier_id",
"price_id",
"position",
"quantity",
"currency",
"exponent",
"amount",
"discount",
"total",
"descriptor"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"settlements": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"order_id": {
"type": "string"
},
"processor": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"stripe"
]
},
{
"type": "null"
}
]
},
"processor_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"account_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"platform_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"processor_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"occurred_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"recorded_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"order_id",
"processor",
"processor_ref",
"account_ref",
"custodian",
"currency",
"exponent",
"amount",
"platform_fee",
"processor_fee",
"occurred_at",
"recorded_at"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"refunds": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"settlement_id": {
"type": "string"
},
"order_id": {
"type": "string"
},
"processor_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"reason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"occurred_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"recorded_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"settlement_id",
"order_id",
"processor_ref",
"amount",
"currency",
"exponent",
"reason",
"occurred_at",
"recorded_at"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"affiliates": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"settlement_id": {
"type": "string"
},
"order_item_id": {
"type": "string"
},
"order_id": {
"type": "string"
},
"user_id": {
"type": "string"
},
"discount_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"resolution_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"settlement_id",
"order_item_id",
"order_id",
"user_id",
"discount_id",
"currency",
"exponent",
"fee",
"resolution_id"
]
}
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total"
]
},
"id": {
"type": "string"
},
"number": {
"type": "number"
},
"customer_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"discount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"total": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"fees": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"source": {
"type": "string",
"x-extensible-enum": [
"checkout",
"api",
"import",
"manual"
]
},
"source_key": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"statements": {
"type": "object",
"properties": {
"customer_status": {
"description": "How well the buyer was known; `fake` is a seeded order.",
"type": "string",
"x-extensible-enum": [
"anon",
"verified",
"fake"
]
},
"coupon": {
"type": "string"
},
"method": {
"description": "The payment method the processor reported.",
"type": "string"
},
"refund_waiver": {
"description": "Carried from the checkout.",
"type": "object",
"properties": {
"policy": {
"description": "The strictest policy among the lines, the one consented to.",
"type": "string"
},
"accepted_at": {
"type": "string"
}
},
"required": [
"policy",
"accepted_at"
]
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"note": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"occurred_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"recorded_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"customer",
"settled",
"refunded",
"lines",
"settlements",
"refunds",
"affiliates",
"id",
"number",
"customer_id",
"currency",
"exponent",
"amount",
"discount",
"total",
"fees",
"source",
"source_key",
"statements",
"note",
"occurred_at",
"recorded_at"
]
}GET/v1/stores/{store}/orders/{order}/items
Pages an order's lines. Scope transaction:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
order | path | required | |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | ||
direction | query | ||
limit | query | ||
cursor | query | ||
count | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"title",
"category",
"deleted"
]
},
{
"type": "null"
}
]
},
"platform_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"processor_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"affiliate_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"refunded": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"order_id": {
"type": "string"
},
"product_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"tier_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"price_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"position": {
"type": "number"
},
"quantity": {
"type": "number"
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"discount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"total": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"descriptor": {
"type": "object",
"properties": {
"product": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"price": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"tier": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"coupon": {
"type": "string"
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"product",
"platform_fee",
"processor_fee",
"affiliate_fee",
"refunded",
"id",
"order_id",
"product_id",
"tier_id",
"price_id",
"position",
"quantity",
"currency",
"exponent",
"amount",
"discount",
"total",
"descriptor"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}GET/v1/stores/{store}/orders/{order}/settlements
Pages an order's settlements. Scope transaction:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
order | path | required | |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | ||
direction | query | ||
limit | query | ||
cursor | query | ||
count | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"order_id": {
"type": "string"
},
"processor": {
"anyOf": [
{
"type": "string",
"x-extensible-enum": [
"stripe"
]
},
{
"type": "null"
}
]
},
"processor_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"account_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"custodian": {
"type": "string",
"x-extensible-enum": [
"platform",
"seller",
"external"
]
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"platform_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"processor_fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"occurred_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"recorded_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"order_id",
"processor",
"processor_ref",
"account_ref",
"custodian",
"currency",
"exponent",
"amount",
"platform_fee",
"processor_fee",
"occurred_at",
"recorded_at"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}GET/v1/stores/{store}/orders/{order}/refunds
Pages an order's refunds. Scope transaction:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
order | path | required | |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | ||
direction | query | ||
limit | query | ||
cursor | query | ||
count | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"allocations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"refund_id": {
"type": "string"
},
"order_item_id": {
"type": "string"
},
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
}
},
"required": [
"currency",
"exponent",
"refund_id",
"order_item_id",
"amount"
]
}
},
"id": {
"type": "string"
},
"settlement_id": {
"type": "string"
},
"order_id": {
"type": "string"
},
"processor_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"reason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"occurred_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"recorded_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"allocations",
"id",
"settlement_id",
"order_id",
"processor_ref",
"amount",
"currency",
"exponent",
"reason",
"occurred_at",
"recorded_at"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}POST/v1/stores/{store}/orders/{order}/refunds
Records a refund of an order, optionally revoking what it granted. Scope transaction:write.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
order | path | required | |
Idempotency-Key | header | Repeats within 24 hours answer the first result; the same key with other arguments is a conflict. |
Body
Schema
{
"type": "object",
"properties": {
"settlement": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
"amount": {
"type": "integer",
"minimum": 1
},
"reason": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 500
},
{
"type": "null"
}
]
},
"processor_ref": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"allocations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"order_item": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"id"
],
"additionalProperties": false
},
"amount": {
"type": "integer",
"minimum": 0
}
},
"required": [
"order_item",
"amount"
],
"additionalProperties": false
},
"maxItems": 200
}
},
"required": [
"settlement",
"amount"
],
"additionalProperties": false
}201
Schema
{
"type": "object",
"properties": {
"allocations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"refund_id": {
"type": "string"
},
"order_item_id": {
"type": "string"
},
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
}
},
"required": [
"currency",
"exponent",
"refund_id",
"order_item_id",
"amount"
]
}
},
"id": {
"type": "string"
},
"settlement_id": {
"type": "string"
},
"order_id": {
"type": "string"
},
"processor_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"reason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"occurred_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"recorded_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"allocations",
"id",
"settlement_id",
"order_id",
"processor_ref",
"amount",
"currency",
"exponent",
"reason",
"occurred_at",
"recorded_at"
]
}GET/v1/stores/{store}/orders/{order}/affiliates
Pages the affiliate commissions an order earned. Scope transaction:read.
| Parameter | In | ||
|---|---|---|---|
store | path | required | The store's id. |
order | path | required | |
filter | query | filter[<field>]=<value> is an equality, filter[<field>][<op>]=<value> names the operator; in repeats the parameter. | |
sort | query | ||
direction | query | ||
limit | query | ||
cursor | query | ||
count | query |
200
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"resolution": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"user_id": {
"type": "string"
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"x-extensible-enum": [
"paid",
"void"
]
},
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"processor": {
"anyOf": [
{
"type": "string",
"const": "stripe"
},
{
"type": "null"
}
]
},
"processor_ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"reason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"occurred_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"recorded_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"user_id",
"currency",
"exponent",
"kind",
"amount",
"processor",
"processor_ref",
"reason",
"occurred_at",
"recorded_at"
]
},
{
"type": "null"
}
]
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"code",
"name"
]
},
{
"type": "null"
}
]
},
"settlement_id": {
"type": "string"
},
"order_item_id": {
"type": "string"
},
"order_id": {
"type": "string"
},
"user_id": {
"type": "string"
},
"discount_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"currency": {
"type": "string"
},
"exponent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"fee": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"resolution_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"user": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"type": "string"
},
"avatar": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"email",
"avatar"
]
},
{
"type": "null"
}
]
}
},
"required": [
"resolution",
"discount",
"settlement_id",
"order_item_id",
"order_id",
"user_id",
"discount_id",
"currency",
"exponent",
"fee",
"resolution_id",
"user"
]
}
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"total": {
"type": "number"
},
"facets": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "number"
}
}
}
},
"required": [
"items",
"cursor"
]
}