{"openapi":"3.1.0","info":{"title":"Sherpo merchant API","version":"1"},"servers":[{"url":"https://merchant-api.sherpo.it"}],"paths":{"/v1/stores/{store}/bulk":{"post":{"operationId":"bulk","summary":"Runs one bulk-capable change over many rows in one transaction, answering each item's outcome.","tags":["store"],"security":[{"bearer":[]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Runs one bulk-capable change over many rows in one transaction, answering each item's outcome.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"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}}}}]}}}}}},"/v1/stores/{store}/categories":{"get":{"operationId":"listCategories","summary":"Lists the product categories the store may use.","tags":["product"],"security":[{"bearer":["product:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Lists the product categories the store may use.","content":{"application/json":{"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"]}}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products":{"get":{"operationId":"listProducts","summary":"Pages the store's products.","tags":["product"],"security":[{"bearer":["product:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","description":"Sorted by published or rating, rows without a value come last either way.","schema":{"type":"string","enum":["catalog","created","published","title","priority","sales","rating"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}},{"name":"search","in":"query","schema":{"type":"string","minLength":1}},{"name":"facets","in":"query","explode":true,"schema":{"type":"array","items":{"type":"string","enum":["status","unlisted"]}}}],"responses":{"200":{"description":"Pages the store's products.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"createProduct","summary":"Creates a draft product.","tags":["product"],"security":[{"bearer":["product:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"201":{"description":"Creates a draft product.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/products/{product}":{"get":{"operationId":"getProduct","summary":"Reads one product with its tiers and prices.","tags":["product"],"security":[{"bearer":["product:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Reads one product with its tiers and prices.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updateProduct","summary":"Updates a product's fields.","tags":["product"],"security":[{"bearer":["product:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Updates a product's fields.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"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}}}}},"delete":{"operationId":"deleteProduct","summary":"Deletes a product no order, grant or subscription refers to.","tags":["product"],"security":[{"bearer":["product:delete"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Deletes a product no order, grant or subscription refers to.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/summaries":{"get":{"operationId":"productSummaries","summary":"Reads the short summaries of up to a page of products by id.","tags":["product"],"security":[{"bearer":["product:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"ids","in":"query","required":true,"explode":true,"schema":{"type":"array","items":{"type":"string","minLength":1,"maxLength":512},"minItems":1,"maxItems":100}}],"responses":{"200":{"description":"Reads the short summaries of up to a page of products by id.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/publish":{"post":{"operationId":"publishProduct","summary":"Publishes a product now or schedules it.","tags":["product"],"security":[{"bearer":["product:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Publishes a product now or schedules it.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/products/{product}/unpublish":{"post":{"operationId":"unpublishProduct","summary":"Takes a product back to draft.","tags":["product"],"security":[{"bearer":["product:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Takes a product back to draft.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/v1/stores/{store}/products/{product}/discontinue":{"post":{"operationId":"discontinueProduct","summary":"Stops selling a product while keeping it for its holders.","tags":["product"],"security":[{"bearer":["product:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Stops selling a product while keeping it for its holders.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/v1/stores/{store}/products/{product}/reinstate":{"post":{"operationId":"reinstateProduct","summary":"Sells a discontinued product again.","tags":["product"],"security":[{"bearer":["product:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Sells a discontinued product again.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/v1/stores/{store}/products/{product}/unlist":{"post":{"operationId":"unlistProduct","summary":"Hides a product from the store's listings while keeping its page reachable.","tags":["product"],"security":[{"bearer":["product:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Hides a product from the store's listings while keeping its page reachable.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/v1/stores/{store}/products/{product}/relist":{"post":{"operationId":"relistProduct","summary":"Shows an unlisted product in the store's listings again.","tags":["product"],"security":[{"bearer":["product:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Shows an unlisted product in the store's listings again.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/v1/stores/{store}/tiers":{"get":{"operationId":"listTiers","summary":"Pages the tiers of the store's products, or of one product.","tags":["product"],"security":[{"bearer":["product:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"query","description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1,"description":"An id, or `slug:<slug>`."}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["product"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Pages the tiers of the store's products, or of one product.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/tiers":{"post":{"operationId":"createTier","summary":"Adds a tier to a product.","tags":["product"],"security":[{"bearer":["product:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"201":{"description":"Adds a tier to a product.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120}},"required":["name"],"additionalProperties":false}}}}}},"/v1/stores/{store}/tiers/{tier}":{"patch":{"operationId":"updateTier","summary":"Renames a tier.","tags":["product"],"security":[{"bearer":["product:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"tier","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Renames a tier.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120}},"required":["name"],"additionalProperties":false}}}}},"delete":{"operationId":"deleteTier","summary":"Deletes a tier no price or holder refers to.","tags":["product"],"security":[{"bearer":["product:delete"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"tier","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Deletes a tier no price or holder refers to.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/tiers/reorder":{"post":{"operationId":"reorderTiers","summary":"Sets the order of a product's tiers.","tags":["product"],"security":[{"bearer":["product:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Sets the order of a product's tiers.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/prices":{"get":{"operationId":"listPrices","summary":"Pages the prices of the store's products, or of one product.","tags":["price"],"security":[{"bearer":["price:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"query","description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1,"description":"An id, or `slug:<slug>`."}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["product"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Pages the prices of the store's products, or of one product.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/prices":{"post":{"operationId":"createPrice","summary":"Adds a price to a product's tier.","tags":["price"],"security":[{"bearer":["price:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"201":{"description":"Adds a price to a product's tier.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/prices/{price}":{"patch":{"operationId":"updatePrice","summary":"Updates a price's fields.","tags":["price"],"security":[{"bearer":["price:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"price","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Updates a price's fields.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"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}}}}},"delete":{"operationId":"deletePrice","summary":"Deletes a price no order or subscription refers to.","tags":["price"],"security":[{"bearer":["price:delete"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"price","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Deletes a price no order or subscription refers to.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/prices/{price}/highlight":{"post":{"operationId":"highlightPrice","summary":"Makes a price the one a product's page features.","tags":["price"],"security":[{"bearer":["price:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"price","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Makes a price the one a product's page features.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/v1/stores/{store}/prices/{price}/archive":{"post":{"operationId":"archivePrice","summary":"Stops offering a price while keeping it for its buyers.","tags":["price"],"security":[{"bearer":["price:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"price","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Stops offering a price while keeping it for its buyers.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/v1/stores/{store}/prices/{price}/restore":{"post":{"operationId":"restorePrice","summary":"Offers an archived price again.","tags":["price"],"security":[{"bearer":["price:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"price","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Offers an archived price again.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/v1/stores/{store}/products/{product}/entries":{"get":{"operationId":"listEntries","summary":"Pages a product's entries.","tags":["subpage"],"security":[{"bearer":["subpage:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","description":"Sorted by published, rows without a value come last either way.","schema":{"type":"string","enum":["position","created","published","title"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}},{"name":"search","in":"query","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Pages a product's entries.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"createEntry","summary":"Creates a draft entry in a product.","tags":["subpage"],"security":[{"bearer":["subpage:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"201":{"description":"Creates a draft entry in a product.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/products/{product}/entries/details":{"get":{"operationId":"listEntryDetails","summary":"Pages a product's entries, each read whole.","tags":["subpage"],"security":[{"bearer":["subpage:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","description":"Sorted by published, rows without a value come last either way.","schema":{"type":"string","enum":["position","created","published","title"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}},{"name":"search","in":"query","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Pages a product's entries, each read whole.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/entries/{entry}":{"get":{"operationId":"getEntry","summary":"Reads one entry.","tags":["subpage"],"security":[{"bearer":["subpage:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"entry","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Reads one entry.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updateEntry","summary":"Updates an entry's fields.","tags":["subpage"],"security":[{"bearer":["subpage:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"entry","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Updates an entry's fields.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"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}}}}},"delete":{"operationId":"deleteEntry","summary":"Deletes an entry.","tags":["subpage"],"security":[{"bearer":["subpage:delete"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"entry","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"discard_progress","in":"query","description":"Lets what customers did in it (completions, quiz sittings) and its notifications go with it; needs `customer:write` and `organization:write`.","schema":{"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}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Deletes an entry.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/entries/stats":{"get":{"operationId":"entryStats","summary":"Counts a product's entries by status and section.","tags":["subpage"],"security":[{"bearer":["subpage:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Counts a product's entries by status and section.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/entries/{entry}/publish":{"post":{"operationId":"publishEntry","summary":"Publishes an entry now or schedules it.","tags":["subpage"],"security":[{"bearer":["subpage:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"entry","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Publishes an entry now or schedules it.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/entries/{entry}/unpublish":{"post":{"operationId":"unpublishEntry","summary":"Takes an entry back to draft.","tags":["subpage"],"security":[{"bearer":["subpage:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"entry","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Takes an entry back to draft.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/v1/stores/{store}/products/{product}/entries/reorder":{"post":{"operationId":"reorderEntries","summary":"Sets the order of a product's entries.","tags":["subpage"],"security":[{"bearer":["subpage:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Sets the order of a product's entries.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/products/{product}/sections":{"get":{"operationId":"listSections","summary":"Lists a product's entry sections.","tags":["subpage"],"security":[{"bearer":["subpage:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Lists a product's entry sections.","content":{"application/json":{"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"]}]}}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"createSection","summary":"Adds an entry section to a product.","tags":["subpage"],"security":[{"bearer":["subpage:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"201":{"description":"Adds an entry section to a product.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}]}}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"section":{"type":"string","minLength":1,"maxLength":120}},"required":["section"],"additionalProperties":false}}}}}},"/v1/stores/{store}/products/{product}/sections/rename":{"post":{"operationId":"renameSection","summary":"Renames a product's entry section.","tags":["subpage"],"security":[{"bearer":["subpage:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Renames a product's entry section.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/products/{product}/sections/remove":{"post":{"operationId":"removeSection","summary":"Removes a product's entry section, its entries kept outside any section.","tags":["subpage"],"security":[{"bearer":["subpage:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Removes a product's entry section, its entries kept outside any section.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/pages":{"get":{"operationId":"listPages","summary":"Pages the store's custom pages.","tags":["custompage"],"security":[{"bearer":["custompage:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["menu","created","title"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}},{"name":"search","in":"query","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Pages the store's custom pages.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"createPage","summary":"Creates a draft custom page.","tags":["custompage"],"security":[{"bearer":["custompage:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"201":{"description":"Creates a draft custom page.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/pages/{page}":{"get":{"operationId":"getPage","summary":"Reads one custom page.","tags":["custompage"],"security":[{"bearer":["custompage:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"page","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Reads one custom page.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updatePage","summary":"Updates a custom page's fields.","tags":["custompage"],"security":[{"bearer":["custompage:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"page","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Updates a custom page's fields.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"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}}}}},"delete":{"operationId":"deletePage","summary":"Deletes a custom page.","tags":["custompage"],"security":[{"bearer":["custompage:delete"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"page","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Deletes a custom page.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/pages/{page}/publish":{"post":{"operationId":"publishPage","summary":"Publishes a custom page now or schedules it.","tags":["custompage"],"security":[{"bearer":["custompage:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"page","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Publishes a custom page now or schedules it.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/pages/{page}/unpublish":{"post":{"operationId":"unpublishPage","summary":"Takes a custom page back to draft.","tags":["custompage"],"security":[{"bearer":["custompage:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"page","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Takes a custom page back to draft.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/{kind}/{id}/attachments":{"get":{"operationId":"listAttachments","summary":"Lists the files attached to a resource.","tags":["file"],"security":[{"bearer":["file:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"kind","in":"path","required":true,"description":"The target's kind, in the plural.","schema":{"type":"string","minLength":1}},{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Lists the files attached to a resource.","content":{"application/json":{"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"]}}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"attachAsset","summary":"Attaches a file to a resource in a role.","tags":["file"],"security":[{"bearer":["file:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"kind","in":"path","required":true,"description":"The target's kind, in the plural.","schema":{"type":"string","minLength":1}},{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Attaches a file to a resource in a role.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/{kind}/{id}/body":{"get":{"operationId":"readBody","summary":"Reads a product's, entry's, page's or quiz's body, published and staged.","tags":["file"],"security":[{"bearer":["file:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"kind","in":"path","required":true,"description":"The target's kind, in the plural.","schema":{"type":"string","minLength":1}},{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"staged","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Reads a product's, entry's, page's or quiz's body, published and staged.","content":{"application/json":{"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"}]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"put":{"operationId":"setBody","summary":"Stages a new body for a product, entry, page or quiz.","tags":["file"],"security":[{"bearer":["file:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"kind","in":"path","required":true,"description":"The target's kind, in the plural.","schema":{"type":"string","minLength":1}},{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Stages a new body for a product, entry, page or quiz.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/{kind}/{id}/body/publish":{"post":{"operationId":"publishBody","summary":"Publishes the staged body.","tags":["file"],"security":[{"bearer":["file:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"kind","in":"path","required":true,"description":"The target's kind, in the plural.","schema":{"type":"string","minLength":1}},{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Publishes the staged body.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/{kind}/{id}/body/discard":{"post":{"operationId":"discardStaged","summary":"Discards the staged body, keeping the published one.","tags":["file"],"security":[{"bearer":["file:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"kind","in":"path","required":true,"description":"The target's kind, in the plural.","schema":{"type":"string","minLength":1}},{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Discards the staged body, keeping the published one.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/attachments/{attachment}":{"patch":{"operationId":"updateAttachment","summary":"Updates an attachment's role, delivery or preview flag.","tags":["file"],"security":[{"bearer":["file:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"attachment","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Updates an attachment's role, delivery or preview flag.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/{kind}/{id}/attachments/reorder":{"post":{"operationId":"reorderAttachments","summary":"Sets the order of a resource's attachments.","tags":["file"],"security":[{"bearer":["file:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"kind","in":"path","required":true,"description":"The target's kind, in the plural.","schema":{"type":"string","minLength":1}},{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Sets the order of a resource's attachments.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/attachments/{attachment}/detach":{"post":{"operationId":"detachAttachment","summary":"Detaches a file from a resource, keeping the file.","tags":["file"],"security":[{"bearer":["file:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"attachment","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Detaches a file from a resource, keeping the file.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/products/{product}/prompts":{"get":{"operationId":"listPrompts","summary":"Pages a product's MCP prompts with their text; needs product:read too.","tags":["file"],"security":[{"bearer":["file:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["position"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Pages a product's MCP prompts with their text; needs product:read too.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"createPrompt","summary":"Adds an MCP prompt to a product; needs product:write too.","tags":["file"],"security":[{"bearer":["file:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"201":{"description":"Adds an MCP prompt to a product; needs product:write too.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/prompts/{prompt}":{"get":{"operationId":"getPrompt","summary":"Reads one of a product's MCP prompts; needs product:read too.","tags":["file"],"security":[{"bearer":["file:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"prompt","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Reads one of a product's MCP prompts; needs product:read too.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updatePrompt","summary":"Updates an MCP prompt's fields, text or access; needs product:write too.","tags":["file"],"security":[{"bearer":["file:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"prompt","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Updates an MCP prompt's fields, text or access; needs product:write too.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"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}}}}},"delete":{"operationId":"deletePrompt","summary":"Deletes an MCP prompt; needs product:write too.","tags":["file"],"security":[{"bearer":["file:delete"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"prompt","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Deletes an MCP prompt; needs product:write too.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/poster":{"put":{"operationId":"setProductPoster","summary":"Sets, swaps or clears a product's thumbnail, its first poster, if it is still the one the caller saw; needs product:write too.","tags":["file"],"security":[{"bearer":["file:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Sets, swaps or clears a product's thumbnail, its first poster, if it is still the one the caller saw; needs product:write too.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/{kind}/{id}/access_requirements":{"get":{"operationId":"listAccessRequirements","summary":"Lists the tiers that unlock a product, entry, page or file.","tags":["product"],"security":[{"bearer":["product:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"kind","in":"path","required":true,"description":"The target's kind, in the plural.","schema":{"type":"string","minLength":1}},{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Lists the tiers that unlock a product, entry, page or file.","content":{"application/json":{"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"]}}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"put":{"operationId":"setAccessRequirement","summary":"Requires a tier to unlock a resource.","tags":["product"],"security":[{"bearer":["product:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"kind","in":"path","required":true,"description":"The target's kind, in the plural.","schema":{"type":"string","minLength":1}},{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Requires a tier to unlock a resource.","content":{"application/json":{"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"]}}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"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}}}}},"delete":{"operationId":"clearAccessRequirement","summary":"Removes a tier requirement from a resource.","tags":["product"],"security":[{"bearer":["product:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"kind","in":"path","required":true,"description":"The target's kind, in the plural.","schema":{"type":"string","minLength":1}},{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"channel","in":"query","required":true,"schema":{"type":"string","enum":["api","any","web","mcp","feed"]}},{"name":"from","in":"query","style":"deepObject","explode":true,"schema":{"type":"object","properties":{"preview_only":{"type":"boolean"},"asset":{"type":"string","minLength":1,"description":"An id."}},"additionalProperties":false}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Removes a tier requirement from a resource.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/access_requirements/query":{"post":{"operationId":"listResourceAccess","summary":"Reads the access requirements of many resources at once.","tags":["product"],"security":[{"bearer":["product:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Reads the access requirements of many resources at once.","content":{"application/json":{"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"]}}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"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}}}},"x-read-only":true}},"/v1/stores/{store}/assets":{"get":{"operationId":"listAssets","summary":"Pages the store's files.","tags":["file"],"security":[{"bearer":["file:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["created","name","size"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}},{"name":"search","in":"query","schema":{"type":"string","minLength":1}},{"name":"facets","in":"query","explode":true,"schema":{"type":"array","items":{"type":"string","enum":["status","origin"]}}}],"responses":{"200":{"description":"Pages the store's files.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"createAsset","summary":"Creates a link file, such as an external video.","tags":["file"],"security":[{"bearer":["file:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"201":{"description":"Creates a link file, such as an external video.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/assets/{asset}":{"get":{"operationId":"getAsset","summary":"Reads one file.","tags":["file"],"security":[{"bearer":["file:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"asset","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Reads one file.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updateAsset","summary":"Updates a file's name, title and description.","tags":["file"],"security":[{"bearer":["file:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"asset","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Updates a file's name, title and description.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"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}}}}},"delete":{"operationId":"deleteAsset","summary":"Deletes a file nothing uses.","tags":["file"],"security":[{"bearer":["file:delete"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"asset","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"detach","in":"query","schema":{"type":"boolean"}},{"name":"bindings","in":"query","description":"The digest `getAsset` answers.","schema":{"description":"The digest `getAsset` answers.","type":"string","minLength":64,"maxLength":64,"pattern":"^[0-9a-f]{64}$"}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Deletes a file nothing uses.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/quota":{"get":{"operationId":"getQuota","summary":"Reads the store's storage use against its plan's allowance.","tags":["file"],"security":[{"bearer":["file:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Reads the store's storage use against its plan's allowance.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/uploads":{"post":{"operationId":"createUpload","summary":"Reserves a file and answers where to upload its bytes.","tags":["file"],"security":[{"bearer":["file:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}}],"responses":{"201":{"description":"Reserves a file and answers where to upload its bytes.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/assets/{asset}/complete":{"post":{"operationId":"completeUpload","summary":"Marks an upload done once its bytes are in place.","tags":["file"],"security":[{"bearer":["file:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"asset","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Marks an upload done once its bytes are in place.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/v1/stores/{store}/assets/{asset}/cancel":{"post":{"operationId":"cancelUpload","summary":"Cancels an upload that was never completed.","tags":["file"],"security":[{"bearer":["file:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"asset","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Cancels an upload that was never completed.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/v1/stores/{store}/assets/{asset}/url":{"post":{"operationId":"getAssetUrl","summary":"Mints a short-lived URL to a file's bytes.","tags":["file"],"security":[{"bearer":["file:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"asset","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Mints a short-lived URL to a file's bytes.","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url","expires_at"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"disposition":{"type":"string","enum":["inline","attachment"]},"expires_in":{"type":"integer","minimum":1,"maximum":604800}},"additionalProperties":false}}}}}},"/v1/stores/{store}/assets/{asset}/size":{"post":{"operationId":"recordAssetSize","summary":"Records a file's measured pixel size or length, keeping its other metadata.","tags":["file"],"security":[{"bearer":["file:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"asset","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"201":{"description":"Records a file's measured pixel size or length, keeping its other metadata.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/assets/{asset}/move":{"post":{"operationId":"moveAsset","summary":"Moves a file between public and private storage.","tags":["file"],"security":[{"bearer":["file:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"asset","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Moves a file between public and private storage.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"storage":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":512}},"required":["id"],"additionalProperties":false}},"required":["storage"],"additionalProperties":false}}}}}},"/v1/stores/{store}/assets/{asset}/replace":{"post":{"operationId":"replaceAsset","summary":"Replaces a file's bytes with another upload's, keeping where it is used.","tags":["file"],"security":[{"bearer":["file:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"asset","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Replaces a file's bytes with another upload's, keeping where it is used.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"upload":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":512}},"required":["id"],"additionalProperties":false}},"required":["upload"],"additionalProperties":false}}}}}},"/v1/stores/{store}/stats":{"get":{"operationId":"storeStats","summary":"Reads the store's takings and audience stats over a period.","tags":["transaction"],"security":[{"bearer":["transaction:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"from","in":"query","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","schema":{"type":"string","format":"date"}},{"name":"bucket","in":"query","schema":{"type":"string","enum":["day","week","month"]}}],"responses":{"200":{"description":"Reads the store's takings and audience stats over a period.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/orders/stats":{"get":{"operationId":"orderStats","summary":"Reads the store's order totals over a period.","tags":["transaction"],"security":[{"bearer":["transaction:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"from","in":"query","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"Reads the store's order totals over a period.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/customers/stats":{"get":{"operationId":"customerStats","summary":"Reads the store's customer stats over a period.","tags":["customer"],"security":[{"bearer":["customer:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"from","in":"query","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","schema":{"type":"string","format":"date"}},{"name":"bucket","in":"query","schema":{"type":"string","enum":["day","week","month"]}}],"responses":{"200":{"description":"Reads the store's customer stats over a period.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/subscriptions/stats":{"get":{"operationId":"subscriptionStats","summary":"Reads the store's subscription stats over a period.","tags":["subscription"],"security":[{"bearer":["subscription:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"from","in":"query","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","schema":{"type":"string","format":"date"}},{"name":"bucket","in":"query","schema":{"type":"string","enum":["day","week","month"]}},{"name":"product","in":"query","description":"An id.","schema":{"type":"string","minLength":1,"description":"An id."}}],"responses":{"200":{"description":"Reads the store's subscription stats over a period.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/stats":{"get":{"operationId":"productStats","summary":"Reads a product's sales and audience stats over a period.","tags":["product"],"security":[{"bearer":["product:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"from","in":"query","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","schema":{"type":"string","format":"date"}},{"name":"bucket","in":"query","schema":{"type":"string","enum":["day","week","month"]}}],"responses":{"200":{"description":"Reads a product's sales and audience stats over a period.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/stats":{"get":{"operationId":"catalogStats","summary":"Counts the store's products by status.","tags":["product"],"security":[{"bearer":["product:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Counts the store's products by status.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/file_stats":{"get":{"operationId":"productFileStats","summary":"Counts a product's files and links by kind.","tags":["file"],"security":[{"bearer":["file:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Counts a product's files and links by kind.","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"number"},"links":{"type":"number"},"bytes":{"type":"number"}},"required":["files","links","bytes"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/orders":{"get":{"operationId":"listOrders","summary":"Pages the store's orders.","tags":["transaction"],"security":[{"bearer":["transaction:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","description":"Sorted by customer or coupon, rows without a value come last either way.","schema":{"type":"string","enum":["occurred","number","amount","fees","customer","coupon"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}},{"name":"search","in":"query","schema":{"type":"string","minLength":1}},{"name":"facets","in":"query","explode":true,"schema":{"type":"array","items":{"type":"string","enum":["source"]}}}],"responses":{"200":{"description":"Pages the store's orders.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"recordOrder","summary":"Records an order paid outside the store, granting what it bought.","tags":["transaction"],"security":[{"bearer":["transaction:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}}],"responses":{"201":{"description":"Records an order paid outside the store, granting what it bought.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/orders/{order}":{"get":{"operationId":"getOrder","summary":"Reads one order.","tags":["transaction"],"security":[{"bearer":["transaction:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"order","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Reads one order.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/orders/{order}/items":{"get":{"operationId":"listOrderItems","summary":"Pages an order's lines.","tags":["transaction"],"security":[{"bearer":["transaction:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"order","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["line"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Pages an order's lines.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/orders/{order}/settlements":{"get":{"operationId":"listOrderSettlements","summary":"Pages an order's settlements.","tags":["transaction"],"security":[{"bearer":["transaction:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"order","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["occurred"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Pages an order's settlements.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/orders/{order}/refunds":{"get":{"operationId":"listOrderRefunds","summary":"Pages an order's refunds.","tags":["transaction"],"security":[{"bearer":["transaction:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"order","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["occurred"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Pages an order's refunds.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"recordRefund","summary":"Records a refund of an order, optionally revoking what it granted.","tags":["transaction"],"security":[{"bearer":["transaction:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"order","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"201":{"description":"Records a refund of an order, optionally revoking what it granted.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/orders/{order}/affiliates":{"get":{"operationId":"listOrderAffiliates","summary":"Pages the affiliate commissions an order earned.","tags":["transaction"],"security":[{"bearer":["transaction:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"order","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["commission"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Pages the affiliate commissions an order earned.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/affiliate_payouts":{"post":{"operationId":"recordAffiliatePayout","summary":"Records a payout made to an affiliate.","tags":["affiliate"],"security":[{"bearer":["affiliate:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"201":{"description":"Records a payout made to an affiliate.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"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":{}}}}}},"get":{"operationId":"listAffiliatePayouts","summary":"Pages the payouts recorded to affiliates.","tags":["affiliate"],"security":[{"bearer":["affiliate:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["occurred"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Pages the payouts recorded to affiliates.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/commissions":{"get":{"operationId":"listCommissions","summary":"Pages the commissions affiliates earned.","tags":["affiliate"],"security":[{"bearer":["affiliate:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["occurred"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}},{"name":"facets","in":"query","explode":true,"schema":{"type":"array","items":{"type":"string","enum":["status"]}}}],"responses":{"200":{"description":"Pages the commissions affiliates earned.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/commissions/stats":{"get":{"operationId":"commissionStats","summary":"Reads commission totals over a period.","tags":["affiliate"],"security":[{"bearer":["affiliate:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"from","in":"query","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","schema":{"type":"string","format":"date"}},{"name":"bucket","in":"query","schema":{"type":"string","enum":["day","week","month"]}},{"name":"user","in":"query","description":"An id.","schema":{"type":"string","minLength":1,"description":"An id."}},{"name":"discount","in":"query","description":"An id.","schema":{"type":"string","minLength":1,"description":"An id."}}],"responses":{"200":{"description":"Reads commission totals over a period.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/discounts":{"get":{"operationId":"listDiscounts","summary":"Pages the store's discounts.","tags":["discount"],"security":[{"bearer":["discount:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","description":"Sorted by code, rows without a value come last either way.","schema":{"type":"string","enum":["created","code"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}},{"name":"search","in":"query","schema":{"type":"string","minLength":1}},{"name":"facets","in":"query","explode":true,"schema":{"type":"array","items":{"type":"string","enum":["status"]}}}],"responses":{"200":{"description":"Pages the store's discounts.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"createDiscount","summary":"Creates a discount.","tags":["discount"],"security":[{"bearer":["discount:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}}],"responses":{"201":{"description":"Creates a discount.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/discounts/{discount}":{"get":{"operationId":"getDiscount","summary":"Reads one discount.","tags":["discount"],"security":[{"bearer":["discount:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"discount","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Reads one discount.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updateDiscount","summary":"Updates a discount's fields.","tags":["discount"],"security":[{"bearer":["discount:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"discount","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Updates a discount's fields.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"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}}}}},"delete":{"operationId":"deleteDiscount","summary":"Deletes a discount no order refers to.","tags":["discount"],"security":[{"bearer":["discount:delete"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"discount","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Deletes a discount no order refers to.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/discounts/stats":{"get":{"operationId":"discountStats","summary":"Counts the store's discounts by status.","tags":["discount"],"security":[{"bearer":["discount:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Counts the store's discounts by status.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/discounts/{discount}/archive":{"post":{"operationId":"archiveDiscount","summary":"Stops a discount from applying while keeping it.","tags":["discount"],"security":[{"bearer":["discount:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"discount","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Stops a discount from applying while keeping it.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/v1/stores/{store}/discounts/{discount}/restore":{"post":{"operationId":"restoreDiscount","summary":"Lets an archived discount apply again.","tags":["discount"],"security":[{"bearer":["discount:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"discount","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Lets an archived discount apply again.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/v1/stores/{store}/affiliates":{"get":{"operationId":"listAffiliates","summary":"Pages the store's affiliates by discount.","tags":["affiliate"],"security":[{"bearer":["affiliate:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["updated"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Pages the store's affiliates by discount.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/discounts/{discount}/affiliates":{"put":{"operationId":"setAffiliate","summary":"Makes a user an affiliate of a discount, with their commission.","tags":["affiliate"],"security":[{"bearer":["affiliate:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"discount","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Makes a user an affiliate of a discount, with their commission.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/discounts/{discount}/affiliates/remove":{"post":{"operationId":"removeAffiliate","summary":"Removes an affiliate from a discount.","tags":["affiliate"],"security":[{"bearer":["affiliate:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"discount","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Removes an affiliate from a discount.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":512}},"required":["id"],"additionalProperties":false}},"required":["user"],"additionalProperties":false}}}}}},"/v1/stores/{store}/discounts/{discount}/restrict":{"post":{"operationId":"restrictDiscount","summary":"Sets the products, tiers or prices a discount applies to.","tags":["discount"],"security":[{"bearer":["discount:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"discount","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Sets the products, tiers or prices a discount applies to.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/discounts/{discount}/attach":{"post":{"operationId":"attachDiscount","summary":"Applies a discount to a product, tier or price.","tags":["discount"],"security":[{"bearer":["discount:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"discount","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Applies a discount to a product, tier or price.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/discounts/{discount}/detach":{"post":{"operationId":"detachDiscount","summary":"Stops a discount applying to a product, tier or price.","tags":["discount"],"security":[{"bearer":["discount:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"discount","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Stops a discount applying to a product, tier or price.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":512}},"required":["id"],"additionalProperties":false}},"required":["scope"],"additionalProperties":false}}}}}},"/v1/stores/{store}/subscriptions":{"get":{"operationId":"listSubscriptions","summary":"Pages the store's subscriptions.","tags":["subscription"],"security":[{"bearer":["subscription:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","description":"Sorted by ended, rows without a value come last either way.","schema":{"type":"string","enum":["created","ended","status","tier","amount"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}},{"name":"search","in":"query","schema":{"type":"string","minLength":1}},{"name":"facets","in":"query","explode":true,"schema":{"type":"array","items":{"type":"string","enum":["status"]}}}],"responses":{"200":{"description":"Pages the store's subscriptions.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/subscription_periods":{"get":{"operationId":"listSubscriptionPeriods","summary":"Pages the billing periods of subscriptions.","tags":["subscription"],"security":[{"bearer":["subscription:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["billed"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Pages the billing periods of subscriptions.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/subscription_transitions":{"get":{"operationId":"listSubscriptionTransitions","summary":"Pages the status changes of subscriptions.","tags":["subscription"],"security":[{"bearer":["subscription:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["occurred"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Pages the status changes of subscriptions.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/subscriptions/{subscription}":{"get":{"operationId":"getSubscription","summary":"Reads one subscription.","tags":["subscription"],"security":[{"bearer":["subscription:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"subscription","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Reads one subscription.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/subscriptions/{subscription}/cancel":{"post":{"operationId":"cancelSubscription","summary":"Cancels a subscription now or at the end of its period.","tags":["subscription"],"security":[{"bearer":["subscription:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"subscription","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Cancels a subscription now or at the end of its period.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/subscriptions/{subscription}/resume":{"post":{"operationId":"resumeSubscription","summary":"Withdraws a subscription's scheduled cancellation.","tags":["subscription"],"security":[{"bearer":["subscription:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"subscription","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Withdraws a subscription's scheduled cancellation.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/v1/stores/{store}/grants":{"get":{"operationId":"listGrants","summary":"Pages the grants of access to customers.","tags":["customer"],"security":[{"bearer":["customer:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["valid_from"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}},{"name":"facets","in":"query","explode":true,"schema":{"type":"array","items":{"type":"string","enum":["revoked","live"]}}}],"responses":{"200":{"description":"Pages the grants of access to customers.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"grantAccess","summary":"Grants a customer access to a product or tier.","tags":["customer"],"security":[{"bearer":["customer:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Grants a customer access to a product or tier.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/grants/{grant}/revoke":{"post":{"operationId":"revokeGrant","summary":"Revokes a grant of access.","tags":["customer"],"security":[{"bearer":["customer:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"grant","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Revokes a grant of access.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["reason"],"additionalProperties":false}}}}}},"/v1/stores/{store}/entitlements":{"get":{"operationId":"listEntitlements","summary":"Pages what customers may reach, as their grants and subscriptions add up.","tags":["customer"],"security":[{"bearer":["customer:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"customer","in":"query","description":"An id.","schema":{"type":"string","minLength":1,"description":"An id."}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["rebuilt"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Pages what customers may reach, as their grants and subscriptions add up.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/customers":{"get":{"operationId":"listCustomers","summary":"Pages the store's customers.","tags":["customer"],"security":[{"bearer":["customer:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","description":"Sorted by name, rows without a value come last either way.","schema":{"type":"string","enum":["created","name"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}},{"name":"search","in":"query","schema":{"type":"string","minLength":1}},{"name":"facets","in":"query","explode":true,"schema":{"type":"array","items":{"type":"string","enum":["erased"]}}}],"responses":{"200":{"description":"Pages the store's customers.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/customer_activity":{"get":{"operationId":"listCustomerActivity","summary":"Pages customers' activity over a period.","tags":["customer"],"security":[{"bearer":["customer:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"from","in":"query","schema":{"type":"string","format":"date","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","schema":{"type":"string","format":"date","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","description":"Sorted by name, rows without a value come last either way.","schema":{"type":"string","enum":["gross","orders","recent","name"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Pages customers' activity over a period.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/customers":{"get":{"operationId":"listProductCustomers","summary":"Pages a product's customers.","tags":["customer"],"security":[{"bearer":["customer:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","description":"Sorted by name, rows without a value come last either way.","schema":{"type":"string","enum":["started","date","name"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}},{"name":"search","in":"query","schema":{"type":"string","minLength":1}},{"name":"facets","in":"query","explode":true,"schema":{"type":"array","items":{"type":"string","enum":["status"]}}}],"responses":{"200":{"description":"Pages a product's customers.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/customers/stats":{"get":{"operationId":"productCustomerStats","summary":"Counts a product's customers by status.","tags":["customer"],"security":[{"bearer":["customer:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Counts a product's customers by status.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/checkouts":{"get":{"operationId":"listCheckouts","summary":"Pages the store's checkouts.","tags":["customer"],"security":[{"bearer":["customer:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"customer","in":"query","description":"An id.","schema":{"type":"string","minLength":1,"description":"An id."}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["created"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}},{"name":"facets","in":"query","explode":true,"schema":{"type":"array","items":{"type":"string","enum":["status"]}}}],"responses":{"200":{"description":"Pages the store's checkouts.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/customers/{customer}":{"get":{"operationId":"getCustomer","summary":"Reads one customer.","tags":["customer"],"security":[{"bearer":["customer:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"customer","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Reads one customer.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/customers/{customer}/erase":{"post":{"operationId":"eraseCustomer","summary":"Erases a customer's personal data, keeping the records of what they bought.","tags":["customer"],"security":[{"bearer":["customer:delete"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"customer","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Erases a customer's personal data, keeping the records of what they bought.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/v1/stores/{store}/reviews":{"get":{"operationId":"listReviews","summary":"Pages the store's product reviews.","tags":["review"],"security":[{"bearer":["review:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"query","description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1,"description":"An id, or `slug:<slug>`."}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["created","rating"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}},{"name":"search","in":"query","schema":{"type":"string","minLength":1}},{"name":"facets","in":"query","explode":true,"schema":{"type":"array","items":{"type":"string","enum":["hidden"]}}}],"responses":{"200":{"description":"Pages the store's product reviews.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/reviews/stats":{"get":{"operationId":"reviewStats","summary":"Reads review counts and ratings.","tags":["review"],"security":[{"bearer":["review:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"query","description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1,"description":"An id, or `slug:<slug>`."}}],"responses":{"200":{"description":"Reads review counts and ratings.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/reviews/{review}/hide":{"post":{"operationId":"hideReview","summary":"Hides a review from the store.","tags":["review"],"security":[{"bearer":["review:moderate"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"review","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Hides a review from the store.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/v1/stores/{store}/reviews/{review}/unhide":{"post":{"operationId":"unhideReview","summary":"Shows a hidden review again.","tags":["review"],"security":[{"bearer":["review:moderate"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"review","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Shows a hidden review again.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/v1/stores/{store}/reviews/{review}/reply":{"post":{"operationId":"replyToReview","summary":"Sets or clears the store's reply to a review.","tags":["review"],"security":[{"bearer":["review:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"review","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Sets or clears the store's reply to a review.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reply":{"anyOf":[{"type":"string","minLength":1,"maxLength":4000},{"type":"null"}]}},"required":["reply"],"additionalProperties":false}}}}}},"/v1/stores/{store}/attempts":{"get":{"operationId":"listAttempts","summary":"Pages customers' quiz attempts.","tags":["quiz"],"security":[{"bearer":["quiz:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"customer","in":"query","description":"An id.","schema":{"type":"string","minLength":1,"description":"An id."}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["started"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}},{"name":"search","in":"query","schema":{"type":"string","minLength":1}},{"name":"facets","in":"query","explode":true,"schema":{"type":"array","items":{"type":"string","enum":["status"]}}}],"responses":{"200":{"description":"Pages customers' quiz attempts.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/attempts/{attempt}":{"get":{"operationId":"getAttempt","summary":"Reads one quiz attempt with its answers.","tags":["quiz"],"security":[{"bearer":["quiz:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"attempt","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Reads one quiz attempt with its answers.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"deleteAttempt","summary":"Deletes one quiz attempt.","tags":["quiz"],"security":[{"bearer":["quiz:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"attempt","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Deletes one quiz attempt.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/certificates":{"get":{"operationId":"listCertificates","summary":"Pages the store's certificates.","tags":["certificate"],"security":[{"bearer":["certificate:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"query","description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1,"description":"An id, or `slug:<slug>`."}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["created"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}},{"name":"search","in":"query","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Pages the store's certificates.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/certificate_issues":{"get":{"operationId":"listCertificateIssues","summary":"Pages the certificates issued to customers.","tags":["certificate"],"security":[{"bearer":["certificate:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["issued"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}},{"name":"search","in":"query","schema":{"type":"string","minLength":1}},{"name":"facets","in":"query","explode":true,"schema":{"type":"array","items":{"type":"string","enum":["revoked"]}}}],"responses":{"200":{"description":"Pages the certificates issued to customers.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/certificates/stats":{"get":{"operationId":"certificateStats","summary":"Reads a product's certificate issues over a period.","tags":["certificate"],"security":[{"bearer":["certificate:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"from","in":"query","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"Reads a product's certificate issues over a period.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/asset_deliveries":{"get":{"operationId":"listAssetDeliveries","summary":"Pages the deliveries of files to customers.","tags":["file"],"security":[{"bearer":["file:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["issued"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Pages the deliveries of files to customers.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/asset_uses":{"get":{"operationId":"listAssetUses","summary":"Pages where files are used.","tags":["file"],"security":[{"bearer":["file:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["bound"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Pages where files are used.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/certificates/{certificate}/issue":{"post":{"operationId":"issueCertificate","summary":"Issues a certificate to a customer.","tags":["certificate"],"security":[{"bearer":["certificate:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"certificate","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Issues a certificate to a customer.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/entries/{entry}/quizzes":{"get":{"operationId":"listQuizzes","summary":"Pages an entry's quizzes.","tags":["quiz"],"security":[{"bearer":["quiz:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"entry","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["version","created"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Pages an entry's quizzes.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"createQuiz","summary":"Creates a quiz on an entry.","tags":["quiz"],"security":[{"bearer":["quiz:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"entry","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"201":{"description":"Creates a quiz on an entry.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/quizzes/{quiz}":{"get":{"operationId":"getQuiz","summary":"Reads one quiz with its questions.","tags":["quiz"],"security":[{"bearer":["quiz:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"quiz","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Reads one quiz with its questions.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updateQuiz","summary":"Updates a quiz's settings and questions.","tags":["quiz"],"security":[{"bearer":["quiz:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"quiz","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Updates a quiz's settings and questions.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"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}}}}},"delete":{"operationId":"deleteQuiz","summary":"Deletes a quiz.","tags":["quiz"],"security":[{"bearer":["quiz:delete"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"quiz","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Deletes a quiz.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/quizzes/stats":{"get":{"operationId":"quizStats","summary":"Reads a product's quiz results.","tags":["quiz"],"security":[{"bearer":["quiz:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"from","in":"query","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","schema":{"type":"string","format":"date"}},{"name":"quiz","in":"query","description":"An id.","schema":{"type":"string","minLength":1,"description":"An id."}}],"responses":{"200":{"description":"Reads a product's quiz results.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/entries/{entry}/attempts/clear":{"post":{"operationId":"clearAttempts","summary":"Clears a customer's attempts at an entry's quizzes.","tags":["quiz"],"security":[{"bearer":["quiz:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"entry","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Clears a customer's attempts at an entry's quizzes.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"number"}},"required":["deleted"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"customer":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":512}},"required":["id"],"additionalProperties":false}},"required":["customer"],"additionalProperties":false}}}}}},"/v1/stores/{store}/products/{product}/certificates":{"post":{"operationId":"createCertificate","summary":"Creates a certificate for a product.","tags":["certificate"],"security":[{"bearer":["certificate:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"201":{"description":"Creates a certificate for a product.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/certificates/{certificate}":{"patch":{"operationId":"updateCertificate","summary":"Updates a certificate's design and copy.","tags":["certificate"],"security":[{"bearer":["certificate:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"certificate","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Updates a certificate's design and copy.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"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}}}}},"delete":{"operationId":"deleteCertificate","summary":"Deletes a certificate never issued.","tags":["certificate"],"security":[{"bearer":["certificate:delete"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"certificate","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Deletes a certificate never issued.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/certificate_issues/{issue}/revoke":{"post":{"operationId":"revokeCertificateIssue","summary":"Revokes an issued certificate.","tags":["certificate"],"security":[{"bearer":["certificate:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"issue","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Revokes an issued certificate.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/v1/stores/{store}":{"get":{"operationId":"getStore","summary":"Reads the store: its name, hostname, branding and plan.","tags":["site"],"security":[{"bearer":["site:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Reads the store: its name, hostname, branding and plan.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updateStore","summary":"Updates the store's name, description and branding.","tags":["site"],"security":[{"bearer":["site:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Updates the store's name, description and branding.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/settings":{"get":{"operationId":"getSettings","summary":"Reads the store's settings.","tags":["site"],"security":[{"bearer":["site:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Reads the store's settings.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updateSettings","summary":"Updates the store's settings.","tags":["site"],"security":[{"bearer":["site:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Updates the store's settings.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/icon":{"put":{"operationId":"setStoreIcon","summary":"Sets or clears the store's icon from a file.","tags":["site"],"security":[{"bearer":["site:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Sets or clears the store's icon from a file.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"image":{"anyOf":[{"type":"string","contentEncoding":"base64"},{"type":"string","contentEncoding":"base64"}]}},"required":["image"],"additionalProperties":false}}}}}},"/v1/stores/{store}/organization":{"get":{"operationId":"getOrganization","summary":"Reads the store's business.","tags":["organization"],"security":[{"bearer":["organization:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Reads the store's business.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updateOrganization","summary":"Updates the business's name and details.","tags":["organization"],"security":[{"bearer":["organization:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Updates the business's name and details.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/organization/logo":{"put":{"operationId":"setOrganizationLogo","summary":"Sets or clears the business's logo from a file.","tags":["organization"],"security":[{"bearer":["organization:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Sets or clears the business's logo from a file.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"image":{"anyOf":[{"type":"string","contentEncoding":"base64"},{"type":"string","contentEncoding":"base64"},{"type":"null"}]}},"required":["image"],"additionalProperties":false}}}}}},"/v1/stores/{store}/balance":{"get":{"operationId":"getBalance","summary":"Reads the business's payout balance.","tags":["organization"],"security":[{"bearer":["organization:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Reads the business's payout balance.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/payouts":{"get":{"operationId":"listPayouts","summary":"Lists the business's payouts.","tags":["organization"],"security":[{"bearer":["organization:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^po_[A-Za-z0-9]+$"}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}}],"responses":{"200":{"description":"Lists the business's payouts.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/notifications":{"get":{"operationId":"listNotifications","summary":"Pages the store's customer notifications.","tags":["organization"],"security":[{"bearer":["organization:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["event"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Pages the store's customer notifications.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"createNotification","summary":"Creates a customer notification for an event.","tags":["organization"],"security":[{"bearer":["organization:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"201":{"description":"Creates a customer notification for an event.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/notifications/{notification}":{"patch":{"operationId":"updateNotification","summary":"Updates a notification's template or whether it is enabled.","tags":["organization"],"security":[{"bearer":["organization:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"notification","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Updates a notification's template or whether it is enabled.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"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}}}}},"delete":{"operationId":"deleteNotification","summary":"Deletes a notification.","tags":["organization"],"security":[{"bearer":["organization:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"notification","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Deletes a notification.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/redirects":{"get":{"operationId":"listRedirects","summary":"Pages the store's redirects.","tags":["site"],"security":[{"bearer":["site:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["path"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}},{"name":"search","in":"query","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Pages the store's redirects.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"createRedirect","summary":"Creates a redirect from a path.","tags":["site"],"security":[{"bearer":["site:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"201":{"description":"Creates a redirect from a path.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/redirects/{redirect}":{"patch":{"operationId":"updateRedirect","summary":"Updates a redirect's source or destination.","tags":["site"],"security":[{"bearer":["site:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"redirect","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Updates a redirect's source or destination.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"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}}}}},"delete":{"operationId":"deleteRedirect","summary":"Deletes a redirect.","tags":["site"],"security":[{"bearer":["site:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"redirect","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Deletes a redirect.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/paths/check":{"get":{"operationId":"checkPath","summary":"Says whether a path is free for a page or redirect.","tags":["site"],"security":[{"bearer":["site:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"kind","in":"query","required":true,"schema":{"type":"string","enum":["product","page","redirect"]}},{"name":"value","in":"query","required":true,"schema":{"type":"string","minLength":0,"maxLength":4096}},{"name":"except","in":"query","schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"Says whether a path is free for a page or redirect.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/integrations":{"get":{"operationId":"listIntegrations","summary":"Lists the store's integrations and their settings.","tags":["integration"],"security":[{"bearer":["integration:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Lists the store's integrations and their settings.","content":{"application/json":{"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"]}}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/integrations/{integration}":{"put":{"operationId":"setIntegration","summary":"Sets or clears an integration's settings.","tags":["integration"],"security":[{"bearer":["integration:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"integration","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Sets or clears an integration's settings.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/automations":{"get":{"operationId":"listAllAutomations","summary":"Pages the store's automations.","tags":["automation"],"security":[{"bearer":["automation:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["created"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}},{"name":"search","in":"query","schema":{"type":"string","minLength":1}},{"name":"facets","in":"query","explode":true,"schema":{"type":"array","items":{"type":"string","enum":["trigger_kind"]}}}],"responses":{"200":{"description":"Pages the store's automations.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"createAutomation","summary":"Creates an automation.","tags":["automation"],"security":[{"bearer":["automation:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"201":{"description":"Creates an automation.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/automation_runs":{"get":{"operationId":"listAutomationRuns","summary":"Pages the runs of automations.","tags":["automation"],"security":[{"bearer":["automation:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["occurred"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}},{"name":"facets","in":"query","explode":true,"schema":{"type":"array","items":{"type":"string","enum":["status","trigger_kind"]}}}],"responses":{"200":{"description":"Pages the runs of automations.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/automations/{automation}":{"get":{"operationId":"getAutomation","summary":"Reads one automation.","tags":["automation"],"security":[{"bearer":["automation:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"automation","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Reads one automation.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updateAutomation","summary":"Updates an automation's trigger and action.","tags":["automation"],"security":[{"bearer":["automation:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"automation","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Updates an automation's trigger and action.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"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}}}}},"delete":{"operationId":"deleteAutomation","summary":"Deletes an automation.","tags":["automation"],"security":[{"bearer":["automation:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"automation","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Deletes an automation.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/automations/{automation}/pause":{"post":{"operationId":"pauseAutomation","summary":"Pauses an automation.","tags":["automation"],"security":[{"bearer":["automation:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"automation","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Pauses an automation.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/v1/stores/{store}/automations/{automation}/resume":{"post":{"operationId":"resumeAutomation","summary":"Resumes a paused automation.","tags":["automation"],"security":[{"bearer":["automation:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"automation","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Resumes a paused automation.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/v1/stores/{store}/products/{product}/portfolio":{"get":{"operationId":"getPortfolio","summary":"Reads a portfolio product's book: settings, metrics and value.","tags":["portfolio"],"security":[{"bearer":["portfolio:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Reads a portfolio product's book: settings, metrics and value.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updatePortfolio","summary":"Updates a portfolio's settings.","tags":["portfolio"],"security":[{"bearer":["portfolio:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Updates a portfolio's settings.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/products/{product}/portfolio_holdings":{"get":{"operationId":"listHoldings","summary":"Pages a portfolio's holdings.","tags":["portfolio"],"security":[{"bearer":["portfolio:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["symbol"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}},{"name":"search","in":"query","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Pages a portfolio's holdings.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/portfolio_holdings/{holding}":{"patch":{"operationId":"updateHolding","summary":"Updates a holding's name and note.","tags":["portfolio"],"security":[{"bearer":["portfolio:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"holding","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","description":"Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7E]+$"}}],"responses":{"200":{"description":"Updates a holding's name and note.","headers":{"Idempotent-Replayed":{"description":"With an `Idempotency-Key`: `true` when this answers an earlier call with the key.","schema":{"type":"string","enum":["true","false"]}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"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}}}}}},"/v1/stores/{store}/portfolio_holdings/{holding}/announced_files":{"get":{"operationId":"listAnnouncedFiles","summary":"Lists the files announced with a holding.","tags":["portfolio"],"security":[{"bearer":["portfolio:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"holding","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Lists the files announced with a holding.","content":{"application/json":{"schema":{"type":"object","properties":{"asset_ids":{"type":"array","items":{"type":"string"}}},"required":["asset_ids"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/portfolio_events":{"get":{"operationId":"listPortfolioEvents","summary":"Pages a portfolio's events: trades, cash and notes.","tags":["portfolio"],"security":[{"bearer":["portfolio:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["occurred"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}},{"name":"search","in":"query","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Pages a portfolio's events: trades, cash and notes.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"recordPortfolioEvent","summary":"Records a trade, cash movement or note in a portfolio.","tags":["portfolio"],"security":[{"bearer":["portfolio:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}}],"responses":{"201":{"description":"Records a trade, cash movement or note in a portfolio.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"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":{}}}}}}},"/v1/stores/{store}/products/{product}/portfolio_snapshots":{"get":{"operationId":"listPortfolioSnapshots","summary":"Pages a portfolio's daily snapshots.","tags":["portfolio"],"security":[{"bearer":["portfolio:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"filter","in":"query","style":"deepObject","explode":true,"description":"`filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.","schema":{"type":"object"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["date"]}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Pages a portfolio's daily snapshots.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/symbols":{"get":{"operationId":"searchSymbols","summary":"Searches the market for symbols by name or ticker.","tags":["portfolio"],"security":[{"bearer":["portfolio:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}},{"name":"query","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"\\S"}},{"name":"symbol_type","in":"query","schema":{"anyOf":[{"type":"string","enum":["stock","crypto"]},{"type":"null"}]}}],"responses":{"200":{"description":"Searches the market for symbols by name or ticker.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/symbols/quotes/query":{"post":{"operationId":"quoteSymbols","summary":"Reads the latest quotes for symbols.","tags":["portfolio"],"security":[{"bearer":["portfolio:read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"The store's id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Reads the latest quotes for symbols.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"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}}}},"x-read-only":true}},"/v1/merchants":{"get":{"operationId":"listMerchants","summary":"Lists the businesses the token may act for, with their stores.","tags":["organization"],"security":[{"bearer":["organization:read"]}],"parameters":[{"name":"merchant","in":"query","description":"An id.","schema":{"type":"string","minLength":1,"description":"An id."}},{"name":"store","in":"query","description":"An id.","schema":{"type":"string","minLength":1,"description":"An id."}}],"responses":{"200":{"description":"Lists the businesses the token may act for, with their stores.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/merchants/{merchant}":{"get":{"operationId":"getMerchant","summary":"Reads one business with its stores.","tags":["account"],"security":[{"bearer":[]}],"parameters":[{"name":"merchant","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Reads one business with its stores.","content":{"application/json":{"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"]}}}},"default":{"description":"A problem; see https://merchant-api.sherpo.io/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent; on a 403 for a missing scope, `Bearer error=\"insufficient_scope\"`.","schema":{"type":"string"}},"Retry-After":{"description":"On a 429, the seconds until a retry may pass, when known.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}},"components":{"schemas":{"Problem":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"code":{"type":"string"},"context":{"type":"object"},"reached_core":{"type":"boolean"},"core_answer":{"type":"string"}},"required":["type","title","status","detail"]}},"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}}}