{"openapi":"3.1.0","info":{"title":"Sherpo customer API","version":"1","description":"Rich text fields come back as HTML in a closed format, wrapped in <rich-text version=\"1\">, as stored once validated. Allowed: p, h1 (Title), h2 (Heading), h3 (Subheading), br; marks strong, em, u, s, sup, sub, code (b as strong, i as em, del as s, strike as s); a with href (http, https, mailto, tel, ftp, ftps, callto, sms, cid, xmpp, irc, ircs or a relative path), target=\"_blank\"; span with style color or background-color (#rgb or #rrggbb); style text-align (left, center, right, justify) on p and h1 to h3; ul; ol (start); li (data-checked=\"true\" or \"false\" for a task list); table, thead, tbody, tr, th, td (colspan, rowspan); pre with one code (class=\"language-<id>\", the id one of bash, c, cpp, csharp, css, go, xml, java, javascript, json, kotlin, markdown, php, python, ruby, rust, sql, swift, typescript, yaml); blockquote; hr; details (open) with its summary first; figure with at most one figcaption, first or last; a link's rel (noopener, noreferrer, nofollow) is read and never stored. Images, videos, audio, slideshows, formulas, diagrams, downloads and other blocks are <block type=\"…\" props=\"{…JSON…}\"></block> elements (no raw img or video); which types a field takes is in its description. Example: <h1>Welcome</h1><p style=\"text-align: center\">Start with <strong>the intro</strong>, then <a href=\"https://example.com/notes\" target=\"_blank\">read the notes</a>.</p><ul><li data-checked=\"true\"><p>Watch the intro</p></li><li data-checked=\"false\"><p>Take the <span style=\"color: #047857\">quiz</span></p></li></ul><details><summary>Why it works</summary><p>Short lessons stick.</p></details> The guide: https://api.sherpo.io/customer/docs/text."},"servers":[{"url":"https://api.sherpo.io/customer"}],"paths":{"/v1/stores/{store}/profile":{"get":{"operationId":"getProfile","summary":"Reads the customer's profile.","tags":["profile"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}}],"responses":{"200":{"description":"Reads the customer's profile.","content":{"application/json":{"schema":{"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"]}},"id":{"type":"string"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"locale":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["contacts","id","display_name","locale","country","created_at"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updateProfile","summary":"Updates the customer's name and preferences.","tags":["profile"],"security":[{"bearer":["profile:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}}],"responses":{"200":{"description":"Updates the customer's name and preferences.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"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"]}},"id":{"type":"string"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"locale":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["contacts","id","display_name","locale","country","created_at"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"display_name":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}]},"locale":{"anyOf":[{"type":"string","minLength":1,"maxLength":35},{"type":"null"}]}},"additionalProperties":false}}}}}},"/v1/stores/{store}/contacts":{"get":{"operationId":"listContacts","summary":"Lists the customer's email address.","tags":["contact"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}}],"responses":{"200":{"description":"Lists the customer's email address.","content":{"application/json":{"schema":{"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"]}}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/contacts/change":{"post":{"operationId":"changeContact","summary":"Asks to change the customer's email address and mails the new one a code to prove it.","tags":["contact"],"security":[{"bearer":["contact:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}}],"responses":{"200":{"description":"Asks to change the customer's email address and mails the new one a code to prove it.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"expires_at":{"type":"string"}},"required":["expires_at"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","const":"email"},"value":{"type":"string","minLength":1,"maxLength":254,"pattern":"^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"}},"required":["kind","value"],"additionalProperties":false}}}}}},"/v1/stores/{store}/contacts/verify":{"post":{"operationId":"verifyContact","summary":"Proves the new email address with the code mailed to it, replacing the customer's old one.","tags":["contact"],"security":[{"bearer":["contact:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}}],"responses":{"200":{"description":"Proves the new email address with the code mailed to it, replacing the customer's old one.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"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"]}}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":254,"pattern":"^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"},"code":{"type":"string","minLength":1,"maxLength":64}},"required":["value","code"],"additionalProperties":false}}}}}},"/v1/stores/{store}/billing_profile":{"get":{"operationId":"getBillingProfile","summary":"Reads the customer's saved payment methods with each processor on the store's account.","tags":["billing"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}}],"responses":{"200":{"description":"Reads the customer's saved payment methods with each processor on the store's account.","content":{"application/json":{"schema":{"type":"object","properties":{"processors":{"type":"array","items":{"type":"object","properties":{"processor":{"type":"string","x-extensible-enum":["stripe"]},"customer_ref":{"type":"string"},"instruments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"display":{"type":"object","properties":{"brand":{"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiration":{"anyOf":[{"type":"object","properties":{"month":{"type":"number"},"year":{"type":"number"}},"required":["month","year"]},{"type":"null"}]}},"required":["brand","last4","expiration"]},"is_default":{"type":"boolean"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","type","display","is_default","created_at"]}}},"required":["processor","customer_ref","instruments"]}}},"required":["processors"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/payment_methods/{instrument}":{"delete":{"operationId":"removePaymentMethod","summary":"Removes one of the customer's saved payment methods, never one a subscription still renews on; one in a store the business deleted moves to the default card, if one is left. Refused to an app the store hasn't verified: send the customer to /account/payment-methods on the store's site.","tags":["checkout"],"security":[{"bearer":["checkout:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"instrument","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Removes one of the customer's saved payment methods, never one a subscription still renews on; one in a store the business deleted moves to the default card, if one is left. Refused to an app the store hasn't verified: send the customer to /account/payment-methods on the store's site.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"processors":{"type":"array","items":{"type":"object","properties":{"processor":{"type":"string","x-extensible-enum":["stripe"]},"customer_ref":{"type":"string"},"instruments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"display":{"type":"object","properties":{"brand":{"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiration":{"anyOf":[{"type":"object","properties":{"month":{"type":"number"},"year":{"type":"number"}},"required":["month","year"]},{"type":"null"}]}},"required":["brand","last4","expiration"]},"is_default":{"type":"boolean"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","type","display","is_default","created_at"]}}},"required":["processor","customer_ref","instruments"]}}},"required":["processors"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/payment_methods/{instrument}/default":{"put":{"operationId":"setDefaultPaymentMethod","summary":"Makes one of the customer's saved payment methods their default, which their subscriptions renew on.","tags":["checkout"],"security":[{"bearer":["checkout:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"instrument","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Makes one of the customer's saved payment methods their default, which their subscriptions renew on.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"processors":{"type":"array","items":{"type":"object","properties":{"processor":{"type":"string","x-extensible-enum":["stripe"]},"customer_ref":{"type":"string"},"instruments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"display":{"type":"object","properties":{"brand":{"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiration":{"anyOf":[{"type":"object","properties":{"month":{"type":"number"},"year":{"type":"number"}},"required":["month","year"]},{"type":"null"}]}},"required":["brand","last4","expiration"]},"is_default":{"type":"boolean"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","type","display","is_default","created_at"]}}},"required":["processor","customer_ref","instruments"]}}},"required":["processors"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","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, branding and settings.","tags":["store"],"security":[{"bearer":[]},{"publishableKey":[]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"preview","in":"query","schema":{"type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"Reads the store: its name, branding and settings.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"locale":{"type":"string"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"hostname":{"anyOf":[{"type":"string"},{"type":"null"}]},"served_hostname":{"anyOf":[{"type":"string"},{"type":"null"}]},"served_hostnames":{"type":"array","items":{"type":"string"}},"unlocks_paused":{"type":"boolean"},"mcp_endpoint":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"tint":{"anyOf":[{"type":"string"},{"type":"null"}]},"tint_dark":{"anyOf":[{"type":"string"},{"type":"null"}]},"favicon":{"type":"string"},"apple_touch_icon":{"type":"string"},"icon_96":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon_192":{"type":"string"},"icon_512":{"type":"string"},"icon":{"type":"string"},"placeholder_icon":{"type":"string"},"settings":{"type":"object","properties":{"storefront":{"type":"object","properties":{"external_site":{"anyOf":[{"type":"string"},{"type":"null"}]},"socials":{"type":"array","items":{"type":"string"}},"theme":{"type":"string","x-extensible-enum":["both","light","dark"]},"no_index":{"type":"boolean"},"powered_by":{"type":"boolean"},"animated_background":{"type":"boolean"},"header_hidden":{"type":"boolean"},"footer_hidden":{"type":"boolean"}},"required":["external_site","socials","theme","no_index","powered_by","animated_background","header_hidden","footer_hidden"]}},"required":["storefront"]},"body":{"anyOf":[{"type":"object","properties":{"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the video's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads beside the video or audio file.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]},"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"]},"preview_only":{"type":"boolean"},"from_body":{"description":"Named by its target's body text, rather than the target's own media (a lesson's video or slides).","type":"boolean"},"position":{"type":"number"},"asset":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"ext":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime":{"anyOf":[{"type":"string"},{"type":"null"}]},"bytes":{"description":"The file's size in bytes, null when it has none or is withheld.","anyOf":[{"type":"number"},{"type":"null"}]},"enforcement":{"type":"string","x-extensible-enum":["public","external","signed"]},"locator":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"type":"object","properties":{"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"duration":{"anyOf":[{"type":"number"},{"type":"null"}]},"pages":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["width","height","duration","pages"]},"status":{"type":"string","x-extensible-enum":["pending","ready","failed"]}},"required":["id","name","title","ext","description","mime","bytes","enforcement","locator","metadata","status"]}},"required":["tracks","outputs","access","id","role","delivery","preview_only","from_body","position","asset"]},{"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":{"description":"The file's size in bytes, null when it has none or is withheld.","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"]},"url":{"description":"A public file's lasting URL, an image's naming its widths' version as `#v=` once they're made; null for a private one, or one whose bytes haven't landed.","anyOf":[{"type":"string"},{"type":"null"}]},"resized":{"description":"A public image's smaller copies, narrowest first, for a `srcset`; left out until they're made and its width measured, for one kept as uploaded, and for any other file.","type":"array","items":{"type":"object","properties":{"width":{"description":"Its width in pixels, at most the image's own.","type":"integer","minimum":1},"avif":{"description":"A lasting URL to it as AVIF.","type":"string"},"webp":{"description":"A lasting URL to it as WebP.","type":"string"}},"required":["width","avif","webp"]}},"attachment_id":{"description":"The binding a private file opens through; null when the reader can't open it.","anyOf":[{"type":"string"},{"type":"null"}]},"unlocks":{"description":"What unlocks a file its own rules keep from the reader, any one; null for any other file.","anyOf":[{"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string"},"product_name":{"type":"string"},"tier":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"rank":{"type":"number"}},"required":["id","name","rank"]},{"type":"null"}]}},"required":["product_id","product_name","tier"]}},{"type":"null"}]},"video":{"description":"A video's subtitles and published AI outputs, where its read lists any and the reader may play it.","type":"object","properties":{"attachment_id":{"type":"string"},"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the file's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}}},"required":["attachment_id","tracks","outputs"]},"audio":{"description":"An audio file's waveform, subtitles and published AI outputs, where the reader may play it.","type":"object","properties":{"waveform":{"description":"256 levels from 0 to 255, base64, from the file's start to its end; null until drawn, or when it can't be.","anyOf":[{"type":"string"},{"type":"null"}]},"attachment_id":{"description":"The binding its tracks and outputs open through, which a public file carries here alone; null with none.","anyOf":[{"type":"string"},{"type":"null"}]},"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the file's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}}},"required":["waveform","attachment_id","tracks","outputs"]}},"required":["id","kind","mime","name","bytes","width","height","duration","pages","status","url","attachment_id","unlocks"]}},"maps":{"description":"The maps the body's map blocks show, matched to a block by `latitude` and `longitude`; none while the body is kept from the reader.","type":"array","items":{"type":"object","properties":{"latitude":{"type":"number"},"longitude":{"type":"number"},"light":{"description":"For a light page.","type":"object","properties":{"url":{"description":"A lasting URL to the image.","type":"string"},"width":{"description":"Its size in pixels.","type":"number"},"height":{"type":"number"},"resized":{"description":"Its smaller copies, narrowest first; null until made.","anyOf":[{"type":"array","items":{"type":"object","properties":{"width":{"description":"Its width in pixels, at most the image's own.","type":"integer","minimum":1},"avif":{"description":"A lasting URL to it as AVIF.","type":"string"},"webp":{"description":"A lasting URL to it as WebP.","type":"string"}},"required":["width","avif","webp"]}},{"type":"null"}]}},"required":["url","width","height"]},"dark":{"description":"For a dark page.","type":"object","properties":{"url":{"description":"A lasting URL to the image.","type":"string"},"width":{"description":"Its size in pixels.","type":"number"},"height":{"type":"number"},"resized":{"description":"Its smaller copies, narrowest first; null until made.","anyOf":[{"type":"array","items":{"type":"object","properties":{"width":{"description":"Its width in pixels, at most the image's own.","type":"integer","minimum":1},"avif":{"description":"A lasting URL to it as AVIF.","type":"string"},"webp":{"description":"A lasting URL to it as WebP.","type":"string"}},"required":["width","avif","webp"]}},{"type":"null"}]}},"required":["url","width","height"]},"attribution":{"description":"The credit shown over the map, linking `attribution_url`.","type":"string"},"attribution_url":{"type":"string"}},"required":["latitude","longitude","light","dark","attribution","attribution_url"]}},"stylesheet":{"anyOf":[{"type":"object","properties":{"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the video's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads beside the video or audio file.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]},"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"]},"preview_only":{"type":"boolean"},"from_body":{"description":"Named by its target's body text, rather than the target's own media (a lesson's video or slides).","type":"boolean"},"position":{"type":"number"},"asset":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"ext":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime":{"anyOf":[{"type":"string"},{"type":"null"}]},"bytes":{"description":"The file's size in bytes, null when it has none or is withheld.","anyOf":[{"type":"number"},{"type":"null"}]},"enforcement":{"type":"string","x-extensible-enum":["public","external","signed"]},"locator":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"type":"object","properties":{"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"duration":{"anyOf":[{"type":"number"},{"type":"null"}]},"pages":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["width","height","duration","pages"]},"status":{"type":"string","x-extensible-enum":["pending","ready","failed"]}},"required":["id","name","title","ext","description","mime","bytes","enforcement","locator","metadata","status"]}},"required":["tracks","outputs","access","id","role","delivery","preview_only","from_body","position","asset"]},{"type":"null"}]},"integrations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string"},"sets_cookies":{"type":"boolean"},"script":{"type":"array","items":{"type":"object","properties":{"src":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"defer":{"type":"boolean"},"async":{"type":"boolean"},"inner_html":{"anyOf":[{"type":"string"},{"type":"null"}]},"attributes":{"description":"Any other string attribute on the tag.","type":"object","properties":{},"additionalProperties":{"type":"string"}}},"required":["src","id","defer","async","inner_html","attributes"]}}},"required":["id","name","kind","sets_cookies","script"]}},"cookie_consent":{"type":"boolean"},"categories":{"type":"array","items":{"type":"object","properties":{"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":["id","label","discountable","subscribable","reviewable","repeatable","aside_size"]}},"currencies":{"type":"object","properties":{},"additionalProperties":{"type":"number"}},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","locale","currency","hostname","served_hostname","served_hostnames","unlocks_paused","mcp_endpoint","description","tint","tint_dark","favicon","apple_touch_icon","icon_96","icon_192","icon_512","icon","placeholder_icon","settings","body","files","maps","stylesheet","integrations","cookie_consent","categories","currencies","updated_at"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/visits":{"post":{"operationId":"recordVisit","summary":"Records a page your front end showed for the store's analytics, with where the visitor came from on a visit's first page; call it from the visitor's browser.","tags":["visit"],"security":[{"bearer":[]},{"publishableKey":[]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}}],"responses":{"201":{"description":"Records a page your front end showed for the store's analytics, with where the visitor came from on a visit's first page; call it from the visitor's browser.","content":{"application/json":{"schema":{"type":"null"}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","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":{"kind":{"type":"string","const":"home"},"landing":{"description":"Sent on a visit's first page alone: where the visitor came from and on what.","type":"object","properties":{"referrer":{"description":"The page that linked here, as a URL or a bare host; only its host is kept, and one that names none records none.","type":"string","minLength":0,"maxLength":2048},"utm_source":{"description":"The landing URL's `utm_source`.","type":"string","minLength":0,"maxLength":100},"utm_medium":{"description":"The landing URL's `utm_medium`.","type":"string","minLength":0,"maxLength":100},"utm_campaign":{"description":"The landing URL's `utm_campaign`.","type":"string","minLength":0,"maxLength":100},"ref":{"description":"The landing URL's `ref`.","type":"string","minLength":0,"maxLength":100},"device":{"description":"The device the page was shown on, a tablet counting as `desktop`; left out, it is read from the caller's mobile hint and user agent.","type":"string","enum":["mobile","tablet","desktop"]}},"additionalProperties":false}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"page"},"page":{"type":"string","minLength":1,"maxLength":512},"landing":{"description":"Sent on a visit's first page alone: where the visitor came from and on what.","type":"object","properties":{"referrer":{"description":"The page that linked here, as a URL or a bare host; only its host is kept, and one that names none records none.","type":"string","minLength":0,"maxLength":2048},"utm_source":{"description":"The landing URL's `utm_source`.","type":"string","minLength":0,"maxLength":100},"utm_medium":{"description":"The landing URL's `utm_medium`.","type":"string","minLength":0,"maxLength":100},"utm_campaign":{"description":"The landing URL's `utm_campaign`.","type":"string","minLength":0,"maxLength":100},"ref":{"description":"The landing URL's `ref`.","type":"string","minLength":0,"maxLength":100},"device":{"description":"The device the page was shown on, a tablet counting as `desktop`; left out, it is read from the caller's mobile hint and user agent.","type":"string","enum":["mobile","tablet","desktop"]}},"additionalProperties":false}},"required":["kind","page"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"product"},"product":{"type":"string","minLength":1,"maxLength":512},"landing":{"description":"Sent on a visit's first page alone: where the visitor came from and on what.","type":"object","properties":{"referrer":{"description":"The page that linked here, as a URL or a bare host; only its host is kept, and one that names none records none.","type":"string","minLength":0,"maxLength":2048},"utm_source":{"description":"The landing URL's `utm_source`.","type":"string","minLength":0,"maxLength":100},"utm_medium":{"description":"The landing URL's `utm_medium`.","type":"string","minLength":0,"maxLength":100},"utm_campaign":{"description":"The landing URL's `utm_campaign`.","type":"string","minLength":0,"maxLength":100},"ref":{"description":"The landing URL's `ref`.","type":"string","minLength":0,"maxLength":100},"device":{"description":"The device the page was shown on, a tablet counting as `desktop`; left out, it is read from the caller's mobile hint and user agent.","type":"string","enum":["mobile","tablet","desktop"]}},"additionalProperties":false}},"required":["kind","product"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"entry"},"product":{"type":"string","minLength":1,"maxLength":512},"entry":{"type":"string","minLength":1,"maxLength":512},"landing":{"description":"Sent on a visit's first page alone: where the visitor came from and on what.","type":"object","properties":{"referrer":{"description":"The page that linked here, as a URL or a bare host; only its host is kept, and one that names none records none.","type":"string","minLength":0,"maxLength":2048},"utm_source":{"description":"The landing URL's `utm_source`.","type":"string","minLength":0,"maxLength":100},"utm_medium":{"description":"The landing URL's `utm_medium`.","type":"string","minLength":0,"maxLength":100},"utm_campaign":{"description":"The landing URL's `utm_campaign`.","type":"string","minLength":0,"maxLength":100},"ref":{"description":"The landing URL's `ref`.","type":"string","minLength":0,"maxLength":100},"device":{"description":"The device the page was shown on, a tablet counting as `desktop`; left out, it is read from the caller's mobile hint and user agent.","type":"string","enum":["mobile","tablet","desktop"]}},"additionalProperties":false}},"required":["kind","product","entry"],"additionalProperties":false}],"properties":{}}}}}}},"/v1/stores/{store}/products":{"get":{"operationId":"listProducts","summary":"Pages the store's products with what the customer holds of each.","tags":["product"],"security":[{"bearer":["read"]},{"publishableKey":[]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","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":["catalog","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","maxLength":8192}},{"name":"count","in":"query","schema":{"type":"boolean"}},{"name":"search","in":"query","schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"coupon","in":"query","description":"A discount's code, or its id as an affiliate link carries it, priced into the offers.","schema":{"description":"A discount's code, or its id as an affiliate link carries it, priced into the offers.","type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Pages the store's products with what the customer holds of each.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"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":{"description":"The file's size in bytes, null when it has none or is withheld.","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"]},"url":{"description":"A public file's lasting URL, an image's naming its widths' version as `#v=` once they're made; null for a private one, or one whose bytes haven't landed.","anyOf":[{"type":"string"},{"type":"null"}]},"resized":{"description":"A public image's smaller copies, narrowest first, for a `srcset`; left out until they're made and its width measured, for one kept as uploaded, and for any other file.","type":"array","items":{"type":"object","properties":{"width":{"description":"Its width in pixels, at most the image's own.","type":"integer","minimum":1},"avif":{"description":"A lasting URL to it as AVIF.","type":"string"},"webp":{"description":"A lasting URL to it as WebP.","type":"string"}},"required":["width","avif","webp"]}},"attachment_id":{"description":"The binding a private file opens through; null when the reader can't open it.","anyOf":[{"type":"string"},{"type":"null"}]},"unlocks":{"description":"What unlocks a file its own rules keep from the reader, any one; null for any other file.","anyOf":[{"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string"},"product_name":{"type":"string"},"tier":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"rank":{"type":"number"}},"required":["id","name","rank"]},{"type":"null"}]}},"required":["product_id","product_name","tier"]}},{"type":"null"}]},"video":{"description":"A video's subtitles and published AI outputs, where its read lists any and the reader may play it.","type":"object","properties":{"attachment_id":{"type":"string"},"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the file's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}}},"required":["attachment_id","tracks","outputs"]},"audio":{"description":"An audio file's waveform, subtitles and published AI outputs, where the reader may play it.","type":"object","properties":{"waveform":{"description":"256 levels from 0 to 255, base64, from the file's start to its end; null until drawn, or when it can't be.","anyOf":[{"type":"string"},{"type":"null"}]},"attachment_id":{"description":"The binding its tracks and outputs open through, which a public file carries here alone; null with none.","anyOf":[{"type":"string"},{"type":"null"}]},"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the file's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}}},"required":["waveform","attachment_id","tracks","outputs"]}},"required":["id","kind","mime","name","bytes","width","height","duration","pages","status","url","attachment_id","unlocks"]}},"event":{"description":"An event product's format, place and next sessions as a visitor sees them; null for any other product.","anyOf":[{"type":"object","properties":{"format":{"description":"In person, online or both.","type":"string","x-extensible-enum":["in_person","online","hybrid"]},"reveal_location":{"description":"Who sees the location: everyone, or ticket holders alone.","type":"string","x-extensible-enum":["everyone","holders"]},"capacity":{"description":"How many guests it takes in all, or null for no limit or one no write could store.","anyOf":[{"type":"number"},{"type":"null"}]},"spots_left":{"description":"Places it still takes, held carts and sales counted, or null for no limit; a refund that ends a ticket frees its seat, any other keeps it. Seats count places only: an event whose last session ended is not for sale whatever they say.","anyOf":[{"type":"number"},{"type":"null"}]},"sold_out":{"description":"Whether no place is left, the event or every ticket type full. Seats count places only: an event whose last session ended is not for sale whatever they say.","type":"boolean"},"location":{"description":"Where it takes place, its city, region and country alone while kept to holders, or null for none set.","anyOf":[{"type":"object","properties":{"venue":{"anyOf":[{"type":"string"},{"type":"null"}]},"address":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"region":{"anyOf":[{"type":"string"},{"type":"null"}]},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"description":"ISO 3166-1 alpha-2.","anyOf":[{"type":"string"},{"type":"null"}]},"latitude":{"description":"Decimal degrees, set together with `longitude`.","anyOf":[{"type":"number"},{"type":"null"}]},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"map_url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["venue","address","city","region","postal_code","country","latitude","longitude","map_url"]},{"type":"null"}]},"map":{"description":"The venue's map, one image per theme with the credit it shows; null for none drawn yet or the location kept to holders.","anyOf":[{"type":"object","properties":{"light":{"description":"For a light page.","type":"object","properties":{"url":{"type":"string"},"width":{"type":"number"},"height":{"type":"number"},"resized":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"width":{"type":"number"},"avif":{"type":"string"},"webp":{"type":"string"}},"required":["width","avif","webp"]}},{"type":"null"}]}},"required":["url","width","height","resized"]},"dark":{"description":"For a dark page.","type":"object","properties":{"url":{"type":"string"},"width":{"type":"number"},"height":{"type":"number"},"resized":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"width":{"type":"number"},"avif":{"type":"string"},"webp":{"type":"string"}},"required":["width","avif","webp"]}},{"type":"null"}]}},"required":["url","width","height","resized"]},"attribution":{"description":"The credit shown over the map, linking `attribution_url`.","type":"string"},"attribution_url":{"type":"string"}},"required":["light","dark","attribution","attribution_url"]},{"type":"null"}]},"location_hidden":{"description":"Whether a location or a venue is held back until the caller holds a ticket.","type":"boolean"},"sessions":{"description":"The next sessions not yet ended, earliest first, at most five.","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"starts_at":{"type":"string"},"ends_at":{"type":"string"},"time_zone":{"description":"An IANA time zone, e.g. `Europe/Rome`.","type":"string"},"venue":{"description":"Where it takes place in person, or null for none or hidden.","anyOf":[{"type":"string"},{"type":"null"}]},"online_label":{"description":"How it is joined online, e.g. `Zoom`, or null for none.","anyOf":[{"type":"string"},{"type":"null"}]},"add_to_calendar":{"description":"Links that add the session to Google Calendar or Outlook, with no hidden location.","type":"object","properties":{"google":{"type":"string"},"outlook":{"description":"Outlook.com, for a personal Microsoft account.","type":"string"},"office":{"description":"Outlook on the web for a work or school account.","type":"string"}},"required":["google","outlook","office"]}},"required":["id","starts_at","ends_at","time_zone","venue","online_label","add_to_calendar"]}},"ics":{"description":"The event's iCalendar file of every session.","type":"object","properties":{"path":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["path","url"]},"session_count":{"description":"Every session, ended ones included.","type":"number"},"upcoming_count":{"description":"How many sessions have not ended yet, past the five listed too.","type":"number"},"first_starts_at":{"description":"When the first session starts, or null with none.","anyOf":[{"type":"string"},{"type":"null"}]},"last_session":{"description":"The session ending last, which dates a past event, or null with none.","anyOf":[{"type":"object","properties":{"starts_at":{"type":"string"},"ends_at":{"type":"string"},"time_zone":{"description":"An IANA time zone, e.g. `Europe/Rome`.","type":"string"}},"required":["starts_at","ends_at","time_zone"]},{"type":"null"}]}},"required":["format","reveal_location","capacity","spots_left","sold_out","location","map","location_hidden","sessions","ics","session_count","upcoming_count","first_starts_at","last_session"]},{"type":"null"}]},"settings":{"type":"object","properties":{"progress_tracking":{"type":"string","x-extensible-enum":["manual","disabled","on_open","on_complete"]},"refund_policy":{"anyOf":[{"type":"string","x-extensible-enum":["none","24h","72h","7d","14d","30d"]},{"type":"null"}]},"reviews_enabled":{"type":"boolean"},"purchase_note":{"anyOf":[{"type":"string"},{"type":"null"}]},"approval":{"description":"Whether each buyer waits for the seller's approval; an unknown value reads as required, the side that promises nothing.","type":"string","x-extensible-enum":["none","required"]},"calendar":{"anyOf":[{"type":"object","properties":{"can_schedule":{"description":"Whether it books through a Cal.com event, whoever reads it.","type":"boolean"},"calcom":{"description":"The Cal.com event it books; only to a caller it opens to.","type":"object","properties":{"username":{"type":"string"},"event_slug":{"type":"string"}},"required":["username","event_slug"]},"host":{"type":"object","properties":{"title":{"description":"The name of the member, business or store the card names, read now; else the text typed.","type":"string"},"subtitle":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}}}}},"required":["can_schedule"]},{"type":"null"}]},"coffee":{"anyOf":[{"type":"object","properties":{"emoji":{"type":"string"},"descriptor":{"type":"string","minLength":3,"maxLength":15,"pattern":"^\\S(.*\\S)?$"}}},{"type":"null"}]},"fundraising":{"anyOf":[{"type":"object","properties":{"goal":{"type":"integer","minimum":1},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["goal","currency"]},{"type":"null"}]},"storefront":{"type":"object","properties":{"sales_counter":{"type":"boolean"},"background_poster":{"type":"boolean"},"require_dark":{"type":"boolean"}},"required":["sales_counter","background_poster","require_dark"]}},"required":["progress_tracking","refund_policy","reviews_enabled","purchase_note","approval","calendar","coffee","fundraising","storefront"]},"category":{"anyOf":[{"type":"object","properties":{"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":["id","label","discountable","subscribable","reviewable","repeatable","aside_size"]},{"type":"null"}]},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]},"mcp":{"type":"object","properties":{"requires":{"description":"What its gate asks there: anyone, a rank of its tiers, or nobody for a closed or broken gate.","anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"everyone"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"tier"},"rank":{"type":"number"}},"required":["kind","rank"]},{"type":"object","properties":{"kind":{"type":"string","const":"nobody"}},"required":["kind"]}]},"prompts":{"description":"How many of its prompts someone could run there, whoever reads it.","type":"number"}},"required":["requires","prompts"]},"offers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"tier":{"type":"object","properties":{"id":{"type":"string"},"rank":{"type":"number"},"name":{"type":"string"}},"required":["id","rank","name"]},"currency":{"type":"string"},"exponent":{"description":"Null when central does not know the currency.","anyOf":[{"type":"number"},{"type":"null"}]},"amount":{"description":"The list amount, or the frozen plan amount on a renewal.","type":"number"},"discounted":{"description":"After the discount that applies.","type":"number"},"charge":{"description":"What the caller pays now; nothing on an upgrade granted free.","type":"number"},"highlighted":{"type":"boolean"},"title":{"description":"Shown in place of the tier's name when set.","anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"type":"object","properties":{"refund_policy":{"anyOf":[{"type":"string","x-extensible-enum":["none","24h","72h","7d","14d","30d"]},{"type":"null"}]},"autorenew":{"type":"boolean"},"renewal_discount":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["refund_policy","autorenew","renewal_discount"]},"discount":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"starts_at":{"description":"When the discount started applying; null when it has no start.","anyOf":[{"type":"string"},{"type":"null"}]},"ends_at":{"description":"When it stops applying; null when it has no end.","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","code","starts_at","ends_at"]},{"type":"null"}]},"first_charge_at":{"description":"When a plan the caller's grant still covers first charges, charging nothing now; null for any other offer.","anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"type":"string","const":"one_time"},"period":{"type":"null"},"mode":{"type":"string","x-extensible-enum":["purchase","renewal"]},"upgrade":{"type":"null"}},"required":["id","tier","currency","exponent","amount","discounted","charge","highlighted","title","description","settings","discount","first_charge_at","kind","period","mode","upgrade"]},{"type":"object","properties":{"id":{"type":"string"},"tier":{"type":"object","properties":{"id":{"type":"string"},"rank":{"type":"number"},"name":{"type":"string"}},"required":["id","rank","name"]},"currency":{"type":"string"},"exponent":{"description":"Null when central does not know the currency.","anyOf":[{"type":"number"},{"type":"null"}]},"amount":{"description":"The list amount, or the frozen plan amount on a renewal.","type":"number"},"discounted":{"description":"After the discount that applies.","type":"number"},"charge":{"description":"What the caller pays now; nothing on an upgrade granted free.","type":"number"},"highlighted":{"type":"boolean"},"title":{"description":"Shown in place of the tier's name when set.","anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"type":"object","properties":{"refund_policy":{"anyOf":[{"type":"string","x-extensible-enum":["none","24h","72h","7d","14d","30d"]},{"type":"null"}]},"autorenew":{"type":"boolean"},"renewal_discount":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["refund_policy","autorenew","renewal_discount"]},"discount":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"starts_at":{"description":"When the discount started applying; null when it has no start.","anyOf":[{"type":"string"},{"type":"null"}]},"ends_at":{"description":"When it stops applying; null when it has no end.","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","code","starts_at","ends_at"]},{"type":"null"}]},"first_charge_at":{"description":"When a plan the caller's grant still covers first charges, charging nothing now; null for any other offer.","anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"type":"string","const":"one_time"},"period":{"type":"null"},"mode":{"type":"string","const":"upgrade"},"upgrade":{"type":"object","properties":{"from_rank":{"type":"number"},"credit":{"type":"number"},"effective_credit":{"type":"number"},"free":{"type":"boolean"}},"required":["from_rank","credit","effective_credit","free"]}},"required":["id","tier","currency","exponent","amount","discounted","charge","highlighted","title","description","settings","discount","first_charge_at","kind","period","mode","upgrade"]},{"type":"object","properties":{"id":{"type":"string"},"tier":{"type":"object","properties":{"id":{"type":"string"},"rank":{"type":"number"},"name":{"type":"string"}},"required":["id","rank","name"]},"currency":{"type":"string"},"exponent":{"description":"Null when central does not know the currency.","anyOf":[{"type":"number"},{"type":"null"}]},"amount":{"description":"The list amount, or the frozen plan amount on a renewal.","type":"number"},"discounted":{"description":"After the discount that applies.","type":"number"},"charge":{"description":"What the caller pays now; nothing on an upgrade granted free.","type":"number"},"highlighted":{"type":"boolean"},"title":{"description":"Shown in place of the tier's name when set.","anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"type":"object","properties":{"refund_policy":{"anyOf":[{"type":"string","x-extensible-enum":["none","24h","72h","7d","14d","30d"]},{"type":"null"}]},"autorenew":{"type":"boolean"},"renewal_discount":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["refund_policy","autorenew","renewal_discount"]},"discount":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"starts_at":{"description":"When the discount started applying; null when it has no start.","anyOf":[{"type":"string"},{"type":"null"}]},"ends_at":{"description":"When it stops applying; null when it has no end.","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","code","starts_at","ends_at"]},{"type":"null"}]},"first_charge_at":{"description":"When a plan the caller's grant still covers first charges, charging nothing now; null for any other offer.","anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"type":"string","const":"recurring"},"period":{"type":"object","properties":{"unit":{"type":"string","x-extensible-enum":["day","week","month","year"]},"multiplier":{"type":"number"}},"required":["unit","multiplier"]},"mode":{"type":"string","x-extensible-enum":["purchase","renewal"]},"upgrade":{"type":"null"}},"required":["id","tier","currency","exponent","amount","discounted","charge","highlighted","title","description","settings","discount","first_charge_at","kind","period","mode","upgrade"]},{"type":"object","properties":{"id":{"type":"string"},"tier":{"type":"object","properties":{"id":{"type":"string"},"rank":{"type":"number"},"name":{"type":"string"}},"required":["id","rank","name"]},"currency":{"type":"string"},"exponent":{"description":"Null when central does not know the currency.","anyOf":[{"type":"number"},{"type":"null"}]},"amount":{"description":"The list amount, or the frozen plan amount on a renewal.","type":"number"},"discounted":{"description":"After the discount that applies.","type":"number"},"charge":{"description":"What the caller pays now; nothing on an upgrade granted free.","type":"number"},"highlighted":{"type":"boolean"},"title":{"description":"Shown in place of the tier's name when set.","anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"type":"object","properties":{"refund_policy":{"anyOf":[{"type":"string","x-extensible-enum":["none","24h","72h","7d","14d","30d"]},{"type":"null"}]},"autorenew":{"type":"boolean"},"renewal_discount":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["refund_policy","autorenew","renewal_discount"]},"discount":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"starts_at":{"description":"When the discount started applying; null when it has no start.","anyOf":[{"type":"string"},{"type":"null"}]},"ends_at":{"description":"When it stops applying; null when it has no end.","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","code","starts_at","ends_at"]},{"type":"null"}]},"first_charge_at":{"description":"When a plan the caller's grant still covers first charges, charging nothing now; null for any other offer.","anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"type":"string","const":"recurring"},"period":{"type":"object","properties":{"unit":{"type":"string","x-extensible-enum":["day","week","month","year"]},"multiplier":{"type":"number"}},"required":["unit","multiplier"]},"mode":{"type":"string","const":"upgrade"},"upgrade":{"type":"object","properties":{"from_rank":{"type":"number"},"credit":{"type":"number"},"effective_credit":{"type":"number"},"free":{"type":"boolean"}},"required":["from_rank","credit","effective_credit","free"]}},"required":["id","tier","currency","exponent","amount","discounted","charge","highlighted","title","description","settings","discount","first_charge_at","kind","period","mode","upgrade"]}]}},"owned":{"anyOf":[{"type":"object","properties":{"tier_rank":{"type":"number"},"source":{"type":"string","x-extensible-enum":["subscription","grant"]},"tier_expires_at":{"description":"When the held rank ends.","anyOf":[{"type":"string"},{"type":"null"}]},"expires_at":{"description":"When every grant has ended.","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["tier_rank","source","tier_expires_at","expires_at"]},{"type":"null"}]},"request":{"description":"The caller's latest request for it: waiting for the seller's approval, on the waitlist, or decided; null for none or a visitor.","anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"description":"`pending`, `waitlisted`, `approved` or `declined`.","type":"string","x-extensible-enum":["pending","waitlisted","declined","approved"]},"tier_rank":{"description":"The rank of the tier it asks for; 0 for none.","type":"number"},"payment":{"description":"A paid request's payment: `saved` while its card waits for approval, `held` while its total is held on the card, `charging` once approved, `due` once the buyer is to pay it themselves; null for a free one or once decided.","anyOf":[{"type":"string","x-extensible-enum":["due","held","saved","charging"]},{"type":"null"}]},"checkout":{"description":"The cart the buyer pays a `due` request through; null otherwise.","anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"}},"required":["id","status","tier_rank","payment","checkout","created_at"]},{"type":"null"}]},"poster":{"anyOf":[{"type":"object","properties":{"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the video's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads beside the video or audio file.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]},"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"]},"preview_only":{"type":"boolean"},"from_body":{"description":"Named by its target's body text, rather than the target's own media (a lesson's video or slides).","type":"boolean"},"position":{"type":"number"},"asset":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"ext":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime":{"anyOf":[{"type":"string"},{"type":"null"}]},"bytes":{"description":"The file's size in bytes, null when it has none or is withheld.","anyOf":[{"type":"number"},{"type":"null"}]},"enforcement":{"type":"string","x-extensible-enum":["public","external","signed"]},"locator":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"type":"object","properties":{"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"duration":{"anyOf":[{"type":"number"},{"type":"null"}]},"pages":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["width","height","duration","pages"]},"status":{"type":"string","x-extensible-enum":["pending","ready","failed"]}},"required":["id","name","title","ext","description","mime","bytes","enforcement","locator","metadata","status"]}},"required":["tracks","outputs","access","id","role","delivery","preview_only","from_body","position","asset"]},{"type":"null"}]},"stats":{"type":"object","properties":{"sales":{"anyOf":[{"type":"number"},{"type":"null"}]},"raised":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string"},"exponent":{"anyOf":[{"type":"number"},{"type":"null"}]},"amount":{"type":"number"}},"required":["currency","exponent","amount"]}},{"type":"null"}]}},"required":["sales","raised"]},"release":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"string"},"occurred_at":{"type":"string"}},"required":["id","version","occurred_at"]},{"type":"null"}]},"rating":{"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"]},"summary":{"description":"The generated summary of what reviews say; null while the seller hides it or none is written.","anyOf":[{"type":"string"},{"type":"null"}]},"summary_locale":{"description":"The language the summary is written in, which trails a store's new language until it is written again.","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["count","average","histogram","summary","summary_locale"]},"id":{"type":"string"},"slug":{"type":"string"},"path":{"description":"The storefront path.","type":"string"},"url":{"description":"The absolute URL on the store's verified hostname, or null before it has one.","anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"subtitle":{"description":"The short line shown under the title.","anyOf":[{"type":"string"},{"type":"null"}]},"listing":{"type":"string","x-extensible-enum":["primary","secondary"]},"priority":{"type":"number"},"published_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"discontinued_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"unlisted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"feed_url":{"description":"The public feed's absolute URL, for a blog or a podcast that is published (discontinued too), listed and on a verified hostname; else null.","anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["files","event","settings","category","access","mcp","offers","owned","request","poster","stats","release","rating","id","slug","path","url","title","subtitle","listing","priority","published_at","discontinued_at","unlisted_at","feed_url","created_at","updated_at"]}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","cursor"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}":{"get":{"operationId":"getProduct","summary":"Reads one product with its offers and access, its body too when asked.","tags":["product"],"security":[{"bearer":["read"]},{"publishableKey":[]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"coupon","in":"query","description":"A discount's code, or its id as an affiliate link carries it, priced into the offers.","schema":{"description":"A discount's code, or its id as an affiliate link carries it, priced into the offers.","type":"string","minLength":1,"maxLength":64}},{"name":"preview","in":"query","description":"A token a seller made for the product's page, which opens it unpublished with its staged body, or for one of its entries, which opens it unpublished as it is live.","schema":{"description":"A token a seller made for the product's page, which opens it unpublished with its staged body, or for one of its entries, which opens it unpublished as it is live.","type":"string","minLength":1,"maxLength":128}},{"name":"include","in":"query","explode":true,"description":"What else the read answers: `body` reads the body whole, as `readBody` does, and fails the read where `readBody` would.","schema":{"description":"What else the read answers: `body` reads the body whole, as `readBody` does, and fails the read where `readBody` would.","type":"array","items":{"type":"string","const":"body"},"maxItems":1}}],"responses":{"200":{"description":"Reads one product with its offers and access, its body too when asked.","content":{"application/json":{"schema":{"type":"object","properties":{"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":{"description":"The file's size in bytes, null when it has none or is withheld.","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"]},"url":{"description":"A public file's lasting URL, an image's naming its widths' version as `#v=` once they're made; null for a private one, or one whose bytes haven't landed.","anyOf":[{"type":"string"},{"type":"null"}]},"resized":{"description":"A public image's smaller copies, narrowest first, for a `srcset`; left out until they're made and its width measured, for one kept as uploaded, and for any other file.","type":"array","items":{"type":"object","properties":{"width":{"description":"Its width in pixels, at most the image's own.","type":"integer","minimum":1},"avif":{"description":"A lasting URL to it as AVIF.","type":"string"},"webp":{"description":"A lasting URL to it as WebP.","type":"string"}},"required":["width","avif","webp"]}},"attachment_id":{"description":"The binding a private file opens through; null when the reader can't open it.","anyOf":[{"type":"string"},{"type":"null"}]},"unlocks":{"description":"What unlocks a file its own rules keep from the reader, any one; null for any other file.","anyOf":[{"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string"},"product_name":{"type":"string"},"tier":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"rank":{"type":"number"}},"required":["id","name","rank"]},{"type":"null"}]}},"required":["product_id","product_name","tier"]}},{"type":"null"}]},"video":{"description":"A video's subtitles and published AI outputs, where its read lists any and the reader may play it.","type":"object","properties":{"attachment_id":{"type":"string"},"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the file's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}}},"required":["attachment_id","tracks","outputs"]},"audio":{"description":"An audio file's waveform, subtitles and published AI outputs, where the reader may play it.","type":"object","properties":{"waveform":{"description":"256 levels from 0 to 255, base64, from the file's start to its end; null until drawn, or when it can't be.","anyOf":[{"type":"string"},{"type":"null"}]},"attachment_id":{"description":"The binding its tracks and outputs open through, which a public file carries here alone; null with none.","anyOf":[{"type":"string"},{"type":"null"}]},"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the file's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}}},"required":["waveform","attachment_id","tracks","outputs"]}},"required":["id","kind","mime","name","bytes","width","height","duration","pages","status","url","attachment_id","unlocks"]}},"maps":{"description":"The maps the body's map blocks show, matched to a block by `latitude` and `longitude`; none while the body is kept from the reader.","type":"array","items":{"type":"object","properties":{"latitude":{"type":"number"},"longitude":{"type":"number"},"light":{"description":"For a light page.","type":"object","properties":{"url":{"description":"A lasting URL to the image.","type":"string"},"width":{"description":"Its size in pixels.","type":"number"},"height":{"type":"number"},"resized":{"description":"Its smaller copies, narrowest first; null until made.","anyOf":[{"type":"array","items":{"type":"object","properties":{"width":{"description":"Its width in pixels, at most the image's own.","type":"integer","minimum":1},"avif":{"description":"A lasting URL to it as AVIF.","type":"string"},"webp":{"description":"A lasting URL to it as WebP.","type":"string"}},"required":["width","avif","webp"]}},{"type":"null"}]}},"required":["url","width","height"]},"dark":{"description":"For a dark page.","type":"object","properties":{"url":{"description":"A lasting URL to the image.","type":"string"},"width":{"description":"Its size in pixels.","type":"number"},"height":{"type":"number"},"resized":{"description":"Its smaller copies, narrowest first; null until made.","anyOf":[{"type":"array","items":{"type":"object","properties":{"width":{"description":"Its width in pixels, at most the image's own.","type":"integer","minimum":1},"avif":{"description":"A lasting URL to it as AVIF.","type":"string"},"webp":{"description":"A lasting URL to it as WebP.","type":"string"}},"required":["width","avif","webp"]}},{"type":"null"}]}},"required":["url","width","height"]},"attribution":{"description":"The credit shown over the map, linking `attribution_url`.","type":"string"},"attribution_url":{"type":"string"}},"required":["latitude","longitude","light","dark","attribution","attribution_url"]}},"entries":{"type":"array","items":{"type":"object","properties":{"has_quiz":{"type":"boolean"},"has_certificate":{"description":"A certificate is earned on the entry's quiz.","type":"boolean"},"quiz_score":{"description":"The caller's best finished sitting on the entry's quiz; null signed out or with none.","anyOf":[{"type":"number"},{"type":"null"}]},"media":{"type":"object","properties":{"duration":{"description":"The lesson video's length in seconds.","anyOf":[{"type":"number"},{"type":"null"}]},"slides":{"description":"Pages across the lesson's slides; null without slides.","anyOf":[{"type":"number"},{"type":"null"}]},"files":{"description":"Deliverable files, links apart.","type":"number"},"links":{"type":"number"}},"required":["duration","slides","files","links"]},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]},"requires":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"everyone"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"tier"},"rank":{"type":"number"}},"required":["kind","rank"]},{"type":"object","properties":{"kind":{"type":"string","const":"nobody"}},"required":["kind"]}]},"opens_at":{"description":"When its content opens to everyone it admits; null once open or without a release, and for a broken one, which stays locked.","anyOf":[{"type":"string"},{"type":"null"}]},"poster":{"anyOf":[{"type":"object","properties":{"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the video's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads beside the video or audio file.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]},"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"]},"preview_only":{"type":"boolean"},"from_body":{"description":"Named by its target's body text, rather than the target's own media (a lesson's video or slides).","type":"boolean"},"position":{"type":"number"},"asset":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"ext":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime":{"anyOf":[{"type":"string"},{"type":"null"}]},"bytes":{"description":"The file's size in bytes, null when it has none or is withheld.","anyOf":[{"type":"number"},{"type":"null"}]},"enforcement":{"type":"string","x-extensible-enum":["public","external","signed"]},"locator":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"type":"object","properties":{"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"duration":{"anyOf":[{"type":"number"},{"type":"null"}]},"pages":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["width","height","duration","pages"]},"status":{"type":"string","x-extensible-enum":["pending","ready","failed"]}},"required":["id","name","title","ext","description","mime","bytes","enforcement","locator","metadata","status"]}},"required":["tracks","outputs","access","id","role","delivery","preview_only","from_body","position","asset"]},{"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":{"description":"The file's size in bytes, null when it has none or is withheld.","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"]},"url":{"description":"A public file's lasting URL, an image's naming its widths' version as `#v=` once they're made; null for a private one, or one whose bytes haven't landed.","anyOf":[{"type":"string"},{"type":"null"}]},"resized":{"description":"A public image's smaller copies, narrowest first, for a `srcset`; left out until they're made and its width measured, for one kept as uploaded, and for any other file.","type":"array","items":{"type":"object","properties":{"width":{"description":"Its width in pixels, at most the image's own.","type":"integer","minimum":1},"avif":{"description":"A lasting URL to it as AVIF.","type":"string"},"webp":{"description":"A lasting URL to it as WebP.","type":"string"}},"required":["width","avif","webp"]}},"attachment_id":{"description":"The binding a private file opens through; null when the reader can't open it.","anyOf":[{"type":"string"},{"type":"null"}]},"unlocks":{"description":"What unlocks a file its own rules keep from the reader, any one; null for any other file.","anyOf":[{"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string"},"product_name":{"type":"string"},"tier":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"rank":{"type":"number"}},"required":["id","name","rank"]},{"type":"null"}]}},"required":["product_id","product_name","tier"]}},{"type":"null"}]},"video":{"description":"A video's subtitles and published AI outputs, where its read lists any and the reader may play it.","type":"object","properties":{"attachment_id":{"type":"string"},"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the file's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}}},"required":["attachment_id","tracks","outputs"]},"audio":{"description":"An audio file's waveform, subtitles and published AI outputs, where the reader may play it.","type":"object","properties":{"waveform":{"description":"256 levels from 0 to 255, base64, from the file's start to its end; null until drawn, or when it can't be.","anyOf":[{"type":"string"},{"type":"null"}]},"attachment_id":{"description":"The binding its tracks and outputs open through, which a public file carries here alone; null with none.","anyOf":[{"type":"string"},{"type":"null"}]},"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the file's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}}},"required":["waveform","attachment_id","tracks","outputs"]}},"required":["id","kind","mime","name","bytes","width","height","duration","pages","status","url","attachment_id","unlocks"]}},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"product_id":{"type":"string"},"slug":{"type":"string"},"path":{"description":"The storefront path.","type":"string"},"url":{"description":"The absolute URL on the store's verified hostname, or null before it has one.","anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"subtitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"section":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"description":"Who signs it, or null when unsigned; a member with no name, or one central no longer holds, answers a null name.","anyOf":[{"type":"object","properties":{"kind":{"type":"string","x-extensible-enum":["member","business","store"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","name","image"]},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"preview":{"description":"The teaser, in the rich text format as stored.","anyOf":[{"type":"string"},{"type":"null"}],"x-rich-text":"text"},"position":{"type":"number"},"published_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"unlisted_at":{"description":"Set while it is out of the product's lists and indexes, though still reachable.","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":{"type":"boolean"}},"required":["ai_generated"]}},"required":["has_quiz","has_certificate","quiz_score","media","access","requires","opens_at","poster","files","completed_at","id","product_id","slug","path","url","title","subtitle","section","author","tags","preview","position","published_at","unlisted_at","created_at","updated_at","settings"]}},"body":{"anyOf":[{"type":"object","properties":{"default":{"description":"The template the default comes from: the home's, a page's, a lesson's or article's, or a product's by category.","type":"object","properties":{"template":{"type":"string","x-extensible-enum":["product","blog","podcast","page","portfolio","lesson","article","home","series"]}},"required":["template"]},"attachment":{"description":"The body its page can't show and shows the default for; null without one.","anyOf":[{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"null"}]},"mime":{"description":"A blocks layout's type.","type":"string"},"access":{"description":"Locked only where the target's own gate keeps it, as a default has no gate of its own.","type":"string","x-extensible-enum":["locked","unlocked","bypassed"]},"requires":{"description":"What the target's gate asks of its reader; a tier names the product it ranks.","anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"everyone"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"nobody"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"tier"},"rank":{"type":"number"},"product_id":{"type":"string"}},"required":["kind","rank","product_id"]}]},"content":{"description":"The default layout, null when locked: a blocks layout's texts in the rich text format.","anyOf":[{"type":"string"},{"type":"null"}],"x-rich-text":"body"},"words":{"description":"A default counts no words.","type":"null"}},"required":["default","attachment","mime","access","requires","content","words"]},{"type":"object","properties":{"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the video's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads beside the video or audio file.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]},"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"]},"preview_only":{"type":"boolean"},"from_body":{"description":"Named by its target's body text, rather than the target's own media (a lesson's video or slides).","type":"boolean"},"position":{"type":"number"},"asset":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"ext":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime":{"anyOf":[{"type":"string"},{"type":"null"}]},"bytes":{"description":"The file's size in bytes, null when it has none or is withheld.","anyOf":[{"type":"number"},{"type":"null"}]},"enforcement":{"type":"string","x-extensible-enum":["public","external","signed"]},"locator":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"type":"object","properties":{"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"duration":{"anyOf":[{"type":"number"},{"type":"null"}]},"pages":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["width","height","duration","pages"]},"status":{"type":"string","x-extensible-enum":["pending","ready","failed"]}},"required":["id","name","title","ext","description","mime","bytes","enforcement","locator","metadata","status"]},"requires":{"description":"What the body's gate asks of its reader, which may be more than its target asks; a tier names the product it ranks.","anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"everyone"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"nobody"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"tier"},"rank":{"type":"number"},"product_id":{"type":"string"}},"required":["kind","rank","product_id"]}]},"content":{"description":"The body's text, null when locked: a blocks layout's texts in the rich text format as stored (a product's with the side column its page shows), or a lesson's or article's text.","anyOf":[{"type":"string"},{"type":"null"}],"x-rich-text":"body"},"words":{"description":"How many words it shows, hidden blocks aside; told even when the text is locked, null when its layout doesn't parse.","anyOf":[{"type":"number"},{"type":"null"}]},"default":{"description":"Null for the target's own body, which its page shows.","type":"null"}},"required":["tracks","outputs","access","id","role","delivery","preview_only","from_body","position","asset"]},{"type":"null"}]},"attachments":{"type":"array","items":{"type":"object","properties":{"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the video's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads beside the video or audio file.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]},"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"]},"preview_only":{"type":"boolean"},"from_body":{"description":"Named by its target's body text, rather than the target's own media (a lesson's video or slides).","type":"boolean"},"position":{"type":"number"},"asset":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"ext":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime":{"anyOf":[{"type":"string"},{"type":"null"}]},"bytes":{"description":"The file's size in bytes, null when it has none or is withheld.","anyOf":[{"type":"number"},{"type":"null"}]},"enforcement":{"type":"string","x-extensible-enum":["public","external","signed"]},"locator":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"type":"object","properties":{"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"duration":{"anyOf":[{"type":"number"},{"type":"null"}]},"pages":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["width","height","duration","pages"]},"status":{"type":"string","x-extensible-enum":["pending","ready","failed"]}},"required":["id","name","title","ext","description","mime","bytes","enforcement","locator","metadata","status"]}},"required":["tracks","outputs","access","id","role","delivery","preview_only","from_body","position","asset"]}},"tiers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"rank":{"type":"number"},"name":{"type":"string"}},"required":["id","product_id","rank","name"]}},"can_review":{"description":"Whether the caller may write their review of it now: their scopes allow it, and a grant of theirs started and ended by nothing but a lapse, on a published product that takes reviews.","type":"boolean"},"calendar_events":{"description":"The events a booking product's page offers to pick from, unlisted and discontinued ones too; empty for any other product.","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"path":{"description":"The event's storefront path.","type":"string"},"url":{"description":"The absolute URL on the store's verified hostname, or null before it has one.","anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"subtitle":{"description":"The short line shown under the title, plain text, or null for none.","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","slug","path","url","title","subtitle"]}},"event":{"description":"An event product's format, place, schedule and how it takes guests; null for any other product.","anyOf":[{"type":"object","properties":{"format":{"description":"In person, online or both.","type":"string","x-extensible-enum":["in_person","online","hybrid"]},"reveal_location":{"description":"Who sees the location: everyone, or ticket holders alone.","type":"string","x-extensible-enum":["everyone","holders"]},"waitlist":{"description":"Whether guests may join a waitlist once it is full.","type":"boolean"},"capacity":{"description":"How many guests it takes in all, or null for no limit or one no write could store.","anyOf":[{"type":"number"},{"type":"null"}]},"spots_left":{"description":"Places it still takes, held carts and sales counted, or null for no limit; a refund that ends a ticket frees its seat, any other keeps it. Seats count places only: an event whose last session ended is not for sale whatever they say.","anyOf":[{"type":"number"},{"type":"null"}]},"sold_out":{"description":"Whether no place is left, the event or every ticket type full. Seats count places only: an event whose last session ended is not for sale whatever they say.","type":"boolean"},"tickets":{"description":"Each ticket type's own limit and what it still takes within the event's.","type":"array","items":{"type":"object","properties":{"tier_id":{"type":"string"},"capacity":{"description":"How many guests the ticket type takes, or null for no limit of its own.","anyOf":[{"type":"number"},{"type":"null"}]},"spots_left":{"description":"Guests it still takes, or null for no limit.","anyOf":[{"type":"number"},{"type":"null"}]},"sold_out":{"type":"boolean"}},"required":["tier_id","capacity","spots_left","sold_out"]}},"location":{"description":"Where it takes place, its city, region and country alone while hidden from the caller, or null for none set.","anyOf":[{"type":"object","properties":{"venue":{"anyOf":[{"type":"string"},{"type":"null"}]},"address":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"region":{"anyOf":[{"type":"string"},{"type":"null"}]},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"description":"ISO 3166-1 alpha-2.","anyOf":[{"type":"string"},{"type":"null"}]},"latitude":{"description":"Decimal degrees, set together with `longitude`.","anyOf":[{"type":"number"},{"type":"null"}]},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"map_url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["venue","address","city","region","postal_code","country","latitude","longitude","map_url"]},{"type":"null"}]},"map":{"description":"The venue's map, one image per theme with the credit it shows; null for none drawn yet or the location hidden.","anyOf":[{"type":"object","properties":{"light":{"description":"For a light page.","type":"object","properties":{"url":{"type":"string"},"width":{"type":"number"},"height":{"type":"number"},"resized":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"width":{"type":"number"},"avif":{"type":"string"},"webp":{"type":"string"}},"required":["width","avif","webp"]}},{"type":"null"}]}},"required":["url","width","height","resized"]},"dark":{"description":"For a dark page.","type":"object","properties":{"url":{"type":"string"},"width":{"type":"number"},"height":{"type":"number"},"resized":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"width":{"type":"number"},"avif":{"type":"string"},"webp":{"type":"string"}},"required":["width","avif","webp"]}},{"type":"null"}]}},"required":["url","width","height","resized"]},"attribution":{"description":"The credit shown over the map, linking `attribution_url`.","type":"string"},"attribution_url":{"type":"string"}},"required":["light","dark","attribution","attribution_url"]},{"type":"null"}]},"location_hidden":{"description":"Whether a location or a venue is held back until the caller holds a ticket.","type":"boolean"},"ics":{"description":"The event's iCalendar file of every session, as anyone the page reaches may add it.","type":"object","properties":{"path":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["path","url"]},"sessions":{"type":"array","items":{"type":"object","properties":{"venue":{"anyOf":[{"type":"string"},{"type":"null"}]},"add_to_calendar":{"description":"Links that add the session to Google Calendar or Outlook, with the location only where the caller sees it.","type":"object","properties":{"google":{"type":"string"},"outlook":{"description":"Outlook.com, for a personal Microsoft account.","type":"string"},"office":{"description":"Outlook on the web for a work or school account.","type":"string"}},"required":["google","outlook","office"]},"id":{"type":"string"},"product_id":{"type":"string"},"starts_at":{"type":"string"},"ends_at":{"type":"string"},"time_zone":{"description":"An IANA time zone, e.g. `Europe/Rome`.","type":"string"},"online_label":{"description":"How it is joined online, e.g. `Zoom`, or null for none.","anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["venue","add_to_calendar","id","product_id","starts_at","ends_at","time_zone","online_label","created_at","updated_at"]}}},"required":["format","reveal_location","waitlist","capacity","spots_left","sold_out","tickets","location","map","location_hidden","ics","sessions"]},{"type":"null"}]},"questions":{"description":"What checkout asks each buyer before payment, in order; empty for a product that asks nothing.","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"position":{"description":"Where it shows among the product's questions, from zero.","type":"number"},"kind":{"description":"`text`, `long_text`, `select`, `multi_select` or `checkbox`.","type":"string","x-extensible-enum":["text","select","long_text","multi_select","checkbox"]},"preset":{"description":"The standard detail it asks for (`name`, `phone`, `company` or `address`), or null for one of the seller's own.","anyOf":[{"type":"string","x-extensible-enum":["name","phone","address","company"]},{"type":"null"}]},"label":{"type":"string"},"required":{"description":"Whether checkout asks for an answer before payment; a required checkbox must be ticked.","type":"boolean"},"options":{"description":"A select's options, in order; null for any other kind.","anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"pattern":{"description":"The pattern a text answer must match whole, or null for none.","anyOf":[{"type":"string"},{"type":"null"}]},"example":{"description":"An answer that fits the pattern, which checkout shows as the format to follow; null for none.","anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","product_id","position","kind","preset","label","required","options","pattern","example","created_at","updated_at"]}},"description":{"description":"The page's long description, in the rich text format as stored.","anyOf":[{"type":"string"},{"type":"null"}],"x-rich-text":"text"},"what_you_get":{"description":"What a buyer gets, in the rich text format as stored.","anyOf":[{"type":"string"},{"type":"null"}],"x-rich-text":"text"},"settings":{"type":"object","properties":{"progress_tracking":{"type":"string","x-extensible-enum":["manual","disabled","on_open","on_complete"]},"refund_policy":{"anyOf":[{"type":"string","x-extensible-enum":["none","24h","72h","7d","14d","30d"]},{"type":"null"}]},"reviews_enabled":{"type":"boolean"},"purchase_note":{"anyOf":[{"type":"string"},{"type":"null"}]},"approval":{"description":"Whether each buyer waits for the seller's approval; an unknown value reads as required, the side that promises nothing.","type":"string","x-extensible-enum":["none","required"]},"calendar":{"anyOf":[{"type":"object","properties":{"can_schedule":{"description":"Whether it books through a Cal.com event, whoever reads it.","type":"boolean"},"calcom":{"description":"The Cal.com event it books; only to a caller it opens to.","type":"object","properties":{"username":{"type":"string"},"event_slug":{"type":"string"}},"required":["username","event_slug"]},"host":{"type":"object","properties":{"title":{"description":"The name of the member, business or store the card names, read now; else the text typed.","type":"string"},"subtitle":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}}}}},"required":["can_schedule"]},{"type":"null"}]},"coffee":{"anyOf":[{"type":"object","properties":{"emoji":{"type":"string"},"descriptor":{"type":"string","minLength":3,"maxLength":15,"pattern":"^\\S(.*\\S)?$"}}},{"type":"null"}]},"fundraising":{"anyOf":[{"type":"object","properties":{"goal":{"type":"integer","minimum":1},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["goal","currency"]},{"type":"null"}]},"storefront":{"type":"object","properties":{"sales_counter":{"type":"boolean"},"background_poster":{"type":"boolean"},"require_dark":{"type":"boolean"}},"required":["sales_counter","background_poster","require_dark"]}},"required":["progress_tracking","refund_policy","reviews_enabled","purchase_note","approval","calendar","coffee","fundraising","storefront"]},"coupon":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"code":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","code"]},{"type":"null"}]},"category":{"anyOf":[{"type":"object","properties":{"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":["id","label","discountable","subscribable","reviewable","repeatable","aside_size"]},{"type":"null"}]},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]},"mcp":{"type":"object","properties":{"requires":{"description":"What its gate asks there: anyone, a rank of its tiers, or nobody for a closed or broken gate.","anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"everyone"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"tier"},"rank":{"type":"number"}},"required":["kind","rank"]},{"type":"object","properties":{"kind":{"type":"string","const":"nobody"}},"required":["kind"]}]},"prompts":{"description":"How many of its prompts someone could run there, whoever reads it.","type":"number"}},"required":["requires","prompts"]},"offers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"tier":{"type":"object","properties":{"id":{"type":"string"},"rank":{"type":"number"},"name":{"type":"string"}},"required":["id","rank","name"]},"currency":{"type":"string"},"exponent":{"description":"Null when central does not know the currency.","anyOf":[{"type":"number"},{"type":"null"}]},"amount":{"description":"The list amount, or the frozen plan amount on a renewal.","type":"number"},"discounted":{"description":"After the discount that applies.","type":"number"},"charge":{"description":"What the caller pays now; nothing on an upgrade granted free.","type":"number"},"highlighted":{"type":"boolean"},"title":{"description":"Shown in place of the tier's name when set.","anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"type":"object","properties":{"refund_policy":{"anyOf":[{"type":"string","x-extensible-enum":["none","24h","72h","7d","14d","30d"]},{"type":"null"}]},"autorenew":{"type":"boolean"},"renewal_discount":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["refund_policy","autorenew","renewal_discount"]},"discount":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"starts_at":{"description":"When the discount started applying; null when it has no start.","anyOf":[{"type":"string"},{"type":"null"}]},"ends_at":{"description":"When it stops applying; null when it has no end.","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","code","starts_at","ends_at"]},{"type":"null"}]},"first_charge_at":{"description":"When a plan the caller's grant still covers first charges, charging nothing now; null for any other offer.","anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"type":"string","const":"one_time"},"period":{"type":"null"},"mode":{"type":"string","x-extensible-enum":["purchase","renewal"]},"upgrade":{"type":"null"}},"required":["id","tier","currency","exponent","amount","discounted","charge","highlighted","title","description","settings","discount","first_charge_at","kind","period","mode","upgrade"]},{"type":"object","properties":{"id":{"type":"string"},"tier":{"type":"object","properties":{"id":{"type":"string"},"rank":{"type":"number"},"name":{"type":"string"}},"required":["id","rank","name"]},"currency":{"type":"string"},"exponent":{"description":"Null when central does not know the currency.","anyOf":[{"type":"number"},{"type":"null"}]},"amount":{"description":"The list amount, or the frozen plan amount on a renewal.","type":"number"},"discounted":{"description":"After the discount that applies.","type":"number"},"charge":{"description":"What the caller pays now; nothing on an upgrade granted free.","type":"number"},"highlighted":{"type":"boolean"},"title":{"description":"Shown in place of the tier's name when set.","anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"type":"object","properties":{"refund_policy":{"anyOf":[{"type":"string","x-extensible-enum":["none","24h","72h","7d","14d","30d"]},{"type":"null"}]},"autorenew":{"type":"boolean"},"renewal_discount":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["refund_policy","autorenew","renewal_discount"]},"discount":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"starts_at":{"description":"When the discount started applying; null when it has no start.","anyOf":[{"type":"string"},{"type":"null"}]},"ends_at":{"description":"When it stops applying; null when it has no end.","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","code","starts_at","ends_at"]},{"type":"null"}]},"first_charge_at":{"description":"When a plan the caller's grant still covers first charges, charging nothing now; null for any other offer.","anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"type":"string","const":"one_time"},"period":{"type":"null"},"mode":{"type":"string","const":"upgrade"},"upgrade":{"type":"object","properties":{"from_rank":{"type":"number"},"credit":{"type":"number"},"effective_credit":{"type":"number"},"free":{"type":"boolean"}},"required":["from_rank","credit","effective_credit","free"]}},"required":["id","tier","currency","exponent","amount","discounted","charge","highlighted","title","description","settings","discount","first_charge_at","kind","period","mode","upgrade"]},{"type":"object","properties":{"id":{"type":"string"},"tier":{"type":"object","properties":{"id":{"type":"string"},"rank":{"type":"number"},"name":{"type":"string"}},"required":["id","rank","name"]},"currency":{"type":"string"},"exponent":{"description":"Null when central does not know the currency.","anyOf":[{"type":"number"},{"type":"null"}]},"amount":{"description":"The list amount, or the frozen plan amount on a renewal.","type":"number"},"discounted":{"description":"After the discount that applies.","type":"number"},"charge":{"description":"What the caller pays now; nothing on an upgrade granted free.","type":"number"},"highlighted":{"type":"boolean"},"title":{"description":"Shown in place of the tier's name when set.","anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"type":"object","properties":{"refund_policy":{"anyOf":[{"type":"string","x-extensible-enum":["none","24h","72h","7d","14d","30d"]},{"type":"null"}]},"autorenew":{"type":"boolean"},"renewal_discount":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["refund_policy","autorenew","renewal_discount"]},"discount":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"starts_at":{"description":"When the discount started applying; null when it has no start.","anyOf":[{"type":"string"},{"type":"null"}]},"ends_at":{"description":"When it stops applying; null when it has no end.","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","code","starts_at","ends_at"]},{"type":"null"}]},"first_charge_at":{"description":"When a plan the caller's grant still covers first charges, charging nothing now; null for any other offer.","anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"type":"string","const":"recurring"},"period":{"type":"object","properties":{"unit":{"type":"string","x-extensible-enum":["day","week","month","year"]},"multiplier":{"type":"number"}},"required":["unit","multiplier"]},"mode":{"type":"string","x-extensible-enum":["purchase","renewal"]},"upgrade":{"type":"null"}},"required":["id","tier","currency","exponent","amount","discounted","charge","highlighted","title","description","settings","discount","first_charge_at","kind","period","mode","upgrade"]},{"type":"object","properties":{"id":{"type":"string"},"tier":{"type":"object","properties":{"id":{"type":"string"},"rank":{"type":"number"},"name":{"type":"string"}},"required":["id","rank","name"]},"currency":{"type":"string"},"exponent":{"description":"Null when central does not know the currency.","anyOf":[{"type":"number"},{"type":"null"}]},"amount":{"description":"The list amount, or the frozen plan amount on a renewal.","type":"number"},"discounted":{"description":"After the discount that applies.","type":"number"},"charge":{"description":"What the caller pays now; nothing on an upgrade granted free.","type":"number"},"highlighted":{"type":"boolean"},"title":{"description":"Shown in place of the tier's name when set.","anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"type":"object","properties":{"refund_policy":{"anyOf":[{"type":"string","x-extensible-enum":["none","24h","72h","7d","14d","30d"]},{"type":"null"}]},"autorenew":{"type":"boolean"},"renewal_discount":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["refund_policy","autorenew","renewal_discount"]},"discount":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"starts_at":{"description":"When the discount started applying; null when it has no start.","anyOf":[{"type":"string"},{"type":"null"}]},"ends_at":{"description":"When it stops applying; null when it has no end.","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","code","starts_at","ends_at"]},{"type":"null"}]},"first_charge_at":{"description":"When a plan the caller's grant still covers first charges, charging nothing now; null for any other offer.","anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"type":"string","const":"recurring"},"period":{"type":"object","properties":{"unit":{"type":"string","x-extensible-enum":["day","week","month","year"]},"multiplier":{"type":"number"}},"required":["unit","multiplier"]},"mode":{"type":"string","const":"upgrade"},"upgrade":{"type":"object","properties":{"from_rank":{"type":"number"},"credit":{"type":"number"},"effective_credit":{"type":"number"},"free":{"type":"boolean"}},"required":["from_rank","credit","effective_credit","free"]}},"required":["id","tier","currency","exponent","amount","discounted","charge","highlighted","title","description","settings","discount","first_charge_at","kind","period","mode","upgrade"]}]}},"owned":{"anyOf":[{"type":"object","properties":{"tier_rank":{"type":"number"},"source":{"type":"string","x-extensible-enum":["subscription","grant"]},"tier_expires_at":{"description":"When the held rank ends.","anyOf":[{"type":"string"},{"type":"null"}]},"expires_at":{"description":"When every grant has ended.","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["tier_rank","source","tier_expires_at","expires_at"]},{"type":"null"}]},"request":{"description":"The caller's latest request for it: waiting for the seller's approval, on the waitlist, or decided; null for none or a visitor.","anyOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"description":"`pending`, `waitlisted`, `approved` or `declined`.","type":"string","x-extensible-enum":["pending","waitlisted","declined","approved"]},"tier_rank":{"description":"The rank of the tier it asks for; 0 for none.","type":"number"},"payment":{"description":"A paid request's payment: `saved` while its card waits for approval, `held` while its total is held on the card, `charging` once approved, `due` once the buyer is to pay it themselves; null for a free one or once decided.","anyOf":[{"type":"string","x-extensible-enum":["due","held","saved","charging"]},{"type":"null"}]},"checkout":{"description":"The cart the buyer pays a `due` request through; null otherwise.","anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"}},"required":["id","status","tier_rank","payment","checkout","created_at"]},{"type":"null"}]},"poster":{"anyOf":[{"type":"object","properties":{"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the video's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads beside the video or audio file.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]},"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"]},"preview_only":{"type":"boolean"},"from_body":{"description":"Named by its target's body text, rather than the target's own media (a lesson's video or slides).","type":"boolean"},"position":{"type":"number"},"asset":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"ext":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime":{"anyOf":[{"type":"string"},{"type":"null"}]},"bytes":{"description":"The file's size in bytes, null when it has none or is withheld.","anyOf":[{"type":"number"},{"type":"null"}]},"enforcement":{"type":"string","x-extensible-enum":["public","external","signed"]},"locator":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"type":"object","properties":{"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"duration":{"anyOf":[{"type":"number"},{"type":"null"}]},"pages":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["width","height","duration","pages"]},"status":{"type":"string","x-extensible-enum":["pending","ready","failed"]}},"required":["id","name","title","ext","description","mime","bytes","enforcement","locator","metadata","status"]}},"required":["tracks","outputs","access","id","role","delivery","preview_only","from_body","position","asset"]},{"type":"null"}]},"stats":{"type":"object","properties":{"sales":{"anyOf":[{"type":"number"},{"type":"null"}]},"raised":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string"},"exponent":{"anyOf":[{"type":"number"},{"type":"null"}]},"amount":{"type":"number"}},"required":["currency","exponent","amount"]}},{"type":"null"}]}},"required":["sales","raised"]},"release":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"string"},"occurred_at":{"type":"string"}},"required":["id","version","occurred_at"]},{"type":"null"}]},"rating":{"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"]},"summary":{"description":"The generated summary of what reviews say; null while the seller hides it or none is written.","anyOf":[{"type":"string"},{"type":"null"}]},"summary_locale":{"description":"The language the summary is written in, which trails a store's new language until it is written again.","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["count","average","histogram","summary","summary_locale"]},"id":{"type":"string"},"slug":{"type":"string"},"path":{"description":"The storefront path.","type":"string"},"url":{"description":"The absolute URL on the store's verified hostname, or null before it has one.","anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"subtitle":{"description":"The short line shown under the title.","anyOf":[{"type":"string"},{"type":"null"}]},"listing":{"type":"string","x-extensible-enum":["primary","secondary"]},"priority":{"type":"number"},"published_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"discontinued_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"unlisted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"feed_url":{"description":"The public feed's absolute URL, for a blog or a podcast that is published (discontinued too), listed and on a verified hostname; else null.","anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["files","maps","entries","body","attachments","tiers","can_review","calendar_events","event","questions","description","what_you_get","settings","coupon","category","access","mcp","offers","owned","request","poster","stats","release","rating","id","slug","path","url","title","subtitle","listing","priority","published_at","discontinued_at","unlisted_at","feed_url","created_at","updated_at"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/entries":{"get":{"operationId":"listEntries","summary":"Pages a product's entries with their access, a blog's or a podcast's newest first unless sorted.","tags":["entry"],"security":[{"bearer":["read"]},{"publishableKey":[]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","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","published"]}},{"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","maxLength":8192}},{"name":"count","in":"query","schema":{"type":"boolean"}},{"name":"search","in":"query","schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"preview","in":"query","description":"A token a seller made for the product's page or one of its entries, which lists an unpublished product's published entries.","schema":{"description":"A token a seller made for the product's page or one of its entries, which lists an unpublished product's published entries.","type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"Pages a product's entries with their access, a blog's or a podcast's newest first unless sorted.","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":{"has_quiz":{"type":"boolean"},"has_certificate":{"description":"A certificate is earned on the entry's quiz.","type":"boolean"},"quiz_score":{"description":"The caller's best finished sitting on the entry's quiz; null signed out or with none.","anyOf":[{"type":"number"},{"type":"null"}]},"media":{"type":"object","properties":{"duration":{"description":"The lesson video's length in seconds.","anyOf":[{"type":"number"},{"type":"null"}]},"slides":{"description":"Pages across the lesson's slides; null without slides.","anyOf":[{"type":"number"},{"type":"null"}]},"files":{"description":"Deliverable files, links apart.","type":"number"},"links":{"type":"number"}},"required":["duration","slides","files","links"]},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]},"requires":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"everyone"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"tier"},"rank":{"type":"number"}},"required":["kind","rank"]},{"type":"object","properties":{"kind":{"type":"string","const":"nobody"}},"required":["kind"]}]},"opens_at":{"description":"When its content opens to everyone it admits; null once open or without a release, and for a broken one, which stays locked.","anyOf":[{"type":"string"},{"type":"null"}]},"poster":{"anyOf":[{"type":"object","properties":{"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the video's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads beside the video or audio file.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]},"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"]},"preview_only":{"type":"boolean"},"from_body":{"description":"Named by its target's body text, rather than the target's own media (a lesson's video or slides).","type":"boolean"},"position":{"type":"number"},"asset":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"ext":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime":{"anyOf":[{"type":"string"},{"type":"null"}]},"bytes":{"description":"The file's size in bytes, null when it has none or is withheld.","anyOf":[{"type":"number"},{"type":"null"}]},"enforcement":{"type":"string","x-extensible-enum":["public","external","signed"]},"locator":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"type":"object","properties":{"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"duration":{"anyOf":[{"type":"number"},{"type":"null"}]},"pages":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["width","height","duration","pages"]},"status":{"type":"string","x-extensible-enum":["pending","ready","failed"]}},"required":["id","name","title","ext","description","mime","bytes","enforcement","locator","metadata","status"]}},"required":["tracks","outputs","access","id","role","delivery","preview_only","from_body","position","asset"]},{"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":{"description":"The file's size in bytes, null when it has none or is withheld.","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"]},"url":{"description":"A public file's lasting URL, an image's naming its widths' version as `#v=` once they're made; null for a private one, or one whose bytes haven't landed.","anyOf":[{"type":"string"},{"type":"null"}]},"resized":{"description":"A public image's smaller copies, narrowest first, for a `srcset`; left out until they're made and its width measured, for one kept as uploaded, and for any other file.","type":"array","items":{"type":"object","properties":{"width":{"description":"Its width in pixels, at most the image's own.","type":"integer","minimum":1},"avif":{"description":"A lasting URL to it as AVIF.","type":"string"},"webp":{"description":"A lasting URL to it as WebP.","type":"string"}},"required":["width","avif","webp"]}},"attachment_id":{"description":"The binding a private file opens through; null when the reader can't open it.","anyOf":[{"type":"string"},{"type":"null"}]},"unlocks":{"description":"What unlocks a file its own rules keep from the reader, any one; null for any other file.","anyOf":[{"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string"},"product_name":{"type":"string"},"tier":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"rank":{"type":"number"}},"required":["id","name","rank"]},{"type":"null"}]}},"required":["product_id","product_name","tier"]}},{"type":"null"}]},"video":{"description":"A video's subtitles and published AI outputs, where its read lists any and the reader may play it.","type":"object","properties":{"attachment_id":{"type":"string"},"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the file's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}}},"required":["attachment_id","tracks","outputs"]},"audio":{"description":"An audio file's waveform, subtitles and published AI outputs, where the reader may play it.","type":"object","properties":{"waveform":{"description":"256 levels from 0 to 255, base64, from the file's start to its end; null until drawn, or when it can't be.","anyOf":[{"type":"string"},{"type":"null"}]},"attachment_id":{"description":"The binding its tracks and outputs open through, which a public file carries here alone; null with none.","anyOf":[{"type":"string"},{"type":"null"}]},"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the file's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}}},"required":["waveform","attachment_id","tracks","outputs"]}},"required":["id","kind","mime","name","bytes","width","height","duration","pages","status","url","attachment_id","unlocks"]}},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"duration":{"description":"The measured length in seconds of a podcast episode's own audio, told even when it is locked; null without one.","anyOf":[{"type":"number"},{"type":"null"}]},"words":{"description":"How many words its live body shows, hidden blocks aside; told even when it is locked, null without a counted body.","anyOf":[{"type":"number"},{"type":"null"}]},"id":{"type":"string"},"product_id":{"type":"string"},"slug":{"type":"string"},"path":{"description":"The storefront path.","type":"string"},"url":{"description":"The absolute URL on the store's verified hostname, or null before it has one.","anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"subtitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"section":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"description":"Who signs it, or null when unsigned; a member with no name, or one central no longer holds, answers a null name.","anyOf":[{"type":"object","properties":{"kind":{"type":"string","x-extensible-enum":["member","business","store"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","name","image"]},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"preview":{"description":"The teaser, in the rich text format as stored.","anyOf":[{"type":"string"},{"type":"null"}],"x-rich-text":"text"},"position":{"type":"number"},"published_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"unlisted_at":{"description":"Set while it is out of the product's lists and indexes, though still reachable.","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":{"type":"boolean"}},"required":["ai_generated"]}},"required":["has_quiz","has_certificate","quiz_score","media","access","requires","opens_at","poster","files","completed_at","duration","words","id","product_id","slug","path","url","title","subtitle","section","author","tags","preview","position","published_at","unlisted_at","created_at","updated_at","settings"]}},"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://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/entries/sections":{"get":{"operationId":"listEntrySections","summary":"Pages the distinct sections a product's listed, published entries hold.","tags":["entry"],"security":[{"bearer":["read"]},{"publishableKey":[]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","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":["value"]}},{"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","maxLength":8192}},{"name":"count","in":"query","schema":{"type":"boolean"}},{"name":"search","in":"query","schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"preview","in":"query","description":"A token a seller made for the product's page or one of its entries, which lists an unpublished product's values.","schema":{"description":"A token a seller made for the product's page or one of its entries, which lists an unpublished product's values.","type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"Pages the distinct sections a product's listed, published entries hold.","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":"string"}},"required":["value"]}},"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://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/entries/tags":{"get":{"operationId":"listEntryTags","summary":"Pages the distinct tags a product's listed, published entries hold.","tags":["entry"],"security":[{"bearer":["read"]},{"publishableKey":[]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","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":["value"]}},{"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","maxLength":8192}},{"name":"count","in":"query","schema":{"type":"boolean"}},{"name":"search","in":"query","schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"preview","in":"query","description":"A token a seller made for the product's page or one of its entries, which lists an unpublished product's values.","schema":{"description":"A token a seller made for the product's page or one of its entries, which lists an unpublished product's values.","type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"Pages the distinct tags a product's listed, published entries hold.","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":"string"}},"required":["value"]}},"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://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/entries/{entry}":{"get":{"operationId":"getEntry","summary":"Reads one entry with its access, its body too when asked.","tags":["entry"],"security":[{"bearer":["read"]},{"publishableKey":[]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"entry","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"preview","in":"query","description":"A token a seller made for the entry's product's page, which opens a published entry of the product unpublished, gated as ever, or for the entry itself, which opens it unpublished too as its staged body shows it; with it, any entry it does not open is `not_found` `preview`.","schema":{"description":"A token a seller made for the entry's product's page, which opens a published entry of the product unpublished, gated as ever, or for the entry itself, which opens it unpublished too as its staged body shows it; with it, any entry it does not open is `not_found` `preview`.","type":"string","minLength":1,"maxLength":128}},{"name":"include","in":"query","explode":true,"description":"What else the read answers: `body` reads the body whole, as `readBody` does, and fails the read where `readBody` would.","schema":{"description":"What else the read answers: `body` reads the body whole, as `readBody` does, and fails the read where `readBody` would.","type":"array","items":{"type":"string","const":"body"},"maxItems":1}}],"responses":{"200":{"description":"Reads one entry with its access, its body too when asked.","content":{"application/json":{"schema":{"type":"object","properties":{"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":{"description":"The file's size in bytes, null when it has none or is withheld.","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"]},"url":{"description":"A public file's lasting URL, an image's naming its widths' version as `#v=` once they're made; null for a private one, or one whose bytes haven't landed.","anyOf":[{"type":"string"},{"type":"null"}]},"resized":{"description":"A public image's smaller copies, narrowest first, for a `srcset`; left out until they're made and its width measured, for one kept as uploaded, and for any other file.","type":"array","items":{"type":"object","properties":{"width":{"description":"Its width in pixels, at most the image's own.","type":"integer","minimum":1},"avif":{"description":"A lasting URL to it as AVIF.","type":"string"},"webp":{"description":"A lasting URL to it as WebP.","type":"string"}},"required":["width","avif","webp"]}},"attachment_id":{"description":"The binding a private file opens through; null when the reader can't open it.","anyOf":[{"type":"string"},{"type":"null"}]},"unlocks":{"description":"What unlocks a file its own rules keep from the reader, any one; null for any other file.","anyOf":[{"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string"},"product_name":{"type":"string"},"tier":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"rank":{"type":"number"}},"required":["id","name","rank"]},{"type":"null"}]}},"required":["product_id","product_name","tier"]}},{"type":"null"}]},"video":{"description":"A video's subtitles and published AI outputs, where its read lists any and the reader may play it.","type":"object","properties":{"attachment_id":{"type":"string"},"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the file's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}}},"required":["attachment_id","tracks","outputs"]},"audio":{"description":"An audio file's waveform, subtitles and published AI outputs, where the reader may play it.","type":"object","properties":{"waveform":{"description":"256 levels from 0 to 255, base64, from the file's start to its end; null until drawn, or when it can't be.","anyOf":[{"type":"string"},{"type":"null"}]},"attachment_id":{"description":"The binding its tracks and outputs open through, which a public file carries here alone; null with none.","anyOf":[{"type":"string"},{"type":"null"}]},"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the file's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}}},"required":["waveform","attachment_id","tracks","outputs"]}},"required":["id","kind","mime","name","bytes","width","height","duration","pages","status","url","attachment_id","unlocks"]}},"maps":{"description":"The maps the body's map blocks show, matched to a block by `latitude` and `longitude`; none while the body is kept from the reader.","type":"array","items":{"type":"object","properties":{"latitude":{"type":"number"},"longitude":{"type":"number"},"light":{"description":"For a light page.","type":"object","properties":{"url":{"description":"A lasting URL to the image.","type":"string"},"width":{"description":"Its size in pixels.","type":"number"},"height":{"type":"number"},"resized":{"description":"Its smaller copies, narrowest first; null until made.","anyOf":[{"type":"array","items":{"type":"object","properties":{"width":{"description":"Its width in pixels, at most the image's own.","type":"integer","minimum":1},"avif":{"description":"A lasting URL to it as AVIF.","type":"string"},"webp":{"description":"A lasting URL to it as WebP.","type":"string"}},"required":["width","avif","webp"]}},{"type":"null"}]}},"required":["url","width","height"]},"dark":{"description":"For a dark page.","type":"object","properties":{"url":{"description":"A lasting URL to the image.","type":"string"},"width":{"description":"Its size in pixels.","type":"number"},"height":{"type":"number"},"resized":{"description":"Its smaller copies, narrowest first; null until made.","anyOf":[{"type":"array","items":{"type":"object","properties":{"width":{"description":"Its width in pixels, at most the image's own.","type":"integer","minimum":1},"avif":{"description":"A lasting URL to it as AVIF.","type":"string"},"webp":{"description":"A lasting URL to it as WebP.","type":"string"}},"required":["width","avif","webp"]}},{"type":"null"}]}},"required":["url","width","height"]},"attribution":{"description":"The credit shown over the map, linking `attribution_url`.","type":"string"},"attribution_url":{"type":"string"}},"required":["latitude","longitude","light","dark","attribution","attribution_url"]}},"quiz":{"anyOf":[{"type":"object","properties":{"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"]},"certificate":{"anyOf":[{"type":"object","properties":{"requires_passing":{"type":"boolean"}},"required":["requires_passing"]},{"type":"null"}]},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]}},"required":["id","version","settings","certificate","access"]},{"type":"null"}]},"body":{"anyOf":[{"type":"object","properties":{"default":{"description":"The template the default comes from: the home's, a page's, a lesson's or article's, or a product's by category.","type":"object","properties":{"template":{"type":"string","x-extensible-enum":["product","blog","podcast","page","portfolio","lesson","article","home","series"]}},"required":["template"]},"attachment":{"description":"The body its page can't show and shows the default for; null without one.","anyOf":[{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"null"}]},"mime":{"description":"A blocks layout's type.","type":"string"},"access":{"description":"Locked only where the target's own gate keeps it, as a default has no gate of its own.","type":"string","x-extensible-enum":["locked","unlocked","bypassed"]},"requires":{"description":"What the target's gate asks of its reader; a tier names the product it ranks.","anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"everyone"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"nobody"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"tier"},"rank":{"type":"number"},"product_id":{"type":"string"}},"required":["kind","rank","product_id"]}]},"content":{"description":"The default layout, null when locked: a blocks layout's texts in the rich text format.","anyOf":[{"type":"string"},{"type":"null"}],"x-rich-text":"body"},"words":{"description":"A default counts no words.","type":"null"}},"required":["default","attachment","mime","access","requires","content","words"]},{"type":"object","properties":{"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the video's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads beside the video or audio file.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]},"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"]},"preview_only":{"type":"boolean"},"from_body":{"description":"Named by its target's body text, rather than the target's own media (a lesson's video or slides).","type":"boolean"},"position":{"type":"number"},"asset":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"ext":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime":{"anyOf":[{"type":"string"},{"type":"null"}]},"bytes":{"description":"The file's size in bytes, null when it has none or is withheld.","anyOf":[{"type":"number"},{"type":"null"}]},"enforcement":{"type":"string","x-extensible-enum":["public","external","signed"]},"locator":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"type":"object","properties":{"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"duration":{"anyOf":[{"type":"number"},{"type":"null"}]},"pages":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["width","height","duration","pages"]},"status":{"type":"string","x-extensible-enum":["pending","ready","failed"]}},"required":["id","name","title","ext","description","mime","bytes","enforcement","locator","metadata","status"]},"requires":{"description":"What the body's gate asks of its reader, which may be more than its target asks; a tier names the product it ranks.","anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"everyone"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"nobody"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"tier"},"rank":{"type":"number"},"product_id":{"type":"string"}},"required":["kind","rank","product_id"]}]},"content":{"description":"The body's text, null when locked: a blocks layout's texts in the rich text format as stored (a product's with the side column its page shows), or a lesson's or article's text.","anyOf":[{"type":"string"},{"type":"null"}],"x-rich-text":"body"},"words":{"description":"How many words it shows, hidden blocks aside; told even when the text is locked, null when its layout doesn't parse.","anyOf":[{"type":"number"},{"type":"null"}]},"default":{"description":"Null for the target's own body, which its page shows.","type":"null"}},"required":["tracks","outputs","access","id","role","delivery","preview_only","from_body","position","asset"]},{"type":"null"}]},"attachments":{"type":"array","items":{"type":"object","properties":{"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the video's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads beside the video or audio file.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]},"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"]},"preview_only":{"type":"boolean"},"from_body":{"description":"Named by its target's body text, rather than the target's own media (a lesson's video or slides).","type":"boolean"},"position":{"type":"number"},"asset":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"ext":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime":{"anyOf":[{"type":"string"},{"type":"null"}]},"bytes":{"description":"The file's size in bytes, null when it has none or is withheld.","anyOf":[{"type":"number"},{"type":"null"}]},"enforcement":{"type":"string","x-extensible-enum":["public","external","signed"]},"locator":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"type":"object","properties":{"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"duration":{"anyOf":[{"type":"number"},{"type":"null"}]},"pages":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["width","height","duration","pages"]},"status":{"type":"string","x-extensible-enum":["pending","ready","failed"]}},"required":["id","name","title","ext","description","mime","bytes","enforcement","locator","metadata","status"]}},"required":["tracks","outputs","access","id","role","delivery","preview_only","from_body","position","asset"]}},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]},"requires":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"everyone"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"tier"},"rank":{"type":"number"}},"required":["kind","rank"]},{"type":"object","properties":{"kind":{"type":"string","const":"nobody"}},"required":["kind"]}]},"opens_at":{"description":"When its content opens to everyone it admits; null once open or without a release, and for a broken one, which stays locked.","anyOf":[{"type":"string"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"duration":{"description":"The measured length in seconds of a podcast episode's own audio, told even when it is locked; null without one.","anyOf":[{"type":"number"},{"type":"null"}]},"previewed":{"description":"Whether the read's preview token is the entry's own, which shows its staged body past its gate.","type":"boolean"},"product":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"path":{"description":"The storefront path.","type":"string"},"url":{"description":"The absolute URL on the store's verified hostname, or null before it has one.","anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"progress_tracking":{"type":"string","x-extensible-enum":["manual","disabled","on_open","on_complete"]}},"required":["id","slug","path","url","title","progress_tracking"]},"id":{"type":"string"},"product_id":{"type":"string"},"slug":{"type":"string"},"path":{"description":"The storefront path.","type":"string"},"url":{"description":"The absolute URL on the store's verified hostname, or null before it has one.","anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"subtitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"section":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"description":"Who signs it, or null when unsigned; a member with no name, or one central no longer holds, answers a null name.","anyOf":[{"type":"object","properties":{"kind":{"type":"string","x-extensible-enum":["member","business","store"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","name","image"]},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"preview":{"description":"The teaser, in the rich text format as stored.","anyOf":[{"type":"string"},{"type":"null"}],"x-rich-text":"text"},"position":{"type":"number"},"published_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"unlisted_at":{"description":"Set while it is out of the product's lists and indexes, though still reachable.","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":{"type":"boolean"}},"required":["ai_generated"]}},"required":["files","maps","quiz","body","attachments","access","requires","opens_at","completed_at","duration","previewed","product","id","product_id","slug","path","url","title","subtitle","section","author","tags","preview","position","published_at","unlisted_at","created_at","updated_at","settings"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/feeds":{"get":{"operationId":"getFeeds","summary":"Reads a blog's, a podcast's or an event's feeds: its public one, and whether the customer may hold a private one, whether sharing turned theirs off, and its address.","tags":["feed"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","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 blog's, a podcast's or an event's feeds: its public one, and whether the customer may hold a private one, whether sharing turned theirs off, and its address.","content":{"application/json":{"schema":{"type":"object","properties":{"product_id":{"type":"string"},"public":{"description":"The public feed: a blog's abstracts, a podcast's episodes anyone may play, or an event's sessions; null while a blog or a podcast is unlisted.","anyOf":[{"type":"object","properties":{"path":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["path","url"]},{"type":"null"}]},"private":{"description":"The customer's private feed: whether they may hold one, whether sharing turned it off, and theirs when they hold one.","type":"object","properties":{"available":{"type":"boolean"},"blocked":{"description":"Turned off after its address was shared again and again, until the store turns it on again.","type":"boolean"},"feed":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"path":{"description":"The feed's storefront path, carrying its secret; null over MCP, to staff acting as the customer and without `profile:write`.","anyOf":[{"type":"string"},{"type":"null"}]},"url":{"description":"The absolute URL on the store's verified hostname, or null before it has one and wherever `path` is.","anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"}},"required":["id","path","url","created_at"]},{"type":"null"}]}},"required":["available","blocked","feed"]}},"required":["product_id","public","private"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/answers":{"get":{"operationId":"listProductAnswers","summary":"Reads the customer's answers to a product's registration questions.","tags":["product"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Reads the customer's answers to a product's registration questions.","content":{"application/json":{"schema":{"type":"object","properties":{"product_id":{"type":"string"},"answers":{"description":"The customer's answers in the questions' order; one no longer standing, as a pick since taken off, is absent.","type":"array","items":{"type":"object","properties":{"question_id":{"type":"string"},"value":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["question_id","value"]}}},"required":["product_id","answers"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"put":{"operationId":"setProductAnswers","summary":"Answers a product's registration questions while the customer buys it; checkout asks for every required one, and any answer off its pattern, before payment.","tags":["checkout"],"security":[{"bearer":["checkout:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Answers a product's registration questions while the customer buys it; checkout asks for every required one, and any answer off its pattern, before payment.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"product_id":{"type":"string"},"answers":{"description":"The customer's answers in the questions' order; one no longer standing, as a pick since taken off, is absent.","type":"array","items":{"type":"object","properties":{"question_id":{"type":"string"},"value":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["question_id","value"]}}},"required":["product_id","answers"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"checkout":{"description":"The customer's cart the answers are given in; named, it must be theirs, open or frozen, and hold the product, else nothing is written.","type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":512}},"required":["id"],"additionalProperties":false},"answers":{"description":"One answer per question; a question left out keeps what it holds.","type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"value":{"description":"A trimmed text for a `text` (one line, at most 300) or `long_text` (at most 3000) question, an option for a `select`, options for a `multi_select`, a boolean for a `checkbox`; null or a blank text clears an optional one.","anyOf":[{"type":"boolean"},{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["question","value"],"additionalProperties":false},"maxItems":20}},"required":["answers"],"additionalProperties":false}}}}}},"/v1/stores/{store}/products/{product}/feeds/private":{"post":{"operationId":"rotateFeed","summary":"Gives the customer a private feed of a blog, a podcast or an event, or a new URL for theirs, the old one stopping at once.","tags":["profile"],"security":[{"bearer":["profile:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Gives the customer a private feed of a blog, a podcast or an event, or a new URL for theirs, the old one stopping at once.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"path":{"description":"The feed's storefront path, carrying its secret; null over MCP, to staff acting as the customer and without `profile:write`.","anyOf":[{"type":"string"},{"type":"null"}]},"url":{"description":"The absolute URL on the store's verified hostname, or null before it has one and wherever `path` is.","anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"}},"required":["id","path","url","created_at"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","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}}}}},"delete":{"operationId":"revokeFeed","summary":"Stops the customer's private feed of a blog, a podcast or an event.","tags":["profile"],"security":[{"bearer":["profile:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Stops the customer's private feed of a blog, a podcast or an event.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"revoked":{"type":"boolean","const":true}},"required":["id","revoked"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/pages":{"get":{"operationId":"listPages","summary":"Pages the store's custom pages.","tags":["page"],"security":[{"bearer":["read"]},{"publishableKey":[]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","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","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","maxLength":8192}},{"name":"count","in":"query","schema":{"type":"boolean"}},{"name":"search","in":"query","schema":{"type":"string","minLength":1,"maxLength":200}}],"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":{"total":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]},"id":{"type":"string"},"slug":{"type":"string"},"path":{"description":"The storefront path.","type":"string"},"url":{"description":"The absolute URL on the store's verified hostname, or null before it has one.","anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"menu_position":{"anyOf":[{"type":"number"},{"type":"null"}]},"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"}},"required":["no_index"]}},"required":["storefront"]}},"required":["access","id","slug","path","url","title","description","menu_position","published_at","created_at","updated_at","settings"]}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","cursor"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/pages/{page}":{"get":{"operationId":"getPage","summary":"Reads one custom page, its body too when asked.","tags":["page"],"security":[{"bearer":["read"]},{"publishableKey":[]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"page","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"preview","in":"query","schema":{"type":"string","minLength":1,"maxLength":128}},{"name":"include","in":"query","explode":true,"description":"What else the read answers: `body` reads the body whole, as `readBody` does, and fails the read where `readBody` would.","schema":{"description":"What else the read answers: `body` reads the body whole, as `readBody` does, and fails the read where `readBody` would.","type":"array","items":{"type":"string","const":"body"},"maxItems":1}}],"responses":{"200":{"description":"Reads one custom page, its body too when asked.","content":{"application/json":{"schema":{"type":"object","properties":{"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":{"description":"The file's size in bytes, null when it has none or is withheld.","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"]},"url":{"description":"A public file's lasting URL, an image's naming its widths' version as `#v=` once they're made; null for a private one, or one whose bytes haven't landed.","anyOf":[{"type":"string"},{"type":"null"}]},"resized":{"description":"A public image's smaller copies, narrowest first, for a `srcset`; left out until they're made and its width measured, for one kept as uploaded, and for any other file.","type":"array","items":{"type":"object","properties":{"width":{"description":"Its width in pixels, at most the image's own.","type":"integer","minimum":1},"avif":{"description":"A lasting URL to it as AVIF.","type":"string"},"webp":{"description":"A lasting URL to it as WebP.","type":"string"}},"required":["width","avif","webp"]}},"attachment_id":{"description":"The binding a private file opens through; null when the reader can't open it.","anyOf":[{"type":"string"},{"type":"null"}]},"unlocks":{"description":"What unlocks a file its own rules keep from the reader, any one; null for any other file.","anyOf":[{"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string"},"product_name":{"type":"string"},"tier":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"rank":{"type":"number"}},"required":["id","name","rank"]},{"type":"null"}]}},"required":["product_id","product_name","tier"]}},{"type":"null"}]},"video":{"description":"A video's subtitles and published AI outputs, where its read lists any and the reader may play it.","type":"object","properties":{"attachment_id":{"type":"string"},"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the file's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}}},"required":["attachment_id","tracks","outputs"]},"audio":{"description":"An audio file's waveform, subtitles and published AI outputs, where the reader may play it.","type":"object","properties":{"waveform":{"description":"256 levels from 0 to 255, base64, from the file's start to its end; null until drawn, or when it can't be.","anyOf":[{"type":"string"},{"type":"null"}]},"attachment_id":{"description":"The binding its tracks and outputs open through, which a public file carries here alone; null with none.","anyOf":[{"type":"string"},{"type":"null"}]},"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the file's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}}},"required":["waveform","attachment_id","tracks","outputs"]}},"required":["id","kind","mime","name","bytes","width","height","duration","pages","status","url","attachment_id","unlocks"]}},"maps":{"description":"The maps the body's map blocks show, matched to a block by `latitude` and `longitude`; none while the body is kept from the reader.","type":"array","items":{"type":"object","properties":{"latitude":{"type":"number"},"longitude":{"type":"number"},"light":{"description":"For a light page.","type":"object","properties":{"url":{"description":"A lasting URL to the image.","type":"string"},"width":{"description":"Its size in pixels.","type":"number"},"height":{"type":"number"},"resized":{"description":"Its smaller copies, narrowest first; null until made.","anyOf":[{"type":"array","items":{"type":"object","properties":{"width":{"description":"Its width in pixels, at most the image's own.","type":"integer","minimum":1},"avif":{"description":"A lasting URL to it as AVIF.","type":"string"},"webp":{"description":"A lasting URL to it as WebP.","type":"string"}},"required":["width","avif","webp"]}},{"type":"null"}]}},"required":["url","width","height"]},"dark":{"description":"For a dark page.","type":"object","properties":{"url":{"description":"A lasting URL to the image.","type":"string"},"width":{"description":"Its size in pixels.","type":"number"},"height":{"type":"number"},"resized":{"description":"Its smaller copies, narrowest first; null until made.","anyOf":[{"type":"array","items":{"type":"object","properties":{"width":{"description":"Its width in pixels, at most the image's own.","type":"integer","minimum":1},"avif":{"description":"A lasting URL to it as AVIF.","type":"string"},"webp":{"description":"A lasting URL to it as WebP.","type":"string"}},"required":["width","avif","webp"]}},{"type":"null"}]}},"required":["url","width","height"]},"attribution":{"description":"The credit shown over the map, linking `attribution_url`.","type":"string"},"attribution_url":{"type":"string"}},"required":["latitude","longitude","light","dark","attribution","attribution_url"]}},"body":{"anyOf":[{"type":"object","properties":{"default":{"description":"The template the default comes from: the home's, a page's, a lesson's or article's, or a product's by category.","type":"object","properties":{"template":{"type":"string","x-extensible-enum":["product","blog","podcast","page","portfolio","lesson","article","home","series"]}},"required":["template"]},"attachment":{"description":"The body its page can't show and shows the default for; null without one.","anyOf":[{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"null"}]},"mime":{"description":"A blocks layout's type.","type":"string"},"access":{"description":"Locked only where the target's own gate keeps it, as a default has no gate of its own.","type":"string","x-extensible-enum":["locked","unlocked","bypassed"]},"requires":{"description":"What the target's gate asks of its reader; a tier names the product it ranks.","anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"everyone"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"nobody"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"tier"},"rank":{"type":"number"},"product_id":{"type":"string"}},"required":["kind","rank","product_id"]}]},"content":{"description":"The default layout, null when locked: a blocks layout's texts in the rich text format.","anyOf":[{"type":"string"},{"type":"null"}],"x-rich-text":"body"},"words":{"description":"A default counts no words.","type":"null"}},"required":["default","attachment","mime","access","requires","content","words"]},{"type":"object","properties":{"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the video's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads beside the video or audio file.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]},"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"]},"preview_only":{"type":"boolean"},"from_body":{"description":"Named by its target's body text, rather than the target's own media (a lesson's video or slides).","type":"boolean"},"position":{"type":"number"},"asset":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"ext":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime":{"anyOf":[{"type":"string"},{"type":"null"}]},"bytes":{"description":"The file's size in bytes, null when it has none or is withheld.","anyOf":[{"type":"number"},{"type":"null"}]},"enforcement":{"type":"string","x-extensible-enum":["public","external","signed"]},"locator":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"type":"object","properties":{"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"duration":{"anyOf":[{"type":"number"},{"type":"null"}]},"pages":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["width","height","duration","pages"]},"status":{"type":"string","x-extensible-enum":["pending","ready","failed"]}},"required":["id","name","title","ext","description","mime","bytes","enforcement","locator","metadata","status"]},"requires":{"description":"What the body's gate asks of its reader, which may be more than its target asks; a tier names the product it ranks.","anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"everyone"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"nobody"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"tier"},"rank":{"type":"number"},"product_id":{"type":"string"}},"required":["kind","rank","product_id"]}]},"content":{"description":"The body's text, null when locked: a blocks layout's texts in the rich text format as stored (a product's with the side column its page shows), or a lesson's or article's text.","anyOf":[{"type":"string"},{"type":"null"}],"x-rich-text":"body"},"words":{"description":"How many words it shows, hidden blocks aside; told even when the text is locked, null when its layout doesn't parse.","anyOf":[{"type":"number"},{"type":"null"}]},"default":{"description":"Null for the target's own body, which its page shows.","type":"null"}},"required":["tracks","outputs","access","id","role","delivery","preview_only","from_body","position","asset"]},{"type":"null"}]},"attachments":{"type":"array","items":{"type":"object","properties":{"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the video's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads beside the video or audio file.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]},"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"]},"preview_only":{"type":"boolean"},"from_body":{"description":"Named by its target's body text, rather than the target's own media (a lesson's video or slides).","type":"boolean"},"position":{"type":"number"},"asset":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"ext":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime":{"anyOf":[{"type":"string"},{"type":"null"}]},"bytes":{"description":"The file's size in bytes, null when it has none or is withheld.","anyOf":[{"type":"number"},{"type":"null"}]},"enforcement":{"type":"string","x-extensible-enum":["public","external","signed"]},"locator":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"type":"object","properties":{"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"duration":{"anyOf":[{"type":"number"},{"type":"null"}]},"pages":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["width","height","duration","pages"]},"status":{"type":"string","x-extensible-enum":["pending","ready","failed"]}},"required":["id","name","title","ext","description","mime","bytes","enforcement","locator","metadata","status"]}},"required":["tracks","outputs","access","id","role","delivery","preview_only","from_body","position","asset"]}},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]},"id":{"type":"string"},"slug":{"type":"string"},"path":{"description":"The storefront path.","type":"string"},"url":{"description":"The absolute URL on the store's verified hostname, or null before it has one.","anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"menu_position":{"anyOf":[{"type":"number"},{"type":"null"}]},"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"}},"required":["no_index"]}},"required":["storefront"]}},"required":["files","maps","body","attachments","access","id","slug","path","url","title","description","menu_position","published_at","created_at","updated_at","settings"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/body":{"get":{"operationId":"readBody","summary":"Reads the home's, a product's, entry's or page's body, or the default layout its page shows in its place, where the customer may; one still uploading fails `conflict` on `status` (`pending`), so retry it shortly.","tags":["body"],"security":[{"bearer":["read"]},{"publishableKey":[]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"target","in":"query","required":true,"style":"deepObject","explode":true,"schema":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"store"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["product","entry","page"]},"id":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","id"],"additionalProperties":false}]}},{"name":"preview","in":"query","description":"A token a seller made for the target's page, which opens it unpublished with its staged body; a product's opens its published entries' bodies, gated as ever, and an entry's its product's live body, gated as ever.","schema":{"description":"A token a seller made for the target's page, which opens it unpublished with its staged body; a product's opens its published entries' bodies, gated as ever, and an entry's its product's live body, gated as ever.","type":"string","minLength":1,"maxLength":128}},{"name":"fallback","in":"query","description":"Answers the target's default layout whatever its body, for a page that can show none of its own blocks.","schema":{"description":"Answers the target's default layout whatever its body, for a page that can show none of its own blocks.","type":"boolean"}}],"responses":{"200":{"description":"Reads the home's, a product's, entry's or page's body, or the default layout its page shows in its place, where the customer may; one still uploading fails `conflict` on `status` (`pending`), so retry it shortly.","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"default":{"type":"null"},"content":{"type":"null"},"words":{"anyOf":[{"type":"number"},{"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":{"description":"The file's size in bytes, null when it has none or is withheld.","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"]},"url":{"description":"A public file's lasting URL, an image's naming its widths' version as `#v=` once they're made; null for a private one, or one whose bytes haven't landed.","anyOf":[{"type":"string"},{"type":"null"}]},"resized":{"description":"A public image's smaller copies, narrowest first, for a `srcset`; left out until they're made and its width measured, for one kept as uploaded, and for any other file.","type":"array","items":{"type":"object","properties":{"width":{"description":"Its width in pixels, at most the image's own.","type":"integer","minimum":1},"avif":{"description":"A lasting URL to it as AVIF.","type":"string"},"webp":{"description":"A lasting URL to it as WebP.","type":"string"}},"required":["width","avif","webp"]}},"attachment_id":{"description":"The binding a private file opens through; null when the reader can't open it.","anyOf":[{"type":"string"},{"type":"null"}]},"unlocks":{"description":"What unlocks a file its own rules keep from the reader, any one; null for any other file.","anyOf":[{"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string"},"product_name":{"type":"string"},"tier":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"rank":{"type":"number"}},"required":["id","name","rank"]},{"type":"null"}]}},"required":["product_id","product_name","tier"]}},{"type":"null"}]},"video":{"description":"A video's subtitles and published AI outputs, where its read lists any and the reader may play it.","type":"object","properties":{"attachment_id":{"type":"string"},"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the file's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}}},"required":["attachment_id","tracks","outputs"]},"audio":{"description":"An audio file's waveform, subtitles and published AI outputs, where the reader may play it.","type":"object","properties":{"waveform":{"description":"256 levels from 0 to 255, base64, from the file's start to its end; null until drawn, or when it can't be.","anyOf":[{"type":"string"},{"type":"null"}]},"attachment_id":{"description":"The binding its tracks and outputs open through, which a public file carries here alone; null with none.","anyOf":[{"type":"string"},{"type":"null"}]},"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the file's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}}},"required":["waveform","attachment_id","tracks","outputs"]}},"required":["id","kind","mime","name","bytes","width","height","duration","pages","status","url","attachment_id","unlocks"]}},"maps":{"description":"None while its text is kept from the reader.","type":"array","items":{"type":"object","properties":{"latitude":{"type":"number"},"longitude":{"type":"number"},"light":{"description":"For a light page.","type":"object","properties":{"url":{"description":"A lasting URL to the image.","type":"string"},"width":{"description":"Its size in pixels.","type":"number"},"height":{"type":"number"},"resized":{"description":"Its smaller copies, narrowest first; null until made.","anyOf":[{"type":"array","items":{"type":"object","properties":{"width":{"description":"Its width in pixels, at most the image's own.","type":"integer","minimum":1},"avif":{"description":"A lasting URL to it as AVIF.","type":"string"},"webp":{"description":"A lasting URL to it as WebP.","type":"string"}},"required":["width","avif","webp"]}},{"type":"null"}]}},"required":["url","width","height"]},"dark":{"description":"For a dark page.","type":"object","properties":{"url":{"description":"A lasting URL to the image.","type":"string"},"width":{"description":"Its size in pixels.","type":"number"},"height":{"type":"number"},"resized":{"description":"Its smaller copies, narrowest first; null until made.","anyOf":[{"type":"array","items":{"type":"object","properties":{"width":{"description":"Its width in pixels, at most the image's own.","type":"integer","minimum":1},"avif":{"description":"A lasting URL to it as AVIF.","type":"string"},"webp":{"description":"A lasting URL to it as WebP.","type":"string"}},"required":["width","avif","webp"]}},{"type":"null"}]}},"required":["url","width","height"]},"attribution":{"description":"The credit shown over the map, linking `attribution_url`.","type":"string"},"attribution_url":{"type":"string"}},"required":["latitude","longitude","light","dark","attribution","attribution_url"]}},"requires":{"description":"What the body's gate asks of its reader, which may be more than its target asks; a tier names the product it ranks.","anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"everyone"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"nobody"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"tier"},"rank":{"type":"number"},"product_id":{"type":"string"}},"required":["kind","rank","product_id"]}]},"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the video's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads beside the video or audio file.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]},"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"]},"preview_only":{"type":"boolean"},"from_body":{"description":"Named by its target's body text, rather than the target's own media (a lesson's video or slides).","type":"boolean"},"position":{"type":"number"},"asset":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"ext":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime":{"anyOf":[{"type":"string"},{"type":"null"}]},"bytes":{"description":"The file's size in bytes, null when it has none or is withheld.","anyOf":[{"type":"number"},{"type":"null"}]},"enforcement":{"type":"string","x-extensible-enum":["public","external","signed"]},"locator":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"type":"object","properties":{"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"duration":{"anyOf":[{"type":"number"},{"type":"null"}]},"pages":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["width","height","duration","pages"]},"status":{"type":"string","x-extensible-enum":["pending","ready","failed"]}},"required":["id","name","title","ext","description","mime","bytes","enforcement","locator","metadata","status"]}},"required":["default","content","words","files","maps","requires","tracks","outputs","access","id","role","delivery","preview_only","from_body","position","asset"]},{"type":"object","properties":{"default":{"type":"null"},"content":{"description":"The body's text: a blocks layout's texts in the rich text format as stored, a product's with the side column its page shows.","type":"string","x-rich-text":"body"},"words":{"description":"How many words it shows, hidden blocks aside; told even when the text is locked, null when its layout doesn't parse.","anyOf":[{"type":"number"},{"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":{"description":"The file's size in bytes, null when it has none or is withheld.","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"]},"url":{"description":"A public file's lasting URL, an image's naming its widths' version as `#v=` once they're made; null for a private one, or one whose bytes haven't landed.","anyOf":[{"type":"string"},{"type":"null"}]},"resized":{"description":"A public image's smaller copies, narrowest first, for a `srcset`; left out until they're made and its width measured, for one kept as uploaded, and for any other file.","type":"array","items":{"type":"object","properties":{"width":{"description":"Its width in pixels, at most the image's own.","type":"integer","minimum":1},"avif":{"description":"A lasting URL to it as AVIF.","type":"string"},"webp":{"description":"A lasting URL to it as WebP.","type":"string"}},"required":["width","avif","webp"]}},"attachment_id":{"description":"The binding a private file opens through; null when the reader can't open it.","anyOf":[{"type":"string"},{"type":"null"}]},"unlocks":{"description":"What unlocks a file its own rules keep from the reader, any one; null for any other file.","anyOf":[{"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string"},"product_name":{"type":"string"},"tier":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"rank":{"type":"number"}},"required":["id","name","rank"]},{"type":"null"}]}},"required":["product_id","product_name","tier"]}},{"type":"null"}]},"video":{"description":"A video's subtitles and published AI outputs, where its read lists any and the reader may play it.","type":"object","properties":{"attachment_id":{"type":"string"},"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the file's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}}},"required":["attachment_id","tracks","outputs"]},"audio":{"description":"An audio file's waveform, subtitles and published AI outputs, where the reader may play it.","type":"object","properties":{"waveform":{"description":"256 levels from 0 to 255, base64, from the file's start to its end; null until drawn, or when it can't be.","anyOf":[{"type":"string"},{"type":"null"}]},"attachment_id":{"description":"The binding its tracks and outputs open through, which a public file carries here alone; null with none.","anyOf":[{"type":"string"},{"type":"null"}]},"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the file's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}}},"required":["waveform","attachment_id","tracks","outputs"]}},"required":["id","kind","mime","name","bytes","width","height","duration","pages","status","url","attachment_id","unlocks"]}},"maps":{"description":"The maps its map blocks show, matched to a block by `latitude` and `longitude`.","type":"array","items":{"type":"object","properties":{"latitude":{"type":"number"},"longitude":{"type":"number"},"light":{"description":"For a light page.","type":"object","properties":{"url":{"description":"A lasting URL to the image.","type":"string"},"width":{"description":"Its size in pixels.","type":"number"},"height":{"type":"number"},"resized":{"description":"Its smaller copies, narrowest first; null until made.","anyOf":[{"type":"array","items":{"type":"object","properties":{"width":{"description":"Its width in pixels, at most the image's own.","type":"integer","minimum":1},"avif":{"description":"A lasting URL to it as AVIF.","type":"string"},"webp":{"description":"A lasting URL to it as WebP.","type":"string"}},"required":["width","avif","webp"]}},{"type":"null"}]}},"required":["url","width","height"]},"dark":{"description":"For a dark page.","type":"object","properties":{"url":{"description":"A lasting URL to the image.","type":"string"},"width":{"description":"Its size in pixels.","type":"number"},"height":{"type":"number"},"resized":{"description":"Its smaller copies, narrowest first; null until made.","anyOf":[{"type":"array","items":{"type":"object","properties":{"width":{"description":"Its width in pixels, at most the image's own.","type":"integer","minimum":1},"avif":{"description":"A lasting URL to it as AVIF.","type":"string"},"webp":{"description":"A lasting URL to it as WebP.","type":"string"}},"required":["width","avif","webp"]}},{"type":"null"}]}},"required":["url","width","height"]},"attribution":{"description":"The credit shown over the map, linking `attribution_url`.","type":"string"},"attribution_url":{"type":"string"}},"required":["latitude","longitude","light","dark","attribution","attribution_url"]}},"requires":{"description":"What the body's gate asks of its reader, which may be more than its target asks; a tier names the product it ranks.","anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"everyone"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"nobody"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"tier"},"rank":{"type":"number"},"product_id":{"type":"string"}},"required":["kind","rank","product_id"]}]},"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the video's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads beside the video or audio file.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]},"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"]},"preview_only":{"type":"boolean"},"from_body":{"description":"Named by its target's body text, rather than the target's own media (a lesson's video or slides).","type":"boolean"},"position":{"type":"number"},"asset":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"ext":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime":{"anyOf":[{"type":"string"},{"type":"null"}]},"bytes":{"description":"The file's size in bytes, null when it has none or is withheld.","anyOf":[{"type":"number"},{"type":"null"}]},"enforcement":{"type":"string","x-extensible-enum":["public","external","signed"]},"locator":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"type":"object","properties":{"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"duration":{"anyOf":[{"type":"number"},{"type":"null"}]},"pages":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["width","height","duration","pages"]},"status":{"type":"string","x-extensible-enum":["pending","ready","failed"]}},"required":["id","name","title","ext","description","mime","bytes","enforcement","locator","metadata","status"]}},"required":["default","content","words","files","maps","requires","tracks","outputs","access","id","role","delivery","preview_only","from_body","position","asset"]},{"type":"object","properties":{"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":{"description":"The file's size in bytes, null when it has none or is withheld.","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"]},"url":{"description":"A public file's lasting URL, an image's naming its widths' version as `#v=` once they're made; null for a private one, or one whose bytes haven't landed.","anyOf":[{"type":"string"},{"type":"null"}]},"resized":{"description":"A public image's smaller copies, narrowest first, for a `srcset`; left out until they're made and its width measured, for one kept as uploaded, and for any other file.","type":"array","items":{"type":"object","properties":{"width":{"description":"Its width in pixels, at most the image's own.","type":"integer","minimum":1},"avif":{"description":"A lasting URL to it as AVIF.","type":"string"},"webp":{"description":"A lasting URL to it as WebP.","type":"string"}},"required":["width","avif","webp"]}},"attachment_id":{"description":"The binding a private file opens through; null when the reader can't open it.","anyOf":[{"type":"string"},{"type":"null"}]},"unlocks":{"description":"What unlocks a file its own rules keep from the reader, any one; null for any other file.","anyOf":[{"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string"},"product_name":{"type":"string"},"tier":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"rank":{"type":"number"}},"required":["id","name","rank"]},{"type":"null"}]}},"required":["product_id","product_name","tier"]}},{"type":"null"}]},"video":{"description":"A video's subtitles and published AI outputs, where its read lists any and the reader may play it.","type":"object","properties":{"attachment_id":{"type":"string"},"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the file's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}}},"required":["attachment_id","tracks","outputs"]},"audio":{"description":"An audio file's waveform, subtitles and published AI outputs, where the reader may play it.","type":"object","properties":{"waveform":{"description":"256 levels from 0 to 255, base64, from the file's start to its end; null until drawn, or when it can't be.","anyOf":[{"type":"string"},{"type":"null"}]},"attachment_id":{"description":"The binding its tracks and outputs open through, which a public file carries here alone; null with none.","anyOf":[{"type":"string"},{"type":"null"}]},"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the file's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}}},"required":["waveform","attachment_id","tracks","outputs"]}},"required":["id","kind","mime","name","bytes","width","height","duration","pages","status","url","attachment_id","unlocks"]}},"maps":{"description":"A default shows no map.","type":"array","items":{"type":"object","properties":{"latitude":{"type":"number"},"longitude":{"type":"number"},"light":{"description":"For a light page.","type":"object","properties":{"url":{"description":"A lasting URL to the image.","type":"string"},"width":{"description":"Its size in pixels.","type":"number"},"height":{"type":"number"},"resized":{"description":"Its smaller copies, narrowest first; null until made.","anyOf":[{"type":"array","items":{"type":"object","properties":{"width":{"description":"Its width in pixels, at most the image's own.","type":"integer","minimum":1},"avif":{"description":"A lasting URL to it as AVIF.","type":"string"},"webp":{"description":"A lasting URL to it as WebP.","type":"string"}},"required":["width","avif","webp"]}},{"type":"null"}]}},"required":["url","width","height"]},"dark":{"description":"For a dark page.","type":"object","properties":{"url":{"description":"A lasting URL to the image.","type":"string"},"width":{"description":"Its size in pixels.","type":"number"},"height":{"type":"number"},"resized":{"description":"Its smaller copies, narrowest first; null until made.","anyOf":[{"type":"array","items":{"type":"object","properties":{"width":{"description":"Its width in pixels, at most the image's own.","type":"integer","minimum":1},"avif":{"description":"A lasting URL to it as AVIF.","type":"string"},"webp":{"description":"A lasting URL to it as WebP.","type":"string"}},"required":["width","avif","webp"]}},{"type":"null"}]}},"required":["url","width","height"]},"attribution":{"description":"The credit shown over the map, linking `attribution_url`.","type":"string"},"attribution_url":{"type":"string"}},"required":["latitude","longitude","light","dark","attribution","attribution_url"]}},"default":{"description":"The template the default comes from: the home's, a page's, a lesson's or article's, or a product's by category.","type":"object","properties":{"template":{"type":"string","x-extensible-enum":["product","blog","podcast","page","portfolio","lesson","article","home","series"]}},"required":["template"]},"attachment":{"description":"The body its page can't show and shows the default for; null without one.","anyOf":[{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"type":"null"}]},"mime":{"description":"A blocks layout's type.","type":"string"},"access":{"description":"Locked only where the target's own gate keeps it, as a default has no gate of its own.","type":"string","x-extensible-enum":["locked","unlocked","bypassed"]},"requires":{"description":"What the target's gate asks of its reader; a tier names the product it ranks.","anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"everyone"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"nobody"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"tier"},"rank":{"type":"number"},"product_id":{"type":"string"}},"required":["kind","rank","product_id"]}]},"content":{"description":"The default layout, null when locked: a blocks layout's texts in the rich text format.","anyOf":[{"type":"string"},{"type":"null"}],"x-rich-text":"body"},"words":{"description":"A default counts no words.","type":"null"}},"required":["files","maps","default","attachment","mime","access","requires","content","words"]}]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/prompts":{"get":{"operationId":"listPrompts","summary":"Lists the MCP prompts of one product, or of every product the customer holds, with what each asks, the tier it requires and whether the customer may run it; without a customer, a product is required.","tags":["prompt"],"security":[{"bearer":["read"]},{"publishableKey":[]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","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":"runnable","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Lists the MCP prompts of one product, or of every product the customer holds, with what each asks, the tier it requires and whether the customer may run it; without a customer, a product is required.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"arguments":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"}},"required":["name","description","required"]}},"product":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"}},"required":["id","slug","title"]},"requires":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"everyone"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"tier"},"rank":{"type":"number"}},"required":["kind","rank"]},{"type":"object","properties":{"kind":{"type":"string","const":"nobody"}},"required":["kind"]}]},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]}},"required":["id","name","title","description","arguments","product","requires","access"]}},"truncated":{"type":"boolean"}},"required":["items","truncated"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/prompts":{"get":{"operationId":"listProductPrompts","summary":"Lists the MCP prompts of one product, or of every product the customer holds, with what each asks, the tier it requires and whether the customer may run it; without a customer, a product is required.","tags":["prompt"],"security":[{"bearer":["read"]},{"publishableKey":[]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"runnable","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Lists the MCP prompts of one product, or of every product the customer holds, with what each asks, the tier it requires and whether the customer may run it; without a customer, a product is required.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"arguments":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"}},"required":["name","description","required"]}},"product":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"}},"required":["id","slug","title"]},"requires":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"everyone"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"tier"},"rank":{"type":"number"}},"required":["kind","rank"]},{"type":"object","properties":{"kind":{"type":"string","const":"nobody"}},"required":["kind"]}]},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]}},"required":["id","name","title","description","arguments","product","requires","access"]}},"truncated":{"type":"boolean"}},"required":["items","truncated"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/prompts/{prompt}":{"get":{"operationId":"getPrompt","summary":"Reads one prompt by its id or name, its text filled in with the arguments given where the customer may run it.","tags":["prompt"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"prompt","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"product","in":"query","description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1,"description":"An id, or `slug:<slug>`."}},{"name":"arguments","in":"query","style":"deepObject","explode":true,"schema":{"type":"object","properties":{},"additionalProperties":{"type":"string"}}}],"responses":{"200":{"description":"Reads one prompt by its id or name, its text filled in with the arguments given where the customer may run it.","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"text":{"type":"null"},"id":{"type":"string"},"name":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"arguments":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"}},"required":["name","description","required"]}},"product":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"}},"required":["id","slug","title"]},"requires":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"everyone"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"tier"},"rank":{"type":"number"}},"required":["kind","rank"]},{"type":"object","properties":{"kind":{"type":"string","const":"nobody"}},"required":["kind"]}]},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]}},"required":["text","id","name","title","description","arguments","product","requires","access"]},{"type":"object","properties":{"text":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"arguments":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"}},"required":["name","description","required"]}},"product":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"}},"required":["id","slug","title"]},"requires":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"everyone"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"tier"},"rank":{"type":"number"}},"required":["kind","rank"]},{"type":"object","properties":{"kind":{"type":"string","const":"nobody"}},"required":["kind"]}]},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]}},"required":["text","id","name","title","description","arguments","product","requires","access"]}]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/prompts/{prompt}":{"get":{"operationId":"getProductPrompt","summary":"Reads one prompt by its id or name, its text filled in with the arguments given where the customer may run it.","tags":["prompt"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"prompt","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"arguments","in":"query","style":"deepObject","explode":true,"schema":{"type":"object","properties":{},"additionalProperties":{"type":"string"}}}],"responses":{"200":{"description":"Reads one prompt by its id or name, its text filled in with the arguments given where the customer may run it.","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"text":{"type":"null"},"id":{"type":"string"},"name":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"arguments":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"}},"required":["name","description","required"]}},"product":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"}},"required":["id","slug","title"]},"requires":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"everyone"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"tier"},"rank":{"type":"number"}},"required":["kind","rank"]},{"type":"object","properties":{"kind":{"type":"string","const":"nobody"}},"required":["kind"]}]},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]}},"required":["text","id","name","title","description","arguments","product","requires","access"]},{"type":"object","properties":{"text":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"arguments":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"}},"required":["name","description","required"]}},"product":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"}},"required":["id","slug","title"]},"requires":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"everyone"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"tier"},"rank":{"type":"number"}},"required":["kind","rank"]},{"type":"object","properties":{"kind":{"type":"string","const":"nobody"}},"required":["kind"]}]},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]}},"required":["text","id","name","title","description","arguments","product","requires","access"]}]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/attachments/url":{"post":{"operationId":"getAttachmentUrl","summary":"Mints a short-lived URL to an attachment's file, where the customer may reach it.","tags":["attachment"],"security":[{"bearer":["read"]},{"publishableKey":[]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}}],"responses":{"200":{"description":"Mints a short-lived URL to an attachment's file, where the customer may reach it.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"intent":{"description":"What the URL is for: shown, saved or played; null for a link or public bytes, which open as they are.","anyOf":[{"type":"string","x-extensible-enum":["download","stream","view"]},{"type":"null"}]}},"required":["url","expires_at","intent"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"attachment":{"type":"string","minLength":1,"maxLength":512},"renew":{"type":"boolean"},"intent":{"description":"For a lesson's slides or a PDF a text shows: shown in the viewer as uploaded, or slides downloaded at their protection where the caller may; none serves them as bound.","type":"string","enum":["download","view"]},"track":{"description":"One of the video's `tracks`, served inline to whoever may play the video.","type":"string","minLength":1,"maxLength":512},"preview":{"description":"A token a seller made for a product's or a page's page, which opens the files its read lists unpublished, gated as ever.","type":"string","minLength":1,"maxLength":128}},"required":["attachment"],"additionalProperties":false}}}}}},"/v1/stores/{store}/media_outputs":{"get":{"operationId":"getMediaOutputs","summary":"Reads a video's or audio file's published chapters, summary and transcript, where the customer may play it.","tags":["media"],"security":[{"bearer":["read"]},{"publishableKey":[]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"attachment","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":512}},{"name":"kinds","in":"query","explode":true,"description":"The outputs to read, each once; every one when none are named.","schema":{"description":"The outputs to read, each once; every one when none are named.","type":"array","items":{"type":"string","enum":["summary","chapters","transcript"]},"minItems":1,"maxItems":3}},{"name":"preview","in":"query","description":"A token a seller made for a product's or a page's page, which opens the files its read lists unpublished, gated as ever.","schema":{"description":"A token a seller made for a product's or a page's page, which opens the files its read lists unpublished, gated as ever.","type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"Reads a video's or audio file's published chapters, summary and transcript, where the customer may play it.","content":{"application/json":{"schema":{"type":"object","properties":{"unreadable":{"description":"The published outputs asked for that could not be read: some a later read may find, some only the merchant's rewrite.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}},"chapters":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"start":{"description":"Seconds from the video's start; the first chapter's is 0.","type":"number","minimum":0,"maximum":86400},"title":{"type":"string","minLength":1,"maxLength":100}},"required":["start","title"]}},{"type":"null"}]},"summary":{"anyOf":[{"type":"object","properties":{"summary":{"type":"string","minLength":1,"maxLength":2000},"key_points":{"type":"array","items":{"type":"string","minLength":1,"maxLength":300},"maxItems":12}},"required":["summary","key_points"]},{"type":"null"}]},"transcript":{"description":"Plain text, its paragraphs apart by a blank line.","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["unreadable","chapters","summary","transcript"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/entries/{entry}/complete":{"post":{"operationId":"completeEntry","summary":"Marks an entry complete for the customer.","tags":["progress"],"security":[{"bearer":["progress:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"entry","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Marks an entry complete for the customer.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"entry_id":{"type":"string"},"product_id":{"type":"string"},"completed_at":{"type":"string"},"certificates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"certificate_id":{"type":"string"},"score":{"anyOf":[{"type":"number"},{"type":"null"}]},"attempt":{"anyOf":[{"type":"number"},{"type":"null"}]},"issued_at":{"type":"string"}},"required":["id","product_id","certificate_id","score","attempt","issued_at"]}}},"required":["entry_id","product_id","completed_at","certificates"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"preview":{"description":"A token a seller made for the entry's product's page, which opens a published entry of the product unpublished, or for the entry itself, which opens it unpublished too, gated as ever; with it, any entry it does not open is `not_found` `preview`.","type":"string","minLength":1,"maxLength":128}},"additionalProperties":false}}}}}},"/v1/stores/{store}/completions":{"get":{"operationId":"listCompletions","summary":"Pages the customer's completed entries.","tags":["completion"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","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":["completed"]}},{"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","maxLength":8192}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Pages the customer's completed 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":{"entry_id":{"type":"string"},"product_id":{"type":"string"},"completed_at":{"type":"string"}},"required":["entry_id","product_id","completed_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://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/completions":{"get":{"operationId":"listProductCompletions","summary":"Pages the customer's completed entries.","tags":["completion"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","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":["completed"]}},{"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","maxLength":8192}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Pages the customer's completed 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":{"entry_id":{"type":"string"},"product_id":{"type":"string"},"completed_at":{"type":"string"}},"required":["entry_id","product_id","completed_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://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/notifications":{"get":{"operationId":"listNotifications","summary":"Pages the customer's notifications about new content, newest first, with whether each is read.","tags":["notification"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","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","maxLength":8192}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Pages the customer's notifications about new content, newest first, with whether each is read.","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"},"type":{"type":"string","x-extensible-enum":["portfolio_trade","new_lesson","new_episode","new_post","new_file","new_product","new_discount","event_reminder","event_follow_up"]},"title":{"type":"string"},"body":{"type":"string"},"path":{"type":"string"},"product_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"read_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","type","title","body","path","product_id","created_at","read_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://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/notifications/read":{"post":{"operationId":"markNotificationsRead","summary":"Marks the named notifications read, or every unread one when none is named.","tags":["profile"],"security":[{"bearer":["profile:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}}],"responses":{"200":{"description":"Marks the named notifications read, or every unread one when none is named.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"marked":{"type":"number"}},"required":["marked"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"description":"The notifications to mark read, each once; left out, every unread one is.","type":"array","items":{"type":"string","minLength":1,"maxLength":64},"minItems":1,"maxItems":100}},"additionalProperties":false}}}}}},"/v1/stores/{store}/notifications/delete":{"post":{"operationId":"deleteNotifications","summary":"Deletes the named notifications, read or not, or every read one when none is named.","tags":["profile"],"security":[{"bearer":["profile:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}}],"responses":{"200":{"description":"Deletes the named notifications, read or not, or every read one when none is named.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"number"}},"required":["deleted"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"description":"The notifications to delete, read or not, each once; left out, every read one is.","type":"array","items":{"type":"string","minLength":1,"maxLength":64},"minItems":1,"maxItems":100}},"additionalProperties":false}}}}}},"/v1/stores/{store}/notification_settings":{"get":{"operationId":"getNotificationSettings","summary":"Reads which notification types reach the customer, in their notifications and by browser push.","tags":["notification"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}}],"responses":{"200":{"description":"Reads which notification types reach the customer, in their notifications and by browser push.","content":{"application/json":{"schema":{"type":"object","properties":{"types":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","x-extensible-enum":["portfolio_trade","new_lesson","new_episode","new_post","new_file","new_product","new_discount","event_reminder","event_follow_up"]},"enabled":{"type":"boolean"}},"required":["type","enabled"]}}},"required":["types"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updateNotificationSettings","summary":"Turns notification types on or off, for the notifications list and browser push alike.","tags":["profile"],"security":[{"bearer":["profile:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}}],"responses":{"200":{"description":"Turns notification types on or off, for the notifications list and browser push alike.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"types":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","x-extensible-enum":["portfolio_trade","new_lesson","new_episode","new_post","new_file","new_product","new_discount","event_reminder","event_follow_up"]},"enabled":{"type":"boolean"}},"required":["type","enabled"]}}},"required":["types"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"types":{"description":"Each type to turn on (true) or off (false); a type left out keeps its setting.","type":"object","properties":{"portfolio_trade":{"type":"boolean"},"new_lesson":{"type":"boolean"},"new_episode":{"type":"boolean"},"new_post":{"type":"boolean"},"new_file":{"type":"boolean"},"new_product":{"type":"boolean"},"new_discount":{"type":"boolean"},"event_reminder":{"type":"boolean"},"event_follow_up":{"type":"boolean"}},"additionalProperties":false}},"required":["types"],"additionalProperties":false}}}}}},"/v1/stores/{store}/push_key":{"get":{"operationId":"getPushKey","summary":"Reads the key a browser subscribes to the store's push with, or null when the store sends none.","tags":["push"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}}],"responses":{"200":{"description":"Reads the key a browser subscribes to the store's push with, or null when the store sends none.","content":{"application/json":{"schema":{"type":"object","properties":{"public_key":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["public_key"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/push_subscriptions":{"post":{"operationId":"createPushSubscription","summary":"Allows a browser to receive the customer's notifications by push, as long as the session or token that adds it lasts.","tags":["profile"],"security":[{"bearer":["profile:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}}],"responses":{"201":{"description":"Allows a browser to receive the customer's notifications by push, as long as the session or token that adds it lasts.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"endpoint":{"type":"string"},"created_at":{"type":"string"},"revision":{"type":"string"}},"required":["endpoint","created_at","revision"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"endpoint":{"description":"The push service URL the browser's subscription names.","type":"string","minLength":1,"maxLength":1024},"keys":{"description":"The subscription's keys, as the browser hands them over.","type":"object","properties":{"p256dh":{"description":"The browser's P-256 public key, base64url.","type":"string","minLength":1,"maxLength":128},"auth":{"description":"The browser's authentication secret, base64url.","type":"string","minLength":1,"maxLength":64}},"required":["p256dh","auth"],"additionalProperties":false},"revision":{"description":"The revision the caller's last write of this browser answered, or null for none; refused once another write changed it. Left out, nothing is checked.","anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]}},"required":["endpoint","keys"],"additionalProperties":false}}}}}},"/v1/stores/{store}/push_subscriptions/renew":{"post":{"operationId":"renewPushSubscription","summary":"Moves the customer's subscription to the endpoint and keys its browser renewed it with, in one step, keeping what was pushed to it.","tags":["profile"],"security":[{"bearer":["profile:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}}],"responses":{"200":{"description":"Moves the customer's subscription to the endpoint and keys its browser renewed it with, in one step, keeping what was pushed to it.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"endpoint":{"type":"string"},"created_at":{"type":"string"},"revision":{"type":"string"}},"required":["endpoint","created_at","revision"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"endpoint":{"description":"The push service URL the browser's subscription names.","type":"string","minLength":1,"maxLength":1024},"keys":{"description":"The subscription's keys, as the browser hands them over.","type":"object","properties":{"p256dh":{"description":"The browser's P-256 public key, base64url.","type":"string","minLength":1,"maxLength":128},"auth":{"description":"The browser's authentication secret, base64url.","type":"string","minLength":1,"maxLength":64}},"required":["p256dh","auth"],"additionalProperties":false},"revision":{"description":"The revision the caller's last write of this browser answered, or null for none; refused once another write changed it. Left out, nothing is checked.","anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"old":{"description":"The push service URL the caller's subscription named before the browser renewed it.","type":"string","minLength":1,"maxLength":1024}},"required":["endpoint","keys","old"],"additionalProperties":false}}}}}},"/v1/stores/{store}/push_subscriptions/delete":{"post":{"operationId":"deletePushSubscription","summary":"Stops pushing notifications to a browser.","tags":["profile"],"security":[{"bearer":["profile:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}}],"responses":{"200":{"description":"Stops pushing notifications to a browser.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean"},"revision":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["deleted","revision"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"endpoint":{"description":"The push service URL of the subscription to remove.","type":"string","minLength":1,"maxLength":1024},"revision":{"description":"The revision the caller's last write of this browser answered, or null for none; refused once another write changed it. Left out, nothing is checked.","anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]}},"required":["endpoint"],"additionalProperties":false}}}}}},"/v1/stores/{store}/checkouts":{"post":{"operationId":"createCheckout","summary":"Opens a cart in one currency.","tags":["checkout"],"security":[{"bearer":["checkout:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}}],"responses":{"201":{"description":"Opens a cart in one currency.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","x-extensible-enum":["paid","expired","open","frozen","abandoned"]},"order":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"}},"required":["id","number"]},{"type":"null"}]},"under_minimum":{"anyOf":[{"type":"object","properties":{"processor":{"type":"string","const":"stripe"},"amount":{"description":"What the cart came to before it was waived.","type":"number"},"minimum":{"description":"Null when the processor refused the payment as too small rather than core reading its minimum.","anyOf":[{"type":"number"},{"type":"null"}]}},"required":["processor","amount","minimum"]},{"type":"null"}]},"refund_consent":{"anyOf":[{"type":"string","x-extensible-enum":["none","24h","72h","7d","14d","30d"]},{"type":"null"}]},"card_required":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string","x-extensible-enum":["hold","approval","renewal"]}},"required":["reason"]},{"type":"null"}]},"items":{"type":"array","items":{"type":"object","properties":{"product":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"path":{"description":"The product's storefront path, or null once deleted, since another product may take its slug.","anyOf":[{"type":"string"},{"type":"null"}]},"url":{"description":"The absolute URL on the store's verified hostname, or null before it has one or once deleted.","anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"category":{"type":"string"},"deleted":{"type":"boolean"}},"required":["id","slug","path","url","title","category","deleted"]},{"type":"null"}]},"autorenew":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"first_charge_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"refund_policy":{"anyOf":[{"type":"string","x-extensible-enum":["none","24h","72h","7d","14d","30d"]},{"type":"null"}]},"refund_until":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"product_id":{"type":"string"},"price_id":{"type":"string"},"quantity":{"type":"number"},"amount":{"type":"number"},"discount":{"type":"number"},"discount_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"total":{"type":"number"},"mode":{"type":"string","x-extensible-enum":["upgrade","purchase","renewal"]},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}]},"guests":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["email","name"]}}},"required":["product","autorenew","first_charge_at","refund_policy","refund_until","id","product_id","price_id","quantity","amount","discount","discount_id","total","mode","display_name","message","guests"]}},"totals":{"type":"object","properties":{"amount":{"type":"number"},"discount":{"type":"number"},"total":{"type":"number"}},"required":["amount","discount","total"]},"id":{"type":"string"},"currency":{"type":"string"},"exponent":{"anyOf":[{"type":"number"},{"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":["status","order","under_minimum","refund_consent","card_required","items","totals","id","currency","exponent","coupon","refund_waiver","expires_at","created_at","updated_at"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"currency":{"type":"string","minLength":3,"maxLength":3,"pattern":"^[A-Za-z]{3}$"}},"required":["currency"],"additionalProperties":false}}}}},"get":{"operationId":"listCheckouts","summary":"Pages the customer's checkouts.","tags":["checkout"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","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","maxLength":8192}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Pages the customer'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":{"total":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","x-extensible-enum":["paid","expired","open","frozen","abandoned"]},"order":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"}},"required":["id","number"]},{"type":"null"}]},"under_minimum":{"anyOf":[{"type":"object","properties":{"processor":{"type":"string","const":"stripe"},"amount":{"description":"What the cart came to before it was waived.","type":"number"},"minimum":{"description":"Null when the processor refused the payment as too small rather than core reading its minimum.","anyOf":[{"type":"number"},{"type":"null"}]}},"required":["processor","amount","minimum"]},{"type":"null"}]},"refund_consent":{"anyOf":[{"type":"string","x-extensible-enum":["none","24h","72h","7d","14d","30d"]},{"type":"null"}]},"card_required":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string","x-extensible-enum":["hold","approval","renewal"]}},"required":["reason"]},{"type":"null"}]},"items":{"type":"array","items":{"type":"object","properties":{"product":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"path":{"description":"The product's storefront path, or null once deleted, since another product may take its slug.","anyOf":[{"type":"string"},{"type":"null"}]},"url":{"description":"The absolute URL on the store's verified hostname, or null before it has one or once deleted.","anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"category":{"type":"string"},"deleted":{"type":"boolean"}},"required":["id","slug","path","url","title","category","deleted"]},{"type":"null"}]},"autorenew":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"first_charge_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"refund_policy":{"anyOf":[{"type":"string","x-extensible-enum":["none","24h","72h","7d","14d","30d"]},{"type":"null"}]},"refund_until":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"product_id":{"type":"string"},"price_id":{"type":"string"},"quantity":{"type":"number"},"amount":{"type":"number"},"discount":{"type":"number"},"discount_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"total":{"type":"number"},"mode":{"type":"string","x-extensible-enum":["upgrade","purchase","renewal"]},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}]},"guests":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["email","name"]}}},"required":["product","autorenew","first_charge_at","refund_policy","refund_until","id","product_id","price_id","quantity","amount","discount","discount_id","total","mode","display_name","message","guests"]}},"totals":{"type":"object","properties":{"amount":{"type":"number"},"discount":{"type":"number"},"total":{"type":"number"}},"required":["amount","discount","total"]},"id":{"type":"string"},"currency":{"type":"string"},"exponent":{"anyOf":[{"type":"number"},{"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":["status","order","under_minimum","refund_consent","card_required","items","totals","id","currency","exponent","coupon","refund_waiver","expires_at","created_at","updated_at"]}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","cursor"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/checkouts/{checkout}":{"get":{"operationId":"getCheckout","summary":"Reads one of the customer's checkouts.","tags":["checkout"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"checkout","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Reads one of the customer's checkouts.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","x-extensible-enum":["paid","expired","open","frozen","abandoned"]},"order":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"}},"required":["id","number"]},{"type":"null"}]},"under_minimum":{"anyOf":[{"type":"object","properties":{"processor":{"type":"string","const":"stripe"},"amount":{"description":"What the cart came to before it was waived.","type":"number"},"minimum":{"description":"Null when the processor refused the payment as too small rather than core reading its minimum.","anyOf":[{"type":"number"},{"type":"null"}]}},"required":["processor","amount","minimum"]},{"type":"null"}]},"refund_consent":{"anyOf":[{"type":"string","x-extensible-enum":["none","24h","72h","7d","14d","30d"]},{"type":"null"}]},"card_required":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string","x-extensible-enum":["hold","approval","renewal"]}},"required":["reason"]},{"type":"null"}]},"items":{"type":"array","items":{"type":"object","properties":{"product":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"path":{"description":"The product's storefront path, or null once deleted, since another product may take its slug.","anyOf":[{"type":"string"},{"type":"null"}]},"url":{"description":"The absolute URL on the store's verified hostname, or null before it has one or once deleted.","anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"category":{"type":"string"},"deleted":{"type":"boolean"}},"required":["id","slug","path","url","title","category","deleted"]},{"type":"null"}]},"autorenew":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"first_charge_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"refund_policy":{"anyOf":[{"type":"string","x-extensible-enum":["none","24h","72h","7d","14d","30d"]},{"type":"null"}]},"refund_until":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"product_id":{"type":"string"},"price_id":{"type":"string"},"quantity":{"type":"number"},"amount":{"type":"number"},"discount":{"type":"number"},"discount_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"total":{"type":"number"},"mode":{"type":"string","x-extensible-enum":["upgrade","purchase","renewal"]},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}]},"guests":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["email","name"]}}},"required":["product","autorenew","first_charge_at","refund_policy","refund_until","id","product_id","price_id","quantity","amount","discount","discount_id","total","mode","display_name","message","guests"]}},"totals":{"type":"object","properties":{"amount":{"type":"number"},"discount":{"type":"number"},"total":{"type":"number"}},"required":["amount","discount","total"]},"id":{"type":"string"},"currency":{"type":"string"},"exponent":{"anyOf":[{"type":"number"},{"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":["status","order","under_minimum","refund_consent","card_required","items","totals","id","currency","exponent","coupon","refund_waiver","expires_at","created_at","updated_at"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/checkouts/{checkout}/items":{"put":{"operationId":"setCheckoutItem","summary":"Puts a price in a cart at the offer the customer gets now; zero removes the line.","tags":["checkout"],"security":[{"bearer":["checkout:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"checkout","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Puts a price in a cart at the offer the customer gets now; zero removes the line.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","x-extensible-enum":["paid","expired","open","frozen","abandoned"]},"order":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"}},"required":["id","number"]},{"type":"null"}]},"under_minimum":{"anyOf":[{"type":"object","properties":{"processor":{"type":"string","const":"stripe"},"amount":{"description":"What the cart came to before it was waived.","type":"number"},"minimum":{"description":"Null when the processor refused the payment as too small rather than core reading its minimum.","anyOf":[{"type":"number"},{"type":"null"}]}},"required":["processor","amount","minimum"]},{"type":"null"}]},"refund_consent":{"anyOf":[{"type":"string","x-extensible-enum":["none","24h","72h","7d","14d","30d"]},{"type":"null"}]},"card_required":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string","x-extensible-enum":["hold","approval","renewal"]}},"required":["reason"]},{"type":"null"}]},"items":{"type":"array","items":{"type":"object","properties":{"product":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"path":{"description":"The product's storefront path, or null once deleted, since another product may take its slug.","anyOf":[{"type":"string"},{"type":"null"}]},"url":{"description":"The absolute URL on the store's verified hostname, or null before it has one or once deleted.","anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"category":{"type":"string"},"deleted":{"type":"boolean"}},"required":["id","slug","path","url","title","category","deleted"]},{"type":"null"}]},"autorenew":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"first_charge_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"refund_policy":{"anyOf":[{"type":"string","x-extensible-enum":["none","24h","72h","7d","14d","30d"]},{"type":"null"}]},"refund_until":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"product_id":{"type":"string"},"price_id":{"type":"string"},"quantity":{"type":"number"},"amount":{"type":"number"},"discount":{"type":"number"},"discount_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"total":{"type":"number"},"mode":{"type":"string","x-extensible-enum":["upgrade","purchase","renewal"]},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}]},"guests":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["email","name"]}}},"required":["product","autorenew","first_charge_at","refund_policy","refund_until","id","product_id","price_id","quantity","amount","discount","discount_id","total","mode","display_name","message","guests"]}},"totals":{"type":"object","properties":{"amount":{"type":"number"},"discount":{"type":"number"},"total":{"type":"number"}},"required":["amount","discount","total"]},"id":{"type":"string"},"currency":{"type":"string"},"exponent":{"anyOf":[{"type":"number"},{"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":["status","order","under_minimum","refund_consent","card_required","items","totals","id","currency","exponent","coupon","refund_waiver","expires_at","created_at","updated_at"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"price":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":512}},"required":["id"],"additionalProperties":false},"quantity":{"description":"Zero removes the line.","type":"integer","minimum":0,"maximum":99},"display_name":{"description":"The name a tip or a donation is left under; null clears it, leaving it out keeps it.","anyOf":[{"type":"string","minLength":1,"maxLength":20},{"type":"null"}]},"message":{"description":"A message left with a tip or a donation; null clears it, leaving it out keeps it.","anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"guests":{"description":"An event ticket's guests, one per ticket past the buyer's own, or one per ticket to give them all; null clears them, leaving them out keeps them.","anyOf":[{"type":"array","items":{"type":"object","properties":{"email":{"type":"string","minLength":3,"maxLength":254},"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]}},"required":["email"],"additionalProperties":false},"maxItems":99},{"type":"null"}]}},"required":["price"],"additionalProperties":false}}}}}},"/v1/stores/{store}/checkouts/{checkout}/coupon":{"put":{"operationId":"applyCoupon","summary":"Names a coupon on a cart, or takes it off with null.","tags":["checkout"],"security":[{"bearer":["checkout:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"checkout","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Names a coupon on a cart, or takes it off with null.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","x-extensible-enum":["paid","expired","open","frozen","abandoned"]},"order":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"}},"required":["id","number"]},{"type":"null"}]},"under_minimum":{"anyOf":[{"type":"object","properties":{"processor":{"type":"string","const":"stripe"},"amount":{"description":"What the cart came to before it was waived.","type":"number"},"minimum":{"description":"Null when the processor refused the payment as too small rather than core reading its minimum.","anyOf":[{"type":"number"},{"type":"null"}]}},"required":["processor","amount","minimum"]},{"type":"null"}]},"refund_consent":{"anyOf":[{"type":"string","x-extensible-enum":["none","24h","72h","7d","14d","30d"]},{"type":"null"}]},"card_required":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string","x-extensible-enum":["hold","approval","renewal"]}},"required":["reason"]},{"type":"null"}]},"items":{"type":"array","items":{"type":"object","properties":{"product":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"path":{"description":"The product's storefront path, or null once deleted, since another product may take its slug.","anyOf":[{"type":"string"},{"type":"null"}]},"url":{"description":"The absolute URL on the store's verified hostname, or null before it has one or once deleted.","anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"category":{"type":"string"},"deleted":{"type":"boolean"}},"required":["id","slug","path","url","title","category","deleted"]},{"type":"null"}]},"autorenew":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"first_charge_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"refund_policy":{"anyOf":[{"type":"string","x-extensible-enum":["none","24h","72h","7d","14d","30d"]},{"type":"null"}]},"refund_until":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"product_id":{"type":"string"},"price_id":{"type":"string"},"quantity":{"type":"number"},"amount":{"type":"number"},"discount":{"type":"number"},"discount_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"total":{"type":"number"},"mode":{"type":"string","x-extensible-enum":["upgrade","purchase","renewal"]},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}]},"guests":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["email","name"]}}},"required":["product","autorenew","first_charge_at","refund_policy","refund_until","id","product_id","price_id","quantity","amount","discount","discount_id","total","mode","display_name","message","guests"]}},"totals":{"type":"object","properties":{"amount":{"type":"number"},"discount":{"type":"number"},"total":{"type":"number"}},"required":["amount","discount","total"]},"id":{"type":"string"},"currency":{"type":"string"},"exponent":{"anyOf":[{"type":"number"},{"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":["status","order","under_minimum","refund_consent","card_required","items","totals","id","currency","exponent","coupon","refund_waiver","expires_at","created_at","updated_at"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"description":"A discount's code, or its id as an affiliate link carries it.","anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]}},"required":["code"],"additionalProperties":false}}}}}},"/v1/stores/{store}/products/{product}/waitlist":{"post":{"operationId":"joinWaitlist","summary":"Puts the customer on a full event's waitlist at a ticket, until the seller lets them in or declines; a paid one is charged on promotion, on the card saved with saveWaitlistCard.","tags":["checkout"],"security":[{"bearer":["checkout:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Puts the customer on a full event's waitlist at a ticket, until the seller lets them in or declines; a paid one is charged on promotion, on the card saved with saveWaitlistCard.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"status":{"description":"`waitlisted` until the seller lets them in or declines.","type":"string","x-extensible-enum":["pending","waitlisted","declined","approved"]},"quantity":{"type":"number"},"paid":{"description":"Whether its ticket is paid, charged on promotion to the card `saveWaitlistCard` saves.","type":"boolean"},"created_at":{"type":"string"}},"required":["id","product_id","status","quantity","paid","created_at"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"price":{"description":"The one-time price to wait at, charged on promotion when paid.","type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":512}},"required":["id"],"additionalProperties":false},"quantity":{"description":"How many tickets; one when unset.","type":"integer","minimum":1,"maximum":99}},"required":["price"],"additionalProperties":false}}}}}},"/v1/stores/{store}/products/{product}/waitlist/card":{"post":{"operationId":"saveWaitlistCard","summary":"Saves a card for the customer's place on a paid event's waitlist, charged if the seller lets them in: answers the setup to confirm, then keeps the card once confirmed.","tags":["checkout"],"security":[{"bearer":["checkout:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Saves a card for the customer's place on a paid event's waitlist, charged if the seller lets them in: answers the setup to confirm, then keeps the card once confirmed.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","const":"saved"}},"required":["status"]},{"type":"object","properties":{"status":{"type":"string","x-extensible-enum":["requires_setup","setup_processing"]},"setup":{"type":"object","properties":{"processor":{"type":"string","x-extensible-enum":["stripe"]},"client_secret":{"type":"string"},"publishable_key":{"type":"string"},"account":{"type":"string"}},"required":["processor","client_secret","publishable_key","account"]}},"required":["status","setup"]}]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","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}/checkouts/{checkout}/freeze":{"post":{"operationId":"freezeCheckout","summary":"Presents a cart for payment: its lines must still price as frozen, then it stops changing.","tags":["checkout"],"security":[{"bearer":["checkout:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"checkout","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Presents a cart for payment: its lines must still price as frozen, then it stops changing.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","x-extensible-enum":["paid","expired","open","frozen","abandoned"]},"order":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"}},"required":["id","number"]},{"type":"null"}]},"under_minimum":{"anyOf":[{"type":"object","properties":{"processor":{"type":"string","const":"stripe"},"amount":{"description":"What the cart came to before it was waived.","type":"number"},"minimum":{"description":"Null when the processor refused the payment as too small rather than core reading its minimum.","anyOf":[{"type":"number"},{"type":"null"}]}},"required":["processor","amount","minimum"]},{"type":"null"}]},"refund_consent":{"anyOf":[{"type":"string","x-extensible-enum":["none","24h","72h","7d","14d","30d"]},{"type":"null"}]},"card_required":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string","x-extensible-enum":["hold","approval","renewal"]}},"required":["reason"]},{"type":"null"}]},"items":{"type":"array","items":{"type":"object","properties":{"product":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"path":{"description":"The product's storefront path, or null once deleted, since another product may take its slug.","anyOf":[{"type":"string"},{"type":"null"}]},"url":{"description":"The absolute URL on the store's verified hostname, or null before it has one or once deleted.","anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"category":{"type":"string"},"deleted":{"type":"boolean"}},"required":["id","slug","path","url","title","category","deleted"]},{"type":"null"}]},"autorenew":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"first_charge_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"refund_policy":{"anyOf":[{"type":"string","x-extensible-enum":["none","24h","72h","7d","14d","30d"]},{"type":"null"}]},"refund_until":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"product_id":{"type":"string"},"price_id":{"type":"string"},"quantity":{"type":"number"},"amount":{"type":"number"},"discount":{"type":"number"},"discount_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"total":{"type":"number"},"mode":{"type":"string","x-extensible-enum":["upgrade","purchase","renewal"]},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}]},"guests":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["email","name"]}}},"required":["product","autorenew","first_charge_at","refund_policy","refund_until","id","product_id","price_id","quantity","amount","discount","discount_id","total","mode","display_name","message","guests"]}},"totals":{"type":"object","properties":{"amount":{"type":"number"},"discount":{"type":"number"},"total":{"type":"number"}},"required":["amount","discount","total"]},"id":{"type":"string"},"currency":{"type":"string"},"exponent":{"anyOf":[{"type":"number"},{"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":["status","order","under_minimum","refund_consent","card_required","items","totals","id","currency","exponent","coupon","refund_waiver","expires_at","created_at","updated_at"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"refund_waiver":{"description":"The buyer's consent to a refund policy shorter than the statutory window, or the policy they consented to, refused when it is not the one asked.","anyOf":[{"type":"string","enum":["none","24h","72h","7d"]},{"type":"boolean"}]}},"additionalProperties":false}}}}}},"/v1/stores/{store}/checkouts/{checkout}/abandon":{"post":{"operationId":"abandonCheckout","summary":"Gives a cart up; a frozen one hands its coupons back.","tags":["checkout"],"security":[{"bearer":["checkout:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"checkout","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Gives a cart up; a frozen one hands its coupons back.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","x-extensible-enum":["paid","expired","open","frozen","abandoned"]},"order":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"}},"required":["id","number"]},{"type":"null"}]},"under_minimum":{"anyOf":[{"type":"object","properties":{"processor":{"type":"string","const":"stripe"},"amount":{"description":"What the cart came to before it was waived.","type":"number"},"minimum":{"description":"Null when the processor refused the payment as too small rather than core reading its minimum.","anyOf":[{"type":"number"},{"type":"null"}]}},"required":["processor","amount","minimum"]},{"type":"null"}]},"refund_consent":{"anyOf":[{"type":"string","x-extensible-enum":["none","24h","72h","7d","14d","30d"]},{"type":"null"}]},"card_required":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string","x-extensible-enum":["hold","approval","renewal"]}},"required":["reason"]},{"type":"null"}]},"items":{"type":"array","items":{"type":"object","properties":{"product":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"path":{"description":"The product's storefront path, or null once deleted, since another product may take its slug.","anyOf":[{"type":"string"},{"type":"null"}]},"url":{"description":"The absolute URL on the store's verified hostname, or null before it has one or once deleted.","anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"category":{"type":"string"},"deleted":{"type":"boolean"}},"required":["id","slug","path","url","title","category","deleted"]},{"type":"null"}]},"autorenew":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"first_charge_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"refund_policy":{"anyOf":[{"type":"string","x-extensible-enum":["none","24h","72h","7d","14d","30d"]},{"type":"null"}]},"refund_until":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"product_id":{"type":"string"},"price_id":{"type":"string"},"quantity":{"type":"number"},"amount":{"type":"number"},"discount":{"type":"number"},"discount_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"total":{"type":"number"},"mode":{"type":"string","x-extensible-enum":["upgrade","purchase","renewal"]},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}]},"guests":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["email","name"]}}},"required":["product","autorenew","first_charge_at","refund_policy","refund_until","id","product_id","price_id","quantity","amount","discount","discount_id","total","mode","display_name","message","guests"]}},"totals":{"type":"object","properties":{"amount":{"type":"number"},"discount":{"type":"number"},"total":{"type":"number"}},"required":["amount","discount","total"]},"id":{"type":"string"},"currency":{"type":"string"},"exponent":{"anyOf":[{"type":"number"},{"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":["status","order","under_minimum","refund_consent","card_required","items","totals","id","currency","exponent","coupon","refund_waiver","expires_at","created_at","updated_at"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","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}/checkouts/{checkout}/pay":{"post":{"operationId":"payCheckout","summary":"Starts paying a frozen cart, answering what the buyer's page confirms with the processor, or the order when nothing is due.","tags":["checkout"],"security":[{"bearer":["checkout:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"checkout","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Starts paying a frozen cart, answering what the buyer's page confirms with the processor, or the order when nothing is due.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","const":"paid"},"order":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"}},"required":["id","number"]}},"required":["status","order"]},{"type":"object","properties":{"status":{"type":"string","x-extensible-enum":["processing","requires_payment"]},"payment":{"type":"object","properties":{"processor":{"type":"string","x-extensible-enum":["stripe"]},"client_secret":{"type":"string"},"publishable_key":{"type":"string"},"account":{"type":"string"},"instrument":{"description":"The saved payment method it confirms with, so the page asks for no card; null for a new card.","anyOf":[{"type":"string"},{"type":"null"}]},"confirm_by":{"description":"Until when the buyer may still confirm it; one not confirmed by then is called off, unless already processing.","type":"string"},"amount":{"type":"number"},"currency":{"type":"string"},"exponent":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["processor","client_secret","publishable_key","account","instrument","confirm_by","amount","currency","exponent"]}},"required":["status","payment"]},{"type":"object","properties":{"status":{"type":"string","x-extensible-enum":["requires_setup","setup_processing"]},"setup":{"type":"object","properties":{"processor":{"type":"string","x-extensible-enum":["stripe"]},"client_secret":{"type":"string"},"publishable_key":{"type":"string"},"account":{"type":"string"},"instrument":{"description":"The saved payment method it confirms with, so the page asks for no card; null for a new card.","anyOf":[{"type":"string"},{"type":"null"}]},"confirm_by":{"description":"Until when the buyer may still confirm it; one not confirmed by then is called off, unless already processing.","type":"string"}},"required":["processor","client_secret","publishable_key","account","instrument","confirm_by"]}},"required":["status","setup"]},{"type":"object","properties":{"status":{"type":"string","x-extensible-enum":["cancelled","refunded","refund_pending","refund_failed"]}},"required":["status"]}]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"instrument":{"description":"One of the buyer's saved payment methods to pay with, as `getBillingProfile` lists it; only when the payment starts.","type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":512}},"required":["id"],"additionalProperties":false},"attribution":{"description":"What the buyer's browser tells the store's Meta pixel, kept for its purchase event only while the store sends them.","type":"object","properties":{"fbp":{"description":"The `_fbp` cookie.","type":"string","minLength":1,"maxLength":500},"fbc":{"description":"The `_fbc` cookie.","type":"string","minLength":1,"maxLength":500},"client_ip_address":{"description":"The buyer's IP address.","type":"string","minLength":1,"maxLength":64},"client_user_agent":{"type":"string","minLength":1,"maxLength":512},"country":{"description":"ISO 3166-1 alpha-2.","type":"string","minLength":2,"maxLength":2,"pattern":"^[A-Za-z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":128},"region":{"description":"The region's code.","type":"string","minLength":1,"maxLength":16},"postal_code":{"type":"string","minLength":1,"maxLength":32},"source_url":{"description":"The http(s) page the payment started from; its query and fragment are dropped.","type":"string","minLength":1,"maxLength":2048}},"additionalProperties":false}},"additionalProperties":false}}}}}},"/v1/stores/{store}/checkouts/{checkout}/confirm":{"post":{"operationId":"confirmCheckout","summary":"Reads a cart's payment back after the buyer's page confirmed it, answering the order once it is paid.","tags":["checkout"],"security":[{"bearer":["checkout:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"checkout","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Reads a cart's payment back after the buyer's page confirmed it, answering the order once it is paid.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","const":"paid"},"order":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"}},"required":["id","number"]}},"required":["status","order"]},{"type":"object","properties":{"status":{"type":"string","x-extensible-enum":["processing","requires_payment"]},"payment":{"type":"object","properties":{"processor":{"type":"string","x-extensible-enum":["stripe"]},"client_secret":{"type":"string"},"publishable_key":{"type":"string"},"account":{"type":"string"},"instrument":{"description":"The saved payment method it confirms with, so the page asks for no card; null for a new card.","anyOf":[{"type":"string"},{"type":"null"}]},"confirm_by":{"description":"Until when the buyer may still confirm it; one not confirmed by then is called off, unless already processing.","type":"string"},"amount":{"type":"number"},"currency":{"type":"string"},"exponent":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["processor","client_secret","publishable_key","account","instrument","confirm_by","amount","currency","exponent"]}},"required":["status","payment"]},{"type":"object","properties":{"status":{"type":"string","x-extensible-enum":["requires_setup","setup_processing"]},"setup":{"type":"object","properties":{"processor":{"type":"string","x-extensible-enum":["stripe"]},"client_secret":{"type":"string"},"publishable_key":{"type":"string"},"account":{"type":"string"},"instrument":{"description":"The saved payment method it confirms with, so the page asks for no card; null for a new card.","anyOf":[{"type":"string"},{"type":"null"}]},"confirm_by":{"description":"Until when the buyer may still confirm it; one not confirmed by then is called off, unless already processing.","type":"string"}},"required":["processor","client_secret","publishable_key","account","instrument","confirm_by"]}},"required":["status","setup"]},{"type":"object","properties":{"status":{"type":"string","x-extensible-enum":["cancelled","refunded","refund_pending","refund_failed"]}},"required":["status"]}]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","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}/orders":{"get":{"operationId":"listOrders","summary":"Pages the customer's orders.","tags":["order"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","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","maxLength":8192}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Pages the customer'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":{"total":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"renewed_subscription_ids":{"description":"The subscriptions it paid a later period of; empty for a first purchase, an upgrade or a fresh start.","type":"array","items":{"type":"string"}},"has_receipt":{"type":"boolean"},"item_count":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"product":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"path":{"description":"The product's storefront path, or null once deleted, since another product may take its slug.","anyOf":[{"type":"string"},{"type":"null"}]},"url":{"description":"The absolute URL on the store's verified hostname, or null before it has one or once deleted.","anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"category":{"type":"string"},"deleted":{"type":"boolean"}},"required":["id","slug","path","url","title","category","deleted"]},{"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"},"amount":{"type":"number"},"discount":{"type":"number"},"total":{"type":"number"},"descriptor":{"type":"object","properties":{"product":{"anyOf":[{"type":"string"},{"type":"null"}]},"price":{"anyOf":[{"type":"string"},{"type":"null"}]},"tier":{"anyOf":[{"type":"string"},{"type":"null"}]},"coupon":{"anyOf":[{"type":"string"},{"type":"null"}]},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["product","price","tier","coupon","display_name","message"]}},"required":["product","id","order_id","product_id","tier_id","price_id","position","quantity","amount","discount","total","descriptor"]}},"refunded":{"description":"Every refund summed, past the preview.","type":"number"},"refund_status":{"description":"How much of what it settled came back: none, part or all of it; null while it settled and refunded nothing.","anyOf":[{"type":"string","x-extensible-enum":["partial","full","none"]},{"type":"null"}]},"refund_count":{"type":"number"},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"order_id":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","order_id","amount","currency","reason","occurred_at"]}},"id":{"type":"string"},"number":{"type":"number"},"currency":{"type":"string"},"exponent":{"anyOf":[{"type":"number"},{"type":"null"}]},"amount":{"type":"number"},"discount":{"type":"number"},"total":{"type":"number"},"source":{"type":"string","x-extensible-enum":["checkout","api","manual"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"statements":{"type":"object","properties":{"coupon":{"anyOf":[{"type":"string"},{"type":"null"}]},"method":{"anyOf":[{"type":"string"},{"type":"null"}]},"method_details":{"anyOf":[{"type":"object","properties":{"brand":{"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["brand","last4"]},{"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"}]},"under_minimum":{"anyOf":[{"type":"object","properties":{"processor":{"type":"string","const":"stripe"},"amount":{"description":"What the cart came to before it was waived.","type":"number"},"minimum":{"description":"Null when the processor refused the payment as too small rather than core reading its minimum.","anyOf":[{"type":"number"},{"type":"null"}]}},"required":["processor","amount","minimum"]},{"type":"null"}]}},"required":["coupon","method","method_details","refund_waiver","under_minimum"]},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["renewed_subscription_ids","has_receipt","item_count","items","refunded","refund_status","refund_count","refunds","id","number","currency","exponent","amount","discount","total","source","note","statements","occurred_at"]}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","cursor"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/orders/{order}":{"get":{"operationId":"getOrder","summary":"Reads one of the customer's orders.","tags":["order"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"order","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Reads one of the customer's orders.","content":{"application/json":{"schema":{"type":"object","properties":{"renewed_subscription_ids":{"description":"The subscriptions it paid a later period of; empty for a first purchase, an upgrade or a fresh start.","type":"array","items":{"type":"string"}},"has_receipt":{"type":"boolean"},"item_count":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"product":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"path":{"description":"The product's storefront path, or null once deleted, since another product may take its slug.","anyOf":[{"type":"string"},{"type":"null"}]},"url":{"description":"The absolute URL on the store's verified hostname, or null before it has one or once deleted.","anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"category":{"type":"string"},"deleted":{"type":"boolean"}},"required":["id","slug","path","url","title","category","deleted"]},{"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"},"amount":{"type":"number"},"discount":{"type":"number"},"total":{"type":"number"},"descriptor":{"type":"object","properties":{"product":{"anyOf":[{"type":"string"},{"type":"null"}]},"price":{"anyOf":[{"type":"string"},{"type":"null"}]},"tier":{"anyOf":[{"type":"string"},{"type":"null"}]},"coupon":{"anyOf":[{"type":"string"},{"type":"null"}]},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["product","price","tier","coupon","display_name","message"]}},"required":["product","id","order_id","product_id","tier_id","price_id","position","quantity","amount","discount","total","descriptor"]}},"refunded":{"description":"Every refund summed, past the preview.","type":"number"},"refund_status":{"description":"How much of what it settled came back: none, part or all of it; null while it settled and refunded nothing.","anyOf":[{"type":"string","x-extensible-enum":["partial","full","none"]},{"type":"null"}]},"refund_count":{"type":"number"},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"order_id":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","order_id","amount","currency","reason","occurred_at"]}},"id":{"type":"string"},"number":{"type":"number"},"currency":{"type":"string"},"exponent":{"anyOf":[{"type":"number"},{"type":"null"}]},"amount":{"type":"number"},"discount":{"type":"number"},"total":{"type":"number"},"source":{"type":"string","x-extensible-enum":["checkout","api","manual"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"statements":{"type":"object","properties":{"coupon":{"anyOf":[{"type":"string"},{"type":"null"}]},"method":{"anyOf":[{"type":"string"},{"type":"null"}]},"method_details":{"anyOf":[{"type":"object","properties":{"brand":{"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["brand","last4"]},{"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"}]},"under_minimum":{"anyOf":[{"type":"object","properties":{"processor":{"type":"string","const":"stripe"},"amount":{"description":"What the cart came to before it was waived.","type":"number"},"minimum":{"description":"Null when the processor refused the payment as too small rather than core reading its minimum.","anyOf":[{"type":"number"},{"type":"null"}]}},"required":["processor","amount","minimum"]},{"type":"null"}]}},"required":["coupon","method","method_details","refund_waiver","under_minimum"]},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["renewed_subscription_ids","has_receipt","item_count","items","refunded","refund_status","refund_count","refunds","id","number","currency","exponent","amount","discount","total","source","note","statements","occurred_at"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/orders/{order}/receipt":{"get":{"operationId":"getOrderReceipt","summary":"Links the receipt of one of the customer's paid orders, a link that expires.","tags":["order"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"order","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Links the receipt of one of the customer's paid orders, a link that expires.","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","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":["order"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","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","maxLength":8192}},{"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":{"total":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"product":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"path":{"description":"The product's storefront path, or null once deleted, since another product may take its slug.","anyOf":[{"type":"string"},{"type":"null"}]},"url":{"description":"The absolute URL on the store's verified hostname, or null before it has one or once deleted.","anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"category":{"type":"string"},"deleted":{"type":"boolean"}},"required":["id","slug","path","url","title","category","deleted"]},{"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"},"amount":{"type":"number"},"discount":{"type":"number"},"total":{"type":"number"},"descriptor":{"type":"object","properties":{"product":{"anyOf":[{"type":"string"},{"type":"null"}]},"price":{"anyOf":[{"type":"string"},{"type":"null"}]},"tier":{"anyOf":[{"type":"string"},{"type":"null"}]},"coupon":{"anyOf":[{"type":"string"},{"type":"null"}]},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["product","price","tier","coupon","display_name","message"]}},"required":["product","id","order_id","product_id","tier_id","price_id","position","quantity","amount","discount","total","descriptor"]}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"currency":{"type":"string"},"exponent":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["items","cursor","currency","exponent"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","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":["order"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","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","maxLength":8192}},{"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":{"total":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"order_id":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","order_id","amount","currency","reason","occurred_at"]}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"currency":{"type":"string"},"exponent":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["items","cursor","currency","exponent"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/subscriptions":{"get":{"operationId":"listSubscriptions","summary":"Pages the customer's subscriptions.","tags":["subscription"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","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","maxLength":8192}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Pages the customer'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":{"total":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"display_status":{"description":"Its status as people read it: `cancelling` while it bills and is set to stop.","type":"string","x-extensible-enum":["unpaid","active","past_due","paused","cancelled","ended","cancelling"]},"next_event":{"description":"What happens at the end of its latest paid period, as of the answer; null when nothing is ahead.","anyOf":[{"type":"object","properties":{"kind":{"type":"string","x-extensible-enum":["renews","ends","lapses"]},"at":{"type":"string"}},"required":["kind","at"]},{"type":"null"}]},"renews_on_card":{"description":"Whether the store holds its saved card for its renewals: billed here, renewing and not set to stop.","type":"boolean"},"actions":{"description":"The moves the store offers on it as of the answer, billed here and still renewing; a write still decides again.","type":"object","properties":{"cancel":{"type":"object","properties":{"period_end":{"description":"Stopping at the period's end.","type":"boolean"},"now":{"description":"Its cancel ends it at once, every payment of it refunded.","type":"boolean"}},"required":["period_end","now"]},"resume":{"description":"Taking a stop back.","type":"boolean"},"change_plan":{"description":"Scheduling another plan from `plan_changes`, or keeping the current one.","type":"boolean"}},"required":["cancel","resume","change_plan"]},"plan_changes":{"description":"The prices `changeSubscriptionPlan` schedules for it, ordered as offers are; empty unless `actions.change_plan`.","type":"array","items":{"type":"object","properties":{"price_id":{"type":"string"},"name":{"description":"The price's title, else its tier's name.","type":"string"},"tier":{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"rank":{"type":"number"},"name":{"type":"string"}},"required":["id","product_id","rank","name"]},"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":{"description":"Whether the plan it schedules renews past its first period.","type":"boolean"}},"required":["price_id","name","tier","amount","currency","exponent","period","autorenew"]}},"product":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"path":{"description":"The product's storefront path, or null once deleted, since another product may take its slug.","anyOf":[{"type":"string"},{"type":"null"}]},"url":{"description":"The absolute URL on the store's verified hostname, or null before it has one or once deleted.","anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"category":{"type":"string"},"deleted":{"type":"boolean"}},"required":["id","slug","path","url","title","category","deleted"]},{"type":"null"}]},"plan":{"anyOf":[{"type":"object","properties":{"tier":{"description":"The tier its price sells; null once the price is gone.","anyOf":[{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"rank":{"type":"number"},"name":{"type":"string"}},"required":["id","product_id","rank","name"]},{"type":"null"}]},"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":["tier","id","price_id","amount","currency","exponent","period","autorenew"]},{"type":"null"}]},"current_period":{"description":"Its latest paid period, whose end is when the next payment is due; null when none is paid.","anyOf":[{"type":"object","properties":{"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"]},"lead_in":{"description":"A first period the customer's own grant covered, charged nothing; the plan's first charge pays the next.","type":"boolean"}},"required":["id","starts_at","ends_at","status","lead_in"]},{"type":"null"}]},"next_charge":{"description":"What its next payment charges and when, a day ahead of the period's end as every renewal is, on the plan it\nrenews on; null unless it renews. A `current_period` that is a `lead_in` makes it the first.","anyOf":[{"type":"object","properties":{"at":{"anyOf":[{"type":"string"},{"type":"null"}]},"amount":{"type":"number"},"currency":{"type":"string"},"exponent":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["at","amount","currency","exponent"]},{"type":"null"}]},"instrument_id":{"description":"The saved payment method its renewals charge, as `getBillingProfile` names it.","anyOf":[{"type":"string"},{"type":"null"}]},"renews_here":{"description":"Whether the store bills it here, so its plan and card can change.","type":"boolean"},"scheduled_change":{"description":"The plan it renews on from `effective_at`, the end of its paid run, as the customer scheduled; null for none.","anyOf":[{"type":"object","properties":{"plan":{"type":"object","properties":{"tier":{"description":"The tier its price sells; null once the price is gone.","anyOf":[{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"rank":{"type":"number"},"name":{"type":"string"}},"required":["id","product_id","rank","name"]},{"type":"null"}]},"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":["tier","id","price_id","amount","currency","exponent","period","autorenew"]},"effective_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["plan","effective_at"]},{"type":"null"}]},"id":{"type":"string"},"product_id":{"type":"string"},"status":{"type":"string","x-extensible-enum":["unpaid","active","past_due","paused","cancelled","ended"]},"cancel_at_period_end":{"type":"boolean"},"cancel_reason":{"description":"Why it stops or stopped, in the seller's or the customer's own words; null when no one gave one.","anyOf":[{"type":"string"},{"type":"null"}]},"cancel_code":{"description":"How the store stopped it, when no one gave a reason in words: `refund` (its payments were refunded), `dispute`\n(a payment was disputed), `upgraded` (an upgrade replaced it), `account_erased` (the customer's account was\nerased) or `seller_ended` (the seller ended it); null otherwise.","anyOf":[{"type":"string","x-extensible-enum":["refund","account_erased","dispute","seller_ended","upgraded"]},{"type":"null"}]},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["display_status","next_event","renews_on_card","actions","plan_changes","product","plan","current_period","next_charge","instrument_id","renews_here","scheduled_change","id","product_id","status","cancel_at_period_end","cancel_reason","cancel_code","created_at","ended_at"]}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","cursor"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","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 of the customer's subscriptions.","tags":["subscription"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"subscription","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Reads one of the customer's subscriptions.","content":{"application/json":{"schema":{"type":"object","properties":{"display_status":{"description":"Its status as people read it: `cancelling` while it bills and is set to stop.","type":"string","x-extensible-enum":["unpaid","active","past_due","paused","cancelled","ended","cancelling"]},"next_event":{"description":"What happens at the end of its latest paid period, as of the answer; null when nothing is ahead.","anyOf":[{"type":"object","properties":{"kind":{"type":"string","x-extensible-enum":["renews","ends","lapses"]},"at":{"type":"string"}},"required":["kind","at"]},{"type":"null"}]},"renews_on_card":{"description":"Whether the store holds its saved card for its renewals: billed here, renewing and not set to stop.","type":"boolean"},"actions":{"description":"The moves the store offers on it as of the answer, billed here and still renewing; a write still decides again.","type":"object","properties":{"cancel":{"type":"object","properties":{"period_end":{"description":"Stopping at the period's end.","type":"boolean"},"now":{"description":"Its cancel ends it at once, every payment of it refunded.","type":"boolean"}},"required":["period_end","now"]},"resume":{"description":"Taking a stop back.","type":"boolean"},"change_plan":{"description":"Scheduling another plan from `plan_changes`, or keeping the current one.","type":"boolean"}},"required":["cancel","resume","change_plan"]},"plan_changes":{"description":"The prices `changeSubscriptionPlan` schedules for it, ordered as offers are; empty unless `actions.change_plan`.","type":"array","items":{"type":"object","properties":{"price_id":{"type":"string"},"name":{"description":"The price's title, else its tier's name.","type":"string"},"tier":{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"rank":{"type":"number"},"name":{"type":"string"}},"required":["id","product_id","rank","name"]},"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":{"description":"Whether the plan it schedules renews past its first period.","type":"boolean"}},"required":["price_id","name","tier","amount","currency","exponent","period","autorenew"]}},"product":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"path":{"description":"The product's storefront path, or null once deleted, since another product may take its slug.","anyOf":[{"type":"string"},{"type":"null"}]},"url":{"description":"The absolute URL on the store's verified hostname, or null before it has one or once deleted.","anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"category":{"type":"string"},"deleted":{"type":"boolean"}},"required":["id","slug","path","url","title","category","deleted"]},{"type":"null"}]},"plan":{"anyOf":[{"type":"object","properties":{"tier":{"description":"The tier its price sells; null once the price is gone.","anyOf":[{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"rank":{"type":"number"},"name":{"type":"string"}},"required":["id","product_id","rank","name"]},{"type":"null"}]},"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":["tier","id","price_id","amount","currency","exponent","period","autorenew"]},{"type":"null"}]},"current_period":{"description":"Its latest paid period, whose end is when the next payment is due; null when none is paid.","anyOf":[{"type":"object","properties":{"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"]},"lead_in":{"description":"A first period the customer's own grant covered, charged nothing; the plan's first charge pays the next.","type":"boolean"}},"required":["id","starts_at","ends_at","status","lead_in"]},{"type":"null"}]},"next_charge":{"description":"What its next payment charges and when, a day ahead of the period's end as every renewal is, on the plan it\nrenews on; null unless it renews. A `current_period` that is a `lead_in` makes it the first.","anyOf":[{"type":"object","properties":{"at":{"anyOf":[{"type":"string"},{"type":"null"}]},"amount":{"type":"number"},"currency":{"type":"string"},"exponent":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["at","amount","currency","exponent"]},{"type":"null"}]},"instrument_id":{"description":"The saved payment method its renewals charge, as `getBillingProfile` names it.","anyOf":[{"type":"string"},{"type":"null"}]},"renews_here":{"description":"Whether the store bills it here, so its plan and card can change.","type":"boolean"},"scheduled_change":{"description":"The plan it renews on from `effective_at`, the end of its paid run, as the customer scheduled; null for none.","anyOf":[{"type":"object","properties":{"plan":{"type":"object","properties":{"tier":{"description":"The tier its price sells; null once the price is gone.","anyOf":[{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"rank":{"type":"number"},"name":{"type":"string"}},"required":["id","product_id","rank","name"]},{"type":"null"}]},"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":["tier","id","price_id","amount","currency","exponent","period","autorenew"]},"effective_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["plan","effective_at"]},{"type":"null"}]},"id":{"type":"string"},"product_id":{"type":"string"},"status":{"type":"string","x-extensible-enum":["unpaid","active","past_due","paused","cancelled","ended"]},"cancel_at_period_end":{"type":"boolean"},"cancel_reason":{"description":"Why it stops or stopped, in the seller's or the customer's own words; null when no one gave one.","anyOf":[{"type":"string"},{"type":"null"}]},"cancel_code":{"description":"How the store stopped it, when no one gave a reason in words: `refund` (its payments were refunded), `dispute`\n(a payment was disputed), `upgraded` (an upgrade replaced it), `account_erased` (the customer's account was\nerased) or `seller_ended` (the seller ended it); null otherwise.","anyOf":[{"type":"string","x-extensible-enum":["refund","account_erased","dispute","seller_ended","upgraded"]},{"type":"null"}]},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["display_status","next_event","renews_on_card","actions","plan_changes","product","plan","current_period","next_charge","instrument_id","renews_here","scheduled_change","id","product_id","status","cancel_at_period_end","cancel_reason","cancel_code","created_at","ended_at"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","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 at the end of its period, or at once when every payment of it was refunded.","tags":["subscription"],"security":[{"bearer":["subscription:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"subscription","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Cancels a subscription at the end of its period, or at once when every payment of it was refunded.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"display_status":{"description":"Its status as people read it: `cancelling` while it bills and is set to stop.","type":"string","x-extensible-enum":["unpaid","active","past_due","paused","cancelled","ended","cancelling"]},"next_event":{"description":"What happens at the end of its latest paid period, as of the answer; null when nothing is ahead.","anyOf":[{"type":"object","properties":{"kind":{"type":"string","x-extensible-enum":["renews","ends","lapses"]},"at":{"type":"string"}},"required":["kind","at"]},{"type":"null"}]},"renews_on_card":{"description":"Whether the store holds its saved card for its renewals: billed here, renewing and not set to stop.","type":"boolean"},"actions":{"description":"The moves the store offers on it as of the answer, billed here and still renewing; a write still decides again.","type":"object","properties":{"cancel":{"type":"object","properties":{"period_end":{"description":"Stopping at the period's end.","type":"boolean"},"now":{"description":"Its cancel ends it at once, every payment of it refunded.","type":"boolean"}},"required":["period_end","now"]},"resume":{"description":"Taking a stop back.","type":"boolean"},"change_plan":{"description":"Scheduling another plan from `plan_changes`, or keeping the current one.","type":"boolean"}},"required":["cancel","resume","change_plan"]},"plan_changes":{"description":"The prices `changeSubscriptionPlan` schedules for it, ordered as offers are; empty unless `actions.change_plan`.","type":"array","items":{"type":"object","properties":{"price_id":{"type":"string"},"name":{"description":"The price's title, else its tier's name.","type":"string"},"tier":{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"rank":{"type":"number"},"name":{"type":"string"}},"required":["id","product_id","rank","name"]},"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":{"description":"Whether the plan it schedules renews past its first period.","type":"boolean"}},"required":["price_id","name","tier","amount","currency","exponent","period","autorenew"]}},"product":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"path":{"description":"The product's storefront path, or null once deleted, since another product may take its slug.","anyOf":[{"type":"string"},{"type":"null"}]},"url":{"description":"The absolute URL on the store's verified hostname, or null before it has one or once deleted.","anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"category":{"type":"string"},"deleted":{"type":"boolean"}},"required":["id","slug","path","url","title","category","deleted"]},{"type":"null"}]},"plan":{"anyOf":[{"type":"object","properties":{"tier":{"description":"The tier its price sells; null once the price is gone.","anyOf":[{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"rank":{"type":"number"},"name":{"type":"string"}},"required":["id","product_id","rank","name"]},{"type":"null"}]},"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":["tier","id","price_id","amount","currency","exponent","period","autorenew"]},{"type":"null"}]},"current_period":{"description":"Its latest paid period, whose end is when the next payment is due; null when none is paid.","anyOf":[{"type":"object","properties":{"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"]},"lead_in":{"description":"A first period the customer's own grant covered, charged nothing; the plan's first charge pays the next.","type":"boolean"}},"required":["id","starts_at","ends_at","status","lead_in"]},{"type":"null"}]},"next_charge":{"description":"What its next payment charges and when, a day ahead of the period's end as every renewal is, on the plan it\nrenews on; null unless it renews. A `current_period` that is a `lead_in` makes it the first.","anyOf":[{"type":"object","properties":{"at":{"anyOf":[{"type":"string"},{"type":"null"}]},"amount":{"type":"number"},"currency":{"type":"string"},"exponent":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["at","amount","currency","exponent"]},{"type":"null"}]},"instrument_id":{"description":"The saved payment method its renewals charge, as `getBillingProfile` names it.","anyOf":[{"type":"string"},{"type":"null"}]},"renews_here":{"description":"Whether the store bills it here, so its plan and card can change.","type":"boolean"},"scheduled_change":{"description":"The plan it renews on from `effective_at`, the end of its paid run, as the customer scheduled; null for none.","anyOf":[{"type":"object","properties":{"plan":{"type":"object","properties":{"tier":{"description":"The tier its price sells; null once the price is gone.","anyOf":[{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"rank":{"type":"number"},"name":{"type":"string"}},"required":["id","product_id","rank","name"]},{"type":"null"}]},"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":["tier","id","price_id","amount","currency","exponent","period","autorenew"]},"effective_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["plan","effective_at"]},{"type":"null"}]},"id":{"type":"string"},"product_id":{"type":"string"},"status":{"type":"string","x-extensible-enum":["unpaid","active","past_due","paused","cancelled","ended"]},"cancel_at_period_end":{"type":"boolean"},"cancel_reason":{"description":"Why it stops or stopped, in the seller's or the customer's own words; null when no one gave one.","anyOf":[{"type":"string"},{"type":"null"}]},"cancel_code":{"description":"How the store stopped it, when no one gave a reason in words: `refund` (its payments were refunded), `dispute`\n(a payment was disputed), `upgraded` (an upgrade replaced it), `account_erased` (the customer's account was\nerased) or `seller_ended` (the seller ended it); null otherwise.","anyOf":[{"type":"string","x-extensible-enum":["refund","account_erased","dispute","seller_ended","upgraded"]},{"type":"null"}]},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["display_status","next_event","renews_on_card","actions","plan_changes","product","plan","current_period","next_charge","instrument_id","renews_here","scheduled_change","id","product_id","status","cancel_at_period_end","cancel_reason","cancel_code","created_at","ended_at"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"description":"Why, in your own words; one of the codes the store writes itself as a reason (`refund`, `dispute`, `upgraded`, `account_erased`, `Ended by the seller.` and the like) is refused.","type":"string","minLength":1,"maxLength":500}},"additionalProperties":false}}}}}},"/v1/stores/{store}/subscriptions/{subscription}/resume":{"post":{"operationId":"resumeSubscription","summary":"Withdraws a subscription's scheduled cancellation; one whose saved card is gone renews on the default card, or the only one saved. Refused to an app the store hasn't verified: send the customer to /account/subscriptions on the store's site.","tags":["subscription"],"security":[{"bearer":["subscription:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"subscription","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Withdraws a subscription's scheduled cancellation; one whose saved card is gone renews on the default card, or the only one saved. Refused to an app the store hasn't verified: send the customer to /account/subscriptions on the store's site.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"display_status":{"description":"Its status as people read it: `cancelling` while it bills and is set to stop.","type":"string","x-extensible-enum":["unpaid","active","past_due","paused","cancelled","ended","cancelling"]},"next_event":{"description":"What happens at the end of its latest paid period, as of the answer; null when nothing is ahead.","anyOf":[{"type":"object","properties":{"kind":{"type":"string","x-extensible-enum":["renews","ends","lapses"]},"at":{"type":"string"}},"required":["kind","at"]},{"type":"null"}]},"renews_on_card":{"description":"Whether the store holds its saved card for its renewals: billed here, renewing and not set to stop.","type":"boolean"},"actions":{"description":"The moves the store offers on it as of the answer, billed here and still renewing; a write still decides again.","type":"object","properties":{"cancel":{"type":"object","properties":{"period_end":{"description":"Stopping at the period's end.","type":"boolean"},"now":{"description":"Its cancel ends it at once, every payment of it refunded.","type":"boolean"}},"required":["period_end","now"]},"resume":{"description":"Taking a stop back.","type":"boolean"},"change_plan":{"description":"Scheduling another plan from `plan_changes`, or keeping the current one.","type":"boolean"}},"required":["cancel","resume","change_plan"]},"plan_changes":{"description":"The prices `changeSubscriptionPlan` schedules for it, ordered as offers are; empty unless `actions.change_plan`.","type":"array","items":{"type":"object","properties":{"price_id":{"type":"string"},"name":{"description":"The price's title, else its tier's name.","type":"string"},"tier":{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"rank":{"type":"number"},"name":{"type":"string"}},"required":["id","product_id","rank","name"]},"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":{"description":"Whether the plan it schedules renews past its first period.","type":"boolean"}},"required":["price_id","name","tier","amount","currency","exponent","period","autorenew"]}},"product":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"path":{"description":"The product's storefront path, or null once deleted, since another product may take its slug.","anyOf":[{"type":"string"},{"type":"null"}]},"url":{"description":"The absolute URL on the store's verified hostname, or null before it has one or once deleted.","anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"category":{"type":"string"},"deleted":{"type":"boolean"}},"required":["id","slug","path","url","title","category","deleted"]},{"type":"null"}]},"plan":{"anyOf":[{"type":"object","properties":{"tier":{"description":"The tier its price sells; null once the price is gone.","anyOf":[{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"rank":{"type":"number"},"name":{"type":"string"}},"required":["id","product_id","rank","name"]},{"type":"null"}]},"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":["tier","id","price_id","amount","currency","exponent","period","autorenew"]},{"type":"null"}]},"current_period":{"description":"Its latest paid period, whose end is when the next payment is due; null when none is paid.","anyOf":[{"type":"object","properties":{"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"]},"lead_in":{"description":"A first period the customer's own grant covered, charged nothing; the plan's first charge pays the next.","type":"boolean"}},"required":["id","starts_at","ends_at","status","lead_in"]},{"type":"null"}]},"next_charge":{"description":"What its next payment charges and when, a day ahead of the period's end as every renewal is, on the plan it\nrenews on; null unless it renews. A `current_period` that is a `lead_in` makes it the first.","anyOf":[{"type":"object","properties":{"at":{"anyOf":[{"type":"string"},{"type":"null"}]},"amount":{"type":"number"},"currency":{"type":"string"},"exponent":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["at","amount","currency","exponent"]},{"type":"null"}]},"instrument_id":{"description":"The saved payment method its renewals charge, as `getBillingProfile` names it.","anyOf":[{"type":"string"},{"type":"null"}]},"renews_here":{"description":"Whether the store bills it here, so its plan and card can change.","type":"boolean"},"scheduled_change":{"description":"The plan it renews on from `effective_at`, the end of its paid run, as the customer scheduled; null for none.","anyOf":[{"type":"object","properties":{"plan":{"type":"object","properties":{"tier":{"description":"The tier its price sells; null once the price is gone.","anyOf":[{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"rank":{"type":"number"},"name":{"type":"string"}},"required":["id","product_id","rank","name"]},{"type":"null"}]},"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":["tier","id","price_id","amount","currency","exponent","period","autorenew"]},"effective_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["plan","effective_at"]},{"type":"null"}]},"id":{"type":"string"},"product_id":{"type":"string"},"status":{"type":"string","x-extensible-enum":["unpaid","active","past_due","paused","cancelled","ended"]},"cancel_at_period_end":{"type":"boolean"},"cancel_reason":{"description":"Why it stops or stopped, in the seller's or the customer's own words; null when no one gave one.","anyOf":[{"type":"string"},{"type":"null"}]},"cancel_code":{"description":"How the store stopped it, when no one gave a reason in words: `refund` (its payments were refunded), `dispute`\n(a payment was disputed), `upgraded` (an upgrade replaced it), `account_erased` (the customer's account was\nerased) or `seller_ended` (the seller ended it); null otherwise.","anyOf":[{"type":"string","x-extensible-enum":["refund","account_erased","dispute","seller_ended","upgraded"]},{"type":"null"}]},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["display_status","next_event","renews_on_card","actions","plan_changes","product","plan","current_period","next_charge","instrument_id","renews_here","scheduled_change","id","product_id","status","cancel_at_period_end","cancel_reason","cancel_code","created_at","ended_at"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","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}/subscriptions/{subscription}/plan":{"put":{"operationId":"changeSubscriptionPlan","summary":"Schedules a subscription to renew on a lower tier or a shorter period from the end of its paid period; its current price takes the change back. Refused to an app the store hasn't verified: send the customer to /account/subscriptions on the store's site.","tags":["subscription"],"security":[{"bearer":["subscription:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"subscription","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Schedules a subscription to renew on a lower tier or a shorter period from the end of its paid period; its current price takes the change back. Refused to an app the store hasn't verified: send the customer to /account/subscriptions on the store's site.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"display_status":{"description":"Its status as people read it: `cancelling` while it bills and is set to stop.","type":"string","x-extensible-enum":["unpaid","active","past_due","paused","cancelled","ended","cancelling"]},"next_event":{"description":"What happens at the end of its latest paid period, as of the answer; null when nothing is ahead.","anyOf":[{"type":"object","properties":{"kind":{"type":"string","x-extensible-enum":["renews","ends","lapses"]},"at":{"type":"string"}},"required":["kind","at"]},{"type":"null"}]},"renews_on_card":{"description":"Whether the store holds its saved card for its renewals: billed here, renewing and not set to stop.","type":"boolean"},"actions":{"description":"The moves the store offers on it as of the answer, billed here and still renewing; a write still decides again.","type":"object","properties":{"cancel":{"type":"object","properties":{"period_end":{"description":"Stopping at the period's end.","type":"boolean"},"now":{"description":"Its cancel ends it at once, every payment of it refunded.","type":"boolean"}},"required":["period_end","now"]},"resume":{"description":"Taking a stop back.","type":"boolean"},"change_plan":{"description":"Scheduling another plan from `plan_changes`, or keeping the current one.","type":"boolean"}},"required":["cancel","resume","change_plan"]},"plan_changes":{"description":"The prices `changeSubscriptionPlan` schedules for it, ordered as offers are; empty unless `actions.change_plan`.","type":"array","items":{"type":"object","properties":{"price_id":{"type":"string"},"name":{"description":"The price's title, else its tier's name.","type":"string"},"tier":{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"rank":{"type":"number"},"name":{"type":"string"}},"required":["id","product_id","rank","name"]},"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":{"description":"Whether the plan it schedules renews past its first period.","type":"boolean"}},"required":["price_id","name","tier","amount","currency","exponent","period","autorenew"]}},"product":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"path":{"description":"The product's storefront path, or null once deleted, since another product may take its slug.","anyOf":[{"type":"string"},{"type":"null"}]},"url":{"description":"The absolute URL on the store's verified hostname, or null before it has one or once deleted.","anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"category":{"type":"string"},"deleted":{"type":"boolean"}},"required":["id","slug","path","url","title","category","deleted"]},{"type":"null"}]},"plan":{"anyOf":[{"type":"object","properties":{"tier":{"description":"The tier its price sells; null once the price is gone.","anyOf":[{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"rank":{"type":"number"},"name":{"type":"string"}},"required":["id","product_id","rank","name"]},{"type":"null"}]},"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":["tier","id","price_id","amount","currency","exponent","period","autorenew"]},{"type":"null"}]},"current_period":{"description":"Its latest paid period, whose end is when the next payment is due; null when none is paid.","anyOf":[{"type":"object","properties":{"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"]},"lead_in":{"description":"A first period the customer's own grant covered, charged nothing; the plan's first charge pays the next.","type":"boolean"}},"required":["id","starts_at","ends_at","status","lead_in"]},{"type":"null"}]},"next_charge":{"description":"What its next payment charges and when, a day ahead of the period's end as every renewal is, on the plan it\nrenews on; null unless it renews. A `current_period` that is a `lead_in` makes it the first.","anyOf":[{"type":"object","properties":{"at":{"anyOf":[{"type":"string"},{"type":"null"}]},"amount":{"type":"number"},"currency":{"type":"string"},"exponent":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["at","amount","currency","exponent"]},{"type":"null"}]},"instrument_id":{"description":"The saved payment method its renewals charge, as `getBillingProfile` names it.","anyOf":[{"type":"string"},{"type":"null"}]},"renews_here":{"description":"Whether the store bills it here, so its plan and card can change.","type":"boolean"},"scheduled_change":{"description":"The plan it renews on from `effective_at`, the end of its paid run, as the customer scheduled; null for none.","anyOf":[{"type":"object","properties":{"plan":{"type":"object","properties":{"tier":{"description":"The tier its price sells; null once the price is gone.","anyOf":[{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"rank":{"type":"number"},"name":{"type":"string"}},"required":["id","product_id","rank","name"]},{"type":"null"}]},"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":["tier","id","price_id","amount","currency","exponent","period","autorenew"]},"effective_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["plan","effective_at"]},{"type":"null"}]},"id":{"type":"string"},"product_id":{"type":"string"},"status":{"type":"string","x-extensible-enum":["unpaid","active","past_due","paused","cancelled","ended"]},"cancel_at_period_end":{"type":"boolean"},"cancel_reason":{"description":"Why it stops or stopped, in the seller's or the customer's own words; null when no one gave one.","anyOf":[{"type":"string"},{"type":"null"}]},"cancel_code":{"description":"How the store stopped it, when no one gave a reason in words: `refund` (its payments were refunded), `dispute`\n(a payment was disputed), `upgraded` (an upgrade replaced it), `account_erased` (the customer's account was\nerased) or `seller_ended` (the seller ended it); null otherwise.","anyOf":[{"type":"string","x-extensible-enum":["refund","account_erased","dispute","seller_ended","upgraded"]},{"type":"null"}]},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["display_status","next_event","renews_on_card","actions","plan_changes","product","plan","current_period","next_charge","instrument_id","renews_here","scheduled_change","id","product_id","status","cancel_at_period_end","cancel_reason","cancel_code","created_at","ended_at"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"price":{"description":"The price it renews on from the end of its paid period; its current price takes a scheduled change back.","type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":512}},"required":["id"],"additionalProperties":false}},"required":["price"],"additionalProperties":false}}}}}},"/v1/stores/{store}/grants":{"get":{"operationId":"listGrants","summary":"Pages the customer's grants of access.","tags":["grant"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","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","maxLength":8192}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Pages the customer's grants of access.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"tier":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"rank":{"type":"number"},"name":{"type":"string"}},"required":["id","product_id","rank","name"]},{"type":"null"}]},"id":{"type":"string"},"product_id":{"type":"string"},"tier_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"source_kind":{"type":"string","x-extensible-enum":["checkout","api","manual","subscription","payment","automation"]},"valid_from":{"anyOf":[{"type":"string"},{"type":"null"}]},"ends_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"end_reason":{"anyOf":[{"type":"string","x-extensible-enum":["manual","lapse","refund"]},{"type":"null"}]},"status":{"description":"Where it stands now: not begun, standing, or how it ended.","type":"string","x-extensible-enum":["scheduled","active","expired","ended","revoked","refunded"]}},"required":["tier","id","product_id","tier_id","source_kind","valid_from","ends_at","end_reason","status"]}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","cursor"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/entitlements":{"get":{"operationId":"listEntitlements","summary":"Pages what the customer may reach.","tags":["entitlement"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","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":["product","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","maxLength":8192}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Pages what the customer may reach.","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_id":{"type":"string"},"tier_rank":{"type":"number"},"tier_expires_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"held":{"type":"boolean"},"order":{"description":"The caller's order behind the highest standing grant that came from one; null when none did, as with a grant by hand.","anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"}},"required":["id","number"]},{"type":"null"}]},"renews_at":{"description":"When a subscription of the product next renews; null when none will.","anyOf":[{"type":"string"},{"type":"null"}]},"given_by":{"description":"For an event ticket someone else bought the caller as their guest: who; null otherwise.","anyOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name"]},{"type":"null"}]},"attending":{"description":"Whether the caller is going to the event, a ticket with no tier included; false for any other product.","type":"boolean"},"ticket":{"description":"The caller's ticket to the event as its grants read now: whether it lets them in, why not, and its type; null for any other product, and for a moment after a first ticket while it is listed, even with `attending` already true.","anyOf":[{"type":"object","properties":{"status":{"type":"string","x-extensible-enum":["pending","going","waitlisted","canceled"]},"cancel_reason":{"anyOf":[{"type":"string","x-extensible-enum":["expired","revoked","refunded","canceled","declined"]},{"type":"null"}]},"tier":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"rank":{"type":"number"}},"required":["id","name","rank"]},{"type":"null"}]}},"required":["status","cancel_reason","tier"]},{"type":"null"}]}},"required":["product_id","tier_rank","tier_expires_at","expires_at","held","order","renews_at","given_by","attending","ticket"]}},"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://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/reviews":{"get":{"operationId":"listReviews","summary":"Pages a product's reviews.","tags":["review"],"security":[{"bearer":["read"]},{"publishableKey":[]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","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":["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","maxLength":8192}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Pages a product's 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":{"mine":{"type":"boolean"},"hidden_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"product_id":{"type":"string"},"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"}]},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_at":{"description":"When the customer last edited it; null until they do.","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["mine","hidden_at","id","product_id","rating","username","notes","reply","replied_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://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/ticket":{"get":{"operationId":"getTicket","summary":"Reads the customer's ticket to an event: its code for the door's QR code, its status and type, and the sessions it let them in at.","tags":["ticket"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Reads the customer's ticket to an event: its code for the door's QR code, its status and type, and the sessions it let them in at.","content":{"application/json":{"schema":{"type":"object","properties":{"product_id":{"type":"string"},"ticket_code":{"description":"What the ticket's QR code holds, shown at the door; null while a code is still being minted.","anyOf":[{"type":"string"},{"type":"null"}]},"status":{"description":"`going` while it lets them in, `pending` or `waitlisted` while their request waits, `canceled` once it no longer does.","type":"string","x-extensible-enum":["pending","going","waitlisted","canceled"]},"cancel_reason":{"description":"Why it no longer lets them in: `refunded`, `revoked`, `expired`, `declined`, or `canceled` when the seller canceled the event; null unless canceled.","anyOf":[{"type":"string","x-extensible-enum":["expired","revoked","refunded","canceled","declined"]},{"type":"null"}]},"canceled_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"tier":{"description":"Their ticket type; null for access with no tier.","anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"rank":{"type":"number"}},"required":["id","name","rank"]},{"type":"null"}]},"registered_at":{"type":"string"},"check_ins":{"description":"The sessions it let them in at, earliest first.","type":"array","items":{"type":"object","properties":{"session_id":{"type":"string"},"checked_in_at":{"type":"string"}},"required":["session_id","checked_in_at"]}}},"required":["product_id","ticket_code","status","cancel_reason","canceled_at","tier","registered_at","check_ins"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/review":{"get":{"operationId":"getReview","summary":"Reads the customer's own review of a product.","tags":["review"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Reads the customer's own review of a product.","content":{"application/json":{"schema":{"type":"object","properties":{"mine":{"type":"boolean"},"hidden_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"product_id":{"type":"string"},"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"}]},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_at":{"description":"When the customer last edited it; null until they do.","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["mine","hidden_at","id","product_id","rating","username","notes","reply","replied_at","created_at","updated_at"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"put":{"operationId":"writeReview","summary":"Writes or updates the customer's review of a product.","tags":["review"],"security":[{"bearer":["review:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Writes or updates the customer's review of a product.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"mine":{"type":"boolean"},"hidden_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"product_id":{"type":"string"},"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"}]},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_at":{"description":"When the customer last edited it; null until they do.","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["mine","hidden_at","id","product_id","rating","username","notes","reply","replied_at","created_at","updated_at"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rating":{"type":"integer","minimum":1,"maximum":5},"notes":{"anyOf":[{"type":"string","minLength":1,"maxLength":4000},{"type":"null"}]},"username":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}]}},"required":["rating"],"additionalProperties":false}}}}},"delete":{"operationId":"deleteReview","summary":"Deletes the customer's review.","tags":["review"],"security":[{"bearer":["review:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Deletes the customer's review.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true}},"required":["deleted"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/guests":{"get":{"operationId":"listEventGuests","summary":"Lists the guests the customer bought an event's tickets for, and whether each opened theirs.","tags":["event"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Lists the guests the customer bought an event's tickets for, and whether each opened theirs.","content":{"application/json":{"schema":{"type":"object","properties":{"guests":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"order_id":{"type":"string"},"order_item_id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"description":"`active` while theirs, `refunded` once a refund ended it.","type":"string","x-extensible-enum":["active","refunded","changed"]},"opened_at":{"description":"When they signed in holding it, else first were let in at the door; null while neither.","anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"changeable":{"description":"Whether the buyer may still hand it to someone else: before its guest opened it, before the event starts, and while it stands.","type":"boolean"},"resendable":{"description":"Whether the buyer may send its mail again; never once the event is canceled.","type":"boolean"}},"required":["id","product_id","order_id","order_item_id","name","email","status","opened_at","created_at","ended_at","changeable","resendable"]}},"attending":{"description":"Whether the caller is on the event's guest list themselves.","type":"boolean"},"lines":{"description":"Each line of the caller's orders of the event, oldest first.","type":"array","items":{"type":"object","properties":{"order_item_id":{"type":"string"},"buyer_ticket":{"description":"Whether the line kept one of its tickets for the buyer; one naming a guest for every ticket keeps none.","type":"boolean"}},"required":["order_item_id","buyer_ticket"]}}},"required":["guests","attending","lines"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/guests/{guest}":{"put":{"operationId":"changeEventGuest","summary":"Hands a ticket the customer bought to someone else, before its guest opened it and before the event starts; the old guest's ticket ends.","tags":["checkout"],"security":[{"bearer":["checkout:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"guest","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Hands a ticket the customer bought to someone else, before its guest opened it and before the event starts; the old guest's ticket ends.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"order_id":{"type":"string"},"order_item_id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"description":"`active` while theirs, `refunded` once a refund ended it.","type":"string","x-extensible-enum":["active","refunded","changed"]},"opened_at":{"description":"When they signed in holding it, else first were let in at the door; null while neither.","anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"changeable":{"description":"Whether the buyer may still hand it to someone else: before its guest opened it, before the event starts, and while it stands.","type":"boolean"},"resendable":{"description":"Whether the buyer may send its mail again; never once the event is canceled.","type":"boolean"}},"required":["id","product_id","order_id","order_item_id","name","email","status","opened_at","created_at","ended_at","changeable","resendable"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"description":"Who takes the ticket now.","type":"string","minLength":3,"maxLength":254},"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]}},"required":["email"],"additionalProperties":false}}}}}},"/v1/stores/{store}/products/{product}/guests/{guest}/resend":{"post":{"operationId":"resendEventGuestTicket","summary":"Sends a guest their ticket's mail again; a burst sends one, and a guest gets a few a day at most.","tags":["checkout"],"security":[{"bearer":["checkout:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"guest","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Sends a guest their ticket's mail again; a burst sends one, and a guest gets a few a day at most.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"order_id":{"type":"string"},"order_item_id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"description":"`active` while theirs, `refunded` once a refund ended it.","type":"string","x-extensible-enum":["active","refunded","changed"]},"opened_at":{"description":"When they signed in holding it, else first were let in at the door; null while neither.","anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"changeable":{"description":"Whether the buyer may still hand it to someone else: before its guest opened it, before the event starts, and while it stands.","type":"boolean"},"resendable":{"description":"Whether the buyer may send its mail again; never once the event is canceled.","type":"boolean"}},"required":["id","product_id","order_id","order_item_id","name","email","status","opened_at","created_at","ended_at","changeable","resendable"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","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/{entry}/quizzes/{quiz}/attempts":{"post":{"operationId":"startAttempt","summary":"Starts an attempt at a quiz, or resumes the open one, until the quiz is over: given up, its attempts used, or one attempt scored 100.","tags":["quiz"],"security":[{"bearer":["quiz:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"entry","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"quiz","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Starts an attempt at a quiz, or resumes the open one, until the quiz is over: given up, its attempts used, or one attempt scored 100.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"attempt":{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"quiz_id":{"type":"string"},"entry_id":{"type":"string"},"attempt":{"type":"number"},"status":{"type":"string","x-extensible-enum":["failed","started","submitted","passed","forfeited"]},"score":{"anyOf":[{"type":"number"},{"type":"null"}]},"correct":{"anyOf":[{"type":"number"},{"type":"null"}]},"started_at":{"type":"string"},"finished_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]}},"required":["id","product_id","quiz_id","entry_id","attempt","status","score","correct","started_at","finished_at","access"]},"questions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"},"question":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"description":"A static text's text, in the rich text format as stored.","anyOf":[{"type":"string"},{"type":"null"}],"x-rich-text":"text"},"options":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"}},"required":["id","text"]}},{"type":"null"}]},"min":{"anyOf":[{"type":"number"},{"type":"null"}]},"max":{"anyOf":[{"type":"number"},{"type":"null"}]},"weight":{"anyOf":[{"type":"number"},{"type":"null"}]},"hint":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","id","question","content","options","min","max","weight","hint"]}},"attachments":{"type":"array","items":{"type":"object","properties":{"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the video's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads beside the video or audio file.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]},"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"]},"preview_only":{"type":"boolean"},"from_body":{"description":"Named by its target's body text, rather than the target's own media (a lesson's video or slides).","type":"boolean"},"position":{"type":"number"},"asset":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"ext":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime":{"anyOf":[{"type":"string"},{"type":"null"}]},"bytes":{"description":"The file's size in bytes, null when it has none or is withheld.","anyOf":[{"type":"number"},{"type":"null"}]},"enforcement":{"type":"string","x-extensible-enum":["public","external","signed"]},"locator":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"type":"object","properties":{"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"duration":{"anyOf":[{"type":"number"},{"type":"null"}]},"pages":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["width","height","duration","pages"]},"status":{"type":"string","x-extensible-enum":["pending","ready","failed"]}},"required":["id","name","title","ext","description","mime","bytes","enforcement","locator","metadata","status"]}},"required":["tracks","outputs","access","id","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":{"description":"The file's size in bytes, null when it has none or is withheld.","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"]},"url":{"description":"A public file's lasting URL, an image's naming its widths' version as `#v=` once they're made; null for a private one, or one whose bytes haven't landed.","anyOf":[{"type":"string"},{"type":"null"}]},"resized":{"description":"A public image's smaller copies, narrowest first, for a `srcset`; left out until they're made and its width measured, for one kept as uploaded, and for any other file.","type":"array","items":{"type":"object","properties":{"width":{"description":"Its width in pixels, at most the image's own.","type":"integer","minimum":1},"avif":{"description":"A lasting URL to it as AVIF.","type":"string"},"webp":{"description":"A lasting URL to it as WebP.","type":"string"}},"required":["width","avif","webp"]}},"attachment_id":{"description":"The binding a private file opens through; null when the reader can't open it.","anyOf":[{"type":"string"},{"type":"null"}]},"unlocks":{"description":"What unlocks a file its own rules keep from the reader, any one; null for any other file.","anyOf":[{"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string"},"product_name":{"type":"string"},"tier":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"rank":{"type":"number"}},"required":["id","name","rank"]},{"type":"null"}]}},"required":["product_id","product_name","tier"]}},{"type":"null"}]},"video":{"description":"A video's subtitles and published AI outputs, where its read lists any and the reader may play it.","type":"object","properties":{"attachment_id":{"type":"string"},"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the file's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}}},"required":["attachment_id","tracks","outputs"]},"audio":{"description":"An audio file's waveform, subtitles and published AI outputs, where the reader may play it.","type":"object","properties":{"waveform":{"description":"256 levels from 0 to 255, base64, from the file's start to its end; null until drawn, or when it can't be.","anyOf":[{"type":"string"},{"type":"null"}]},"attachment_id":{"description":"The binding its tracks and outputs open through, which a public file carries here alone; null with none.","anyOf":[{"type":"string"},{"type":"null"}]},"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the file's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}}},"required":["waveform","attachment_id","tracks","outputs"]}},"required":["id","kind","mime","name","bytes","width","height","duration","pages","status","url","attachment_id","unlocks"]}},"answers":{"type":"object","properties":{},"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"type":"null"}]}}},"required":["attempt","questions","attachments","files","answers"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"preview":{"description":"A token a seller made for the quiz's product's page, which opens the quiz of a published entry of the product unpublished, or for the quiz's entry, which opens it unpublished too, gated as ever; with it, any quiz it does not open is `not_found` `preview`.","type":"string","minLength":1,"maxLength":128}},"additionalProperties":false}}}}}},"/v1/stores/{store}/products/{product}/attempts/{attempt}/submit":{"post":{"operationId":"submitAttempt","summary":"Submits answers to an attempt and grades it.","tags":["quiz"],"security":[{"bearer":["quiz:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"attempt","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Submits answers to an attempt and grades it.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"attempt":{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"quiz_id":{"type":"string"},"entry_id":{"type":"string"},"attempt":{"type":"number"},"status":{"type":"string","x-extensible-enum":["failed","started","submitted","passed","forfeited"]},"score":{"anyOf":[{"type":"number"},{"type":"null"}]},"correct":{"anyOf":[{"type":"number"},{"type":"null"}]},"started_at":{"type":"string"},"finished_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]}},"required":["id","product_id","quiz_id","entry_id","attempt","status","score","correct","started_at","finished_at","access"]},"score":{"type":"number"},"correct":{"type":"number"},"total":{"type":"number"},"results":{"type":"array","items":{"type":"object","properties":{"question_id":{"type":"string"},"answer":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"type":"null"}]},"correct":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"key":{"anyOf":[{"type":"object","properties":{"correct_option_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"correct_answer":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"correct_value":{"anyOf":[{"type":"number"},{"type":"null"}]},"accepted_answers":{"type":"array","items":{"type":"string"}},"explanation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["correct_option_id","correct_answer","correct_value","accepted_answers","explanation"]},{"type":"null"}]}},"required":["question_id","answer","correct","key"]}},"certificate":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"certificate_id":{"type":"string"},"score":{"anyOf":[{"type":"number"},{"type":"null"}]},"attempt":{"anyOf":[{"type":"number"},{"type":"null"}]},"issued_at":{"type":"string"}},"required":["id","product_id","certificate_id","score","attempt","issued_at"]},{"type":"null"}]},"certificates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"certificate_id":{"type":"string"},"score":{"anyOf":[{"type":"number"},{"type":"null"}]},"attempt":{"anyOf":[{"type":"number"},{"type":"null"}]},"issued_at":{"type":"string"}},"required":["id","product_id","certificate_id","score","attempt","issued_at"]}}},"required":["attempt","score","correct","total","results","certificate","certificates"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"answers":{"description":"Each text answer at most 4000 characters.","type":"object","properties":{},"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string","maxLength":4000},{"type":"number"},{"type":"null"}]},"maxProperties":500},"preview":{"description":"A token a seller made for the quiz's product's page, which opens the quiz of a published entry of the product unpublished, or for the quiz's entry, which opens it unpublished too, gated as ever; with it, a sitting on any quiz it does not open is `not_found` `preview`.","type":"string","minLength":1,"maxLength":128}},"required":["answers"],"additionalProperties":false}}}}}},"/v1/stores/{store}/products/{product}/attempts/{attempt}/save":{"post":{"operationId":"saveAttempt","summary":"Saves the answers given so far to the open attempt, replacing those saved before, so it resumes on any device.","tags":["quiz"],"security":[{"bearer":["quiz:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"attempt","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Saves the answers given so far to the open attempt, replacing those saved before, so it resumes on any device.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"attempt":{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"quiz_id":{"type":"string"},"entry_id":{"type":"string"},"attempt":{"type":"number"},"status":{"type":"string","x-extensible-enum":["failed","started","submitted","passed","forfeited"]},"score":{"anyOf":[{"type":"number"},{"type":"null"}]},"correct":{"anyOf":[{"type":"number"},{"type":"null"}]},"started_at":{"type":"string"},"finished_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]}},"required":["id","product_id","quiz_id","entry_id","attempt","status","score","correct","started_at","finished_at","access"]},"answers":{"type":"object","properties":{},"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"type":"null"}]}}},"required":["attempt","answers"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"answers":{"description":"Each text answer at most 4000 characters; replaces the answers saved before.","type":"object","properties":{},"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string","maxLength":4000},{"type":"number"},{"type":"null"}]},"maxProperties":500},"preview":{"description":"A token a seller made for the quiz's product's page, which opens the quiz of a published entry of the product unpublished, or for the quiz's entry, which opens it unpublished too, gated as ever; with it, a sitting on any quiz it does not open is `not_found` `preview`.","type":"string","minLength":1,"maxLength":128}},"required":["answers"],"additionalProperties":false}}}}}},"/v1/stores/{store}/products/{product}/entries/{entry}/quizzes/{quiz}/forfeit":{"post":{"operationId":"forfeitQuiz","summary":"Gives up a quiz: the open attempt, or the attempts left, after which no attempt can be started.","tags":["quiz"],"security":[{"bearer":["quiz:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"entry","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"quiz","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Gives up a quiz: the open attempt, or the attempts left, after which no attempt can be started.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"attempt":{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"quiz_id":{"type":"string"},"entry_id":{"type":"string"},"attempt":{"type":"number"},"status":{"type":"string","x-extensible-enum":["failed","started","submitted","passed","forfeited"]},"score":{"anyOf":[{"type":"number"},{"type":"null"}]},"correct":{"anyOf":[{"type":"number"},{"type":"null"}]},"started_at":{"type":"string"},"finished_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]}},"required":["id","product_id","quiz_id","entry_id","attempt","status","score","correct","started_at","finished_at","access"]},"certificate":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"certificate_id":{"type":"string"},"score":{"anyOf":[{"type":"number"},{"type":"null"}]},"attempt":{"anyOf":[{"type":"number"},{"type":"null"}]},"issued_at":{"type":"string"}},"required":["id","product_id","certificate_id","score","attempt","issued_at"]},{"type":"null"}]},"certificates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"certificate_id":{"type":"string"},"score":{"anyOf":[{"type":"number"},{"type":"null"}]},"attempt":{"anyOf":[{"type":"number"},{"type":"null"}]},"issued_at":{"type":"string"}},"required":["id","product_id","certificate_id","score","attempt","issued_at"]}}},"required":["attempt","certificate","certificates"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"preview":{"description":"A token a seller made for the quiz's product's page, which opens the quiz of a published entry of the product unpublished, or for the quiz's entry, which opens it unpublished too, gated as ever; with it, any quiz it does not open is `not_found` `preview`.","type":"string","minLength":1,"maxLength":128}},"additionalProperties":false}}}}}},"/v1/stores/{store}/products/{product}/attempts/{attempt}":{"get":{"operationId":"getAttempt","summary":"Reads one of the customer's quiz attempts to review: its questions, the answers given and, once graded, each result with the key where the quiz shows it.","tags":["attempt"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"attempt","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"preview","in":"query","description":"A token a seller made for the quiz's product's page, which opens the quiz of a published entry of the product unpublished, or for the quiz's entry, which opens it unpublished too, gated as ever; with it, a sitting on any quiz it does not open is `not_found` `preview`.","schema":{"description":"A token a seller made for the quiz's product's page, which opens the quiz of a published entry of the product unpublished, or for the quiz's entry, which opens it unpublished too, gated as ever; with it, a sitting on any quiz it does not open is `not_found` `preview`.","type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"Reads one of the customer's quiz attempts to review: its questions, the answers given and, once graded, each result with the key where the quiz shows it.","content":{"application/json":{"schema":{"type":"object","properties":{"attempt":{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"quiz_id":{"type":"string"},"entry_id":{"type":"string"},"attempt":{"type":"number"},"status":{"type":"string","x-extensible-enum":["failed","started","submitted","passed","forfeited"]},"score":{"anyOf":[{"type":"number"},{"type":"null"}]},"correct":{"anyOf":[{"type":"number"},{"type":"null"}]},"started_at":{"type":"string"},"finished_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]}},"required":["id","product_id","quiz_id","entry_id","attempt","status","score","correct","started_at","finished_at","access"]},"questions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"},"question":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"description":"A static text's text, in the rich text format as stored.","anyOf":[{"type":"string"},{"type":"null"}],"x-rich-text":"text"},"options":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"}},"required":["id","text"]}},{"type":"null"}]},"min":{"anyOf":[{"type":"number"},{"type":"null"}]},"max":{"anyOf":[{"type":"number"},{"type":"null"}]},"weight":{"anyOf":[{"type":"number"},{"type":"null"}]},"hint":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","id","question","content","options","min","max","weight","hint"]}},"attachments":{"type":"array","items":{"type":"object","properties":{"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the video's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads beside the video or audio file.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]},"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"]},"preview_only":{"type":"boolean"},"from_body":{"description":"Named by its target's body text, rather than the target's own media (a lesson's video or slides).","type":"boolean"},"position":{"type":"number"},"asset":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"ext":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"mime":{"anyOf":[{"type":"string"},{"type":"null"}]},"bytes":{"description":"The file's size in bytes, null when it has none or is withheld.","anyOf":[{"type":"number"},{"type":"null"}]},"enforcement":{"type":"string","x-extensible-enum":["public","external","signed"]},"locator":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"type":"object","properties":{"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"duration":{"anyOf":[{"type":"number"},{"type":"null"}]},"pages":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["width","height","duration","pages"]},"status":{"type":"string","x-extensible-enum":["pending","ready","failed"]}},"required":["id","name","title","ext","description","mime","bytes","enforcement","locator","metadata","status"]}},"required":["tracks","outputs","access","id","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":{"description":"The file's size in bytes, null when it has none or is withheld.","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"]},"url":{"description":"A public file's lasting URL, an image's naming its widths' version as `#v=` once they're made; null for a private one, or one whose bytes haven't landed.","anyOf":[{"type":"string"},{"type":"null"}]},"resized":{"description":"A public image's smaller copies, narrowest first, for a `srcset`; left out until they're made and its width measured, for one kept as uploaded, and for any other file.","type":"array","items":{"type":"object","properties":{"width":{"description":"Its width in pixels, at most the image's own.","type":"integer","minimum":1},"avif":{"description":"A lasting URL to it as AVIF.","type":"string"},"webp":{"description":"A lasting URL to it as WebP.","type":"string"}},"required":["width","avif","webp"]}},"attachment_id":{"description":"The binding a private file opens through; null when the reader can't open it.","anyOf":[{"type":"string"},{"type":"null"}]},"unlocks":{"description":"What unlocks a file its own rules keep from the reader, any one; null for any other file.","anyOf":[{"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string"},"product_name":{"type":"string"},"tier":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"rank":{"type":"number"}},"required":["id","name","rank"]},{"type":"null"}]}},"required":["product_id","product_name","tier"]}},{"type":"null"}]},"video":{"description":"A video's subtitles and published AI outputs, where its read lists any and the reader may play it.","type":"object","properties":{"attachment_id":{"type":"string"},"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the file's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}}},"required":["attachment_id","tracks","outputs"]},"audio":{"description":"An audio file's waveform, subtitles and published AI outputs, where the reader may play it.","type":"object","properties":{"waveform":{"description":"256 levels from 0 to 255, base64, from the file's start to its end; null until drawn, or when it can't be.","anyOf":[{"type":"string"},{"type":"null"}]},"attachment_id":{"description":"The binding its tracks and outputs open through, which a public file carries here alone; null with none.","anyOf":[{"type":"string"},{"type":"null"}]},"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated":{"description":"Subtitles the store generated with AI from the file's audio.","type":"boolean"}},"required":["id","label","language","generated"]}},"outputs":{"description":"The published AI outputs `getMediaOutputs` reads.","type":"array","items":{"type":"string","x-extensible-enum":["summary","chapters","transcript"]}}},"required":["waveform","attachment_id","tracks","outputs"]}},"required":["id","kind","mime","name","bytes","width","height","duration","pages","status","url","attachment_id","unlocks"]}},"answers":{"type":"object","properties":{},"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"type":"null"}]}},"results":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"question_id":{"type":"string"},"answer":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"},{"type":"null"}]},"correct":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"key":{"anyOf":[{"type":"object","properties":{"correct_option_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"correct_answer":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"correct_value":{"anyOf":[{"type":"number"},{"type":"null"}]},"accepted_answers":{"type":"array","items":{"type":"string"}},"explanation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["correct_option_id","correct_answer","correct_value","accepted_answers","explanation"]},{"type":"null"}]}},"required":["question_id","answer","correct","key"]}},{"type":"null"}]}},"required":["attempt","questions","attachments","files","answers","results"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/attempts":{"get":{"operationId":"listAttempts","summary":"Pages the customer's quiz attempts.","tags":["attempt"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","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":["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","maxLength":8192}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Pages the customer's 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":{"id":{"type":"string"},"product_id":{"type":"string"},"quiz_id":{"type":"string"},"entry_id":{"type":"string"},"attempt":{"type":"number"},"status":{"type":"string","x-extensible-enum":["failed","started","submitted","passed","forfeited"]},"score":{"anyOf":[{"type":"number"},{"type":"null"}]},"correct":{"anyOf":[{"type":"number"},{"type":"null"}]},"started_at":{"type":"string"},"finished_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]}},"required":["id","product_id","quiz_id","entry_id","attempt","status","score","correct","started_at","finished_at","access"]}},"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://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/attempts":{"get":{"operationId":"listProductAttempts","summary":"Pages the customer's quiz attempts.","tags":["attempt"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","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":["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","maxLength":8192}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Pages the customer's 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":{"id":{"type":"string"},"product_id":{"type":"string"},"quiz_id":{"type":"string"},"entry_id":{"type":"string"},"attempt":{"type":"number"},"status":{"type":"string","x-extensible-enum":["failed","started","submitted","passed","forfeited"]},"score":{"anyOf":[{"type":"number"},{"type":"null"}]},"correct":{"anyOf":[{"type":"number"},{"type":"null"}]},"started_at":{"type":"string"},"finished_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]}},"required":["id","product_id","quiz_id","entry_id","attempt","status","score","correct","started_at","finished_at","access"]}},"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://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/certificates":{"get":{"operationId":"listCertificates","summary":"Pages the certificates issued to the customer.","tags":["certificate"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","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":["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","maxLength":8192}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Pages the certificates issued to the customer.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"holder":{"anyOf":[{"type":"string"},{"type":"null"}]},"certificate":{"type":"object","properties":{"entry_id":{"anyOf":[{"type":"string"},{"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":{"requires_passing":{"type":"boolean"},"shows":{"type":"array","items":{"type":"string","x-extensible-enum":["date","score","qr_code"]}},"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"}]}},"required":["requires_passing","shows","template","accent"]}},"required":["entry_id","id","product_id","quiz_id","headline_copy","title_copy","awarded_copy","reason_copy","score_copy","out_of_score_copy","settings"]},"product":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"path":{"description":"The product's storefront path, or null once deleted, since another product may take its slug.","anyOf":[{"type":"string"},{"type":"null"}]},"url":{"description":"The absolute URL on the store's verified hostname, or null before it has one or once deleted.","anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"category":{"type":"string"},"deleted":{"type":"boolean"}},"required":["id","slug","path","url","title","category","deleted"]},{"type":"null"}]},"id":{"type":"string"},"product_id":{"type":"string"},"certificate_id":{"type":"string"},"score":{"anyOf":[{"type":"number"},{"type":"null"}]},"attempt":{"anyOf":[{"type":"number"},{"type":"null"}]},"issued_at":{"type":"string"}},"required":["holder","certificate","product","id","product_id","certificate_id","score","attempt","issued_at"]}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","cursor"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/certificates":{"get":{"operationId":"listProductCertificates","summary":"Pages the certificates issued to the customer.","tags":["certificate"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","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":["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","maxLength":8192}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Pages the certificates issued to the customer.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"holder":{"anyOf":[{"type":"string"},{"type":"null"}]},"certificate":{"type":"object","properties":{"entry_id":{"anyOf":[{"type":"string"},{"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":{"requires_passing":{"type":"boolean"},"shows":{"type":"array","items":{"type":"string","x-extensible-enum":["date","score","qr_code"]}},"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"}]}},"required":["requires_passing","shows","template","accent"]}},"required":["entry_id","id","product_id","quiz_id","headline_copy","title_copy","awarded_copy","reason_copy","score_copy","out_of_score_copy","settings"]},"product":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"path":{"description":"The product's storefront path, or null once deleted, since another product may take its slug.","anyOf":[{"type":"string"},{"type":"null"}]},"url":{"description":"The absolute URL on the store's verified hostname, or null before it has one or once deleted.","anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"category":{"type":"string"},"deleted":{"type":"boolean"}},"required":["id","slug","path","url","title","category","deleted"]},{"type":"null"}]},"id":{"type":"string"},"product_id":{"type":"string"},"certificate_id":{"type":"string"},"score":{"anyOf":[{"type":"number"},{"type":"null"}]},"attempt":{"anyOf":[{"type":"number"},{"type":"null"}]},"issued_at":{"type":"string"}},"required":["holder","certificate","product","id","product_id","certificate_id","score","attempt","issued_at"]}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","cursor"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/certificates/{certificate}":{"get":{"operationId":"getCertificate","summary":"Reads one certificate issued to the customer.","tags":["certificate"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"certificate","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Reads one certificate issued to the customer.","content":{"application/json":{"schema":{"type":"object","properties":{"holder":{"anyOf":[{"type":"string"},{"type":"null"}]},"certificate":{"type":"object","properties":{"entry_id":{"anyOf":[{"type":"string"},{"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":{"requires_passing":{"type":"boolean"},"shows":{"type":"array","items":{"type":"string","x-extensible-enum":["date","score","qr_code"]}},"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"}]}},"required":["requires_passing","shows","template","accent"]}},"required":["entry_id","id","product_id","quiz_id","headline_copy","title_copy","awarded_copy","reason_copy","score_copy","out_of_score_copy","settings"]},"product":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"path":{"description":"The product's storefront path, or null once deleted, since another product may take its slug.","anyOf":[{"type":"string"},{"type":"null"}]},"url":{"description":"The absolute URL on the store's verified hostname, or null before it has one or once deleted.","anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"category":{"type":"string"},"deleted":{"type":"boolean"}},"required":["id","slug","path","url","title","category","deleted"]},{"type":"null"}]},"id":{"type":"string"},"product_id":{"type":"string"},"certificate_id":{"type":"string"},"score":{"anyOf":[{"type":"number"},{"type":"null"}]},"attempt":{"anyOf":[{"type":"number"},{"type":"null"}]},"issued_at":{"type":"string"}},"required":["holder","certificate","product","id","product_id","certificate_id","score","attempt","issued_at"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/certificates/{certificate}/verify":{"get":{"operationId":"verifyCertificate","summary":"Checks that a certificate was issued and is not revoked, and given `of`, that it is one of that certificate.","tags":["certificate"],"security":[{"bearer":[]},{"publishableKey":[]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"certificate","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"of","in":"query","description":"An id.","schema":{"type":"string","minLength":1,"description":"An id."}}],"responses":{"200":{"description":"Checks that a certificate was issued and is not revoked, and given `of`, that it is one of that certificate.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"certificate_id":{"type":"string"},"issued_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"score":{"anyOf":[{"type":"number"},{"type":"null"}]},"holder":{"anyOf":[{"type":"string"},{"type":"null"}]},"headline_copy":{"type":"string"},"title_copy":{"anyOf":[{"type":"string"},{"type":"null"}]},"product":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"path":{"description":"The product's storefront path, or null once deleted, since another product may take its slug.","anyOf":[{"type":"string"},{"type":"null"}]},"url":{"description":"The absolute URL on the store's verified hostname, or null before it has one or once deleted.","anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"category":{"type":"string"},"deleted":{"type":"boolean"}},"required":["id","slug","path","url","title","category","deleted"]},{"type":"null"}]}},"required":["id","certificate_id","issued_at","score","holder","headline_copy","title_copy","product"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/license_signing_keys":{"get":{"operationId":"listLicenseSigningKeys","summary":"Lists the store's published Ed25519 keys as a JSON Web Key Set, which software checks offline license tokens against.","tags":["license"],"security":[{"bearer":[]},{"publishableKey":[]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}}],"responses":{"200":{"description":"Lists the store's published Ed25519 keys as a JSON Web Key Set, which software checks offline license tokens against.","content":{"application/json":{"schema":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"object","properties":{"kid":{"type":"string"},"kty":{"type":"string","x-extensible-enum":["OKP"]},"crv":{"type":"string","x-extensible-enum":["Ed25519"]},"x":{"description":"The raw 32-byte public key, base64url, as a JWK's `x`.","type":"string"},"alg":{"type":"string","x-extensible-enum":["EdDSA"]},"use":{"type":"string","x-extensible-enum":["sig"]},"status":{"description":"`current` signs new tokens; `next` signs once the keys rotate; `previous` signs nothing more and stays published while a token it signed may live.","type":"string","x-extensible-enum":["current","previous","next"]},"created_at":{"type":"string"},"expires_at":{"description":"When it leaves the set, as the longest offline window after it stopped signing; null while it signs or waits to.","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kid","kty","crv","x","alg","use","status","created_at","expires_at"]}}},"required":["keys"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/licenses":{"get":{"operationId":"listLicenses","summary":"Pages the customer's licenses of a software product, the live one and the ones it replaced, newest first, each with its key and status.","tags":["license"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","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":["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","maxLength":8192}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Pages the customer's licenses of a software product, the live one and the ones it replaced, newest first, each with its key and status.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"key":{"description":"The key the customer enters in the software; null to staff acting as the customer.","anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","x-extensible-enum":["active","expired","revoked","disabled","replaced"]},"expires_at":{"description":"When access ends, or ended; null for lifetime access.","anyOf":[{"type":"string"},{"type":"null"}]},"activation_limit":{"description":"How many devices it activates at once: its own limit, else its tier's, else its product's; null for no limit.","anyOf":[{"type":"number"},{"type":"null"}]},"activations":{"description":"The devices it counts now and the most it may hold.","type":"object","properties":{"count":{"type":"number"},"limit":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["count","limit"]},"replaced_by":{"description":"The license whose key took this one's place; null until it is replaced.","anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"}},"required":["id","product_id","key","status","expires_at","activation_limit","activations","replaced_by","created_at"]}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","cursor"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/licenses/{license}":{"get":{"operationId":"getLicense","summary":"Reads one of the customer's licenses with its key, status, end and activation limit.","tags":["license"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"license","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Reads one of the customer's licenses with its key, status, end and activation limit.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"key":{"description":"The key the customer enters in the software; null to staff acting as the customer.","anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","x-extensible-enum":["active","expired","revoked","disabled","replaced"]},"expires_at":{"description":"When access ends, or ended; null for lifetime access.","anyOf":[{"type":"string"},{"type":"null"}]},"activation_limit":{"description":"How many devices it activates at once: its own limit, else its tier's, else its product's; null for no limit.","anyOf":[{"type":"number"},{"type":"null"}]},"activations":{"description":"The devices it counts now and the most it may hold.","type":"object","properties":{"count":{"type":"number"},"limit":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["count","limit"]},"replaced_by":{"description":"The license whose key took this one's place; null until it is replaced.","anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"}},"required":["id","product_id","key","status","expires_at","activation_limit","activations","replaced_by","created_at"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/licenses/{license}/activations":{"get":{"operationId":"listLicenseActivations","summary":"Pages the devices one of the customer's licenses counts, latest activated first, with those freed or gone inactive.","tags":["license"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"license","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":["activated","last_seen"]}},{"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","maxLength":8192}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Pages the devices one of the customer's licenses counts, latest activated first, with those freed or gone inactive.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"license_id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"description":"`active` counts toward the limit; `inactive` went unseen past the product's inactive days; `deactivated` was freed.","type":"string","x-extensible-enum":["active","inactive","deactivated"]},"created_at":{"type":"string"},"activated_at":{"type":"string"},"last_seen_at":{"type":"string"},"deactivated_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"deactivated_by":{"description":"Who freed it: `customer`, `merchant` or `software`; null while not freed.","anyOf":[{"type":"string","x-extensible-enum":["customer","merchant","software"]},{"type":"null"}]}},"required":["id","license_id","name","status","created_at","activated_at","last_seen_at","deactivated_at","deactivated_by"]}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","cursor"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/licenses/{license}/activations/{activation}/deactivate":{"post":{"operationId":"deactivateLicenseActivation","summary":"Frees one of the devices the customer's license counts, so another can take its place.","tags":["profile"],"security":[{"bearer":["profile:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"license","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"activation","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Frees one of the devices the customer's license counts, so another can take its place.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"activation":{"type":"object","properties":{"id":{"type":"string"},"license_id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"description":"`active` counts toward the limit; `inactive` went unseen past the product's inactive days; `deactivated` was freed.","type":"string","x-extensible-enum":["active","inactive","deactivated"]},"created_at":{"type":"string"},"activated_at":{"type":"string"},"last_seen_at":{"type":"string"},"deactivated_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"deactivated_by":{"description":"Who freed it: `customer`, `merchant` or `software`; null while not freed.","anyOf":[{"type":"string","x-extensible-enum":["customer","merchant","software"]},{"type":"null"}]}},"required":["id","license_id","name","status","created_at","activated_at","last_seen_at","deactivated_at","deactivated_by"]},"activations":{"type":"object","properties":{"count":{"type":"number"},"limit":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["count","limit"]}},"required":["activation","activations"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","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}/licenses/{license}/rotate":{"post":{"operationId":"rotateLicense","summary":"Replaces the customer's active license with a new key, the old one stopping at once, and emails them the new key a couple of minutes later; a key made in the last minute waits, and a license takes three new keys a day.","tags":["profile"],"security":[{"bearer":["profile:write"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"license","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Replaces the customer's active license with a new key, the old one stopping at once, and emails them the new key a couple of minutes later; a key made in the last minute waits, and a license takes three new keys a day.","headers":{"Cache-Control":{"description":"`no-store`: a write may answer what no read answers again, such as a signing secret.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"key":{"description":"The key the customer enters in the software; null to staff acting as the customer.","anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","x-extensible-enum":["active","expired","revoked","disabled","replaced"]},"expires_at":{"description":"When access ends, or ended; null for lifetime access.","anyOf":[{"type":"string"},{"type":"null"}]},"activation_limit":{"description":"How many devices it activates at once: its own limit, else its tier's, else its product's; null for no limit.","anyOf":[{"type":"number"},{"type":"null"}]},"activations":{"description":"The devices it counts now and the most it may hold.","type":"object","properties":{"count":{"type":"number"},"limit":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["count","limit"]},"replaced_by":{"description":"The license whose key took this one's place; null until it is replaced.","anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"}},"required":["id","product_id","key","status","expires_at","activation_limit","activations","replaced_by","created_at"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","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, as far as the customer may.","tags":["portfolio"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"preview","in":"query","description":"A token a seller made for the product's page or one of its entries, which opens an unpublished product's portfolio, gated as ever.","schema":{"description":"A token a seller made for the product's page or one of its entries, which opens an unpublished product's portfolio, gated as ever.","type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"Reads a portfolio product's book, as far as the customer may.","content":{"application/json":{"schema":{"type":"object","properties":{"exponent":{"anyOf":[{"type":"number"},{"type":"null"}]},"product":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"path":{"description":"The storefront path.","type":"string"},"url":{"description":"The absolute URL on the store's verified hostname, or null before it has one.","anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"}},"required":["id","slug","path","url","title"]},"access":{"type":"string","x-extensible-enum":["locked","unlocked","bypassed"]},"chart_cutoff":{"anyOf":[{"type":"string"},{"type":"null"}]},"performance":{"anyOf":[{"type":"object","properties":{"total":{"type":"null"},"year_1":{"type":"null"},"cagr":{"type":"null"}},"required":["total","year_1","cagr"]},{"type":"object","properties":{"total":{"type":"number"},"year_1":{"anyOf":[{"type":"number"},{"type":"null"}]},"cagr":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["total","year_1","cagr"]}]},"holdings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"symbol_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"shares":{"anyOf":[{"type":"number"},{"type":"null"}]},"avg_cost":{"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","symbol","name","symbol_type","currency","shares","avg_cost","note","updated_at"]}},"id":{"type":"string"},"product_id":{"type":"string"},"currency":{"type":"string"},"settings":{"type":"object","properties":{"show_absolute_values":{"type":"boolean"},"locked_chart_delay":{"type":"string","x-extensible-enum":["week","month","none","current_quarter"]}},"required":["show_absolute_values","locked_chart_delay"]},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["exponent","product","access","chart_cutoff","performance","holdings","id","product_id","currency","settings","created_at"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/portfolio/valuation":{"get":{"operationId":"getPortfolioValuation","summary":"Values a portfolio at live quotes and prices its watchlist, for a customer with access.","tags":["portfolio"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"preview","in":"query","description":"A token a seller made for the product's page or one of its entries, which opens an unpublished product's portfolio, gated as ever.","schema":{"description":"A token a seller made for the product's page or one of its entries, which opens an unpublished product's portfolio, gated as ever.","type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"Values a portfolio at live quotes and prices its watchlist, for a customer with access.","content":{"application/json":{"schema":{"type":"object","properties":{"product_id":{"type":"string"},"currency":{"type":"string"},"exponent":{"anyOf":[{"type":"number"},{"type":"null"}]},"as_of":{"type":"string"},"cash":{"anyOf":[{"type":"number"},{"type":"null"}]},"holdings_value":{"type":"number"},"total_value":{"anyOf":[{"type":"number"},{"type":"null"}]},"change_percent":{"anyOf":[{"type":"number"},{"type":"null"}]},"prices_stale":{"type":"boolean"},"failed_types":{"type":"array","items":{"type":"string","x-extensible-enum":["stock","crypto"]}},"holdings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"symbol":{"type":"string"},"symbol_type":{"type":"string","x-extensible-enum":["stock","crypto"]},"name":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"shares":{"description":"Scaled by 1e8.","type":"number"},"avg_cost":{"description":"Per share, in `cost_currency`'s minor unit.","anyOf":[{"type":"number"},{"type":"null"}]},"cost_currency":{"description":"The currency the holding's cost was recorded in (`metadata.cost_currency`), else the portfolio's, as for an unknown code.","type":"string"},"cost_exponent":{"description":"`cost_currency`'s exponent, null when central does not know it.","anyOf":[{"type":"number"},{"type":"null"}]},"value":{"description":"At the live price, in the quote's currency's minor unit; null without a quote.","anyOf":[{"type":"number"},{"type":"null"}]},"day_change":{"description":"The position's move today, in the quote's currency's minor unit; null without a fresh change.","anyOf":[{"type":"number"},{"type":"null"}]},"quote":{"anyOf":[{"type":"object","properties":{"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 there is 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; the price still values the position.","type":"boolean"}},"required":["price","currency","exponent","change_percent","as_of","stale"]},{"type":"null"}]}},"required":["id","symbol","symbol_type","name","note","shares","avg_cost","cost_currency","cost_exponent","value","day_change","quote"]}},"watchlist":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"symbol":{"type":"string"},"symbol_type":{"type":"string","x-extensible-enum":["stock","crypto"]},"name":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"was_held":{"description":"Once a position, since sold to zero.","type":"boolean"},"avg_cost":{"description":"The cost per share a once-held symbol keeps, in `cost_currency`'s minor unit; null for one never held.","anyOf":[{"type":"number"},{"type":"null"}]},"cost_currency":{"description":"The currency the holding's cost was recorded in (`metadata.cost_currency`), else the portfolio's, as for an unknown code.","type":"string"},"cost_exponent":{"description":"`cost_currency`'s exponent, null when central does not know it.","anyOf":[{"type":"number"},{"type":"null"}]},"watched_at":{"description":"When it was last put on the watchlist, null for a row no watch event names.","anyOf":[{"type":"string"},{"type":"null"}]},"quote":{"anyOf":[{"type":"object","properties":{"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 there is 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; the price still values the position.","type":"boolean"}},"required":["price","currency","exponent","change_percent","as_of","stale"]},{"type":"null"}]}},"required":["id","symbol","symbol_type","name","note","was_held","avg_cost","cost_currency","cost_exponent","watched_at","quote"]}}},"required":["product_id","currency","exponent","as_of","cash","holdings_value","total_value","change_percent","prices_stale","failed_types","holdings","watchlist"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","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.","tags":["portfolio"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"preview","in":"query","description":"A token a seller made for the product's page or one of its entries, which opens an unpublished product's portfolio, gated as ever.","schema":{"description":"A token a seller made for the product's page or one of its entries, which opens an unpublished product's portfolio, gated as ever.","type":"string","minLength":1,"maxLength":128}},{"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","maxLength":8192}},{"name":"count","in":"query","schema":{"type":"boolean"}},{"name":"search","in":"query","schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"Pages a portfolio's events.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"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"}]},"split_kind":{"description":"How a split moved the shares, which its ratio alone cannot tell apart; null for any other event.","anyOf":[{"type":"string","x-extensible-enum":["reverse","forward","stock_dividend"]},{"type":"null"}]},"files":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"ext":{"description":"The file's extension, null when it has none.","anyOf":[{"type":"string"},{"type":"null"}]},"link":{"description":"Whether it is a link to a URL rather than stored bytes.","type":"boolean"},"mime":{"anyOf":[{"type":"string"},{"type":"null"}]},"bytes":{"description":"The file's size in bytes, null when it has none.","anyOf":[{"type":"number"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"attachment_id":{"type":"string"}},"required":["id","name","ext","link","mime","bytes","description","attachment_id"]}},{"type":"null"}]},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","symbol","type","shares","price","amount","note","effective_date","symbol_type","currency","exponent","price_currency","price_exponent","allocation","allocation_change","ratio","split_kind","files","occurred_at"]}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","cursor"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/activity":{"get":{"operationId":"listSoftwareEvents","summary":"Pages a software product's releases and notes, newest first.","tags":["software"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"preview","in":"query","description":"A token a seller made for the product's page, which opens an unpublished product's activity, gated as ever.","schema":{"description":"A token a seller made for the product's page, which opens an unpublished product's activity, gated as ever.","type":"string","minLength":1,"maxLength":128}},{"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","maxLength":8192}},{"name":"count","in":"query","schema":{"type":"boolean"}},{"name":"search","in":"query","schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"Pages a software product's releases and notes, newest first.","headers":{"Link":{"description":"The next page, `<...>; rel=\"next\"`, while `cursor` is not null.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"description":"`release` or `note`.","type":"string","x-extensible-enum":["note","release"]},"version":{"description":"A release's version; null for a note.","anyOf":[{"type":"string"},{"type":"null"}]},"body":{"description":"The release notes or the note, as plain text.","anyOf":[{"type":"string"},{"type":"null"}]},"current":{"description":"Whether it is the product's current download: its newest release that ships files.","type":"boolean"},"files":{"description":"A release's files the reader may download; empty for a note.","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"ext":{"description":"The file's extension, null when it has none.","anyOf":[{"type":"string"},{"type":"null"}]},"link":{"description":"Whether it is a link to a URL rather than stored bytes.","type":"boolean"},"mime":{"anyOf":[{"type":"string"},{"type":"null"}]},"bytes":{"description":"The file's size in bytes, null when it has none.","anyOf":[{"type":"number"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"attachment_id":{"type":"string"}},"required":["id","name","ext","link","mime","bytes","description","attachment_id"]}},"locked":{"description":"Whether a release ships files a higher tier downloads.","type":"boolean"},"occurred_at":{"type":"string"}},"required":["id","type","version","body","current","files","locked","occurred_at"]}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","cursor"]}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/products/{product}/portfolio/snapshots":{"get":{"operationId":"listPortfolioSnapshots","summary":"Pages a portfolio's daily snapshots.","tags":["portfolio"],"security":[{"bearer":["read"]}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"product","in":"path","required":true,"description":"An id, or `slug:<slug>`.","schema":{"type":"string","minLength":1}},{"name":"preview","in":"query","description":"A token a seller made for the product's page or one of its entries, which opens an unpublished product's portfolio, gated as ever.","schema":{"description":"A token a seller made for the product's page or one of its entries, which opens an unpublished product's portfolio, gated as ever.","type":"string","minLength":1,"maxLength":128}},{"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":400}},{"name":"cursor","in":"query","schema":{"type":"string","maxLength":8192}},{"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":{"date":{"type":"string"},"currency":{"type":"string"},"exponent":{"anyOf":[{"type":"number"},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"cash":{"anyOf":[{"type":"number"},{"type":"null"}]},"positions":{"anyOf":[{"type":"number"},{"type":"null"}]},"twr":{"anyOf":[{"type":"number"},{"type":"null"}]},"benchmark":{"anyOf":[{"type":"number"},{"type":"null"}]},"benchmarks":{"type":"object","properties":{"sp500":{"anyOf":[{"type":"number"},{"type":"null"}]},"nasdaq":{"anyOf":[{"type":"number"},{"type":"null"}]},"acwi":{"anyOf":[{"type":"number"},{"type":"null"}]},"gold":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["sp500","nasdaq","acwi","gold"]},"state":{"type":"string","x-extensible-enum":["settled","provisional"]}},"required":["date","currency","exponent","value","cash","positions","twr","benchmark","benchmarks","state"]}},"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://api.sherpo.io/customer/docs/errors.","headers":{"WWW-Authenticate":{"description":"On a 401, `Bearer error=\"invalid_token\"`, or `Bearer` alone when no token was sent or the publishable key was refused; 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; on a 503 for a suspended store, when to ask again.","schema":{"type":"integer","minimum":0}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/stores/{store}/files/{capability}":{"get":{"operationId":"getFile","summary":"Answers the bytes of a private file a capability names, to the bearer or the publishable key that asked for it.","description":"A video or audio file a customer's token asked for is answered by its URL alone, with no credential, so a bare `<video src>` plays it; any other file needs its credential.","tags":["attachment"],"security":[{"bearer":[]},{"publishableKey":[]},{}],"parameters":[{"name":"store","in":"path","required":true,"description":"A hostname of the store.","schema":{"type":"string"}},{"name":"capability","in":"path","required":true,"description":"The capability in the URL `POST /attachments/url` answered: the path segment after `/files/`. A file name may follow it as another segment, never inside this one.","schema":{"type":"string","minLength":1}},{"name":"publishable_key","in":"query","required":false,"description":"The publishable key the URL was asked for with, already on the URL `POST /attachments/url` answered, so a bare `src` can name it: it stands in for the `Publishable-Key` header, and may be sent beside it only with the same key. A customer's token is never taken in the URL.","schema":{"type":"string","minLength":1,"maxLength":512}},{"name":"Range","in":"header","required":false,"description":"One byte range of a file shown in place, `bytes={first}-{last}`, `bytes={first}-` or `bytes=-{suffix}`; a download is answered whole.","schema":{"type":"string"}},{"name":"If-Range","in":"header","required":false,"description":"The file's `ETag` from an earlier answer: the range is answered only while the file is unchanged, else the whole file.","schema":{"type":"string"}}],"responses":{"200":{"description":"The file's bytes, with its type and disposition.","headers":{"Accept-Ranges":{"description":"On a file shown in place: it takes a `Range`.","schema":{"type":"string","const":"bytes"}},"ETag":{"description":"On a file shown in place: the file as served, for `If-Range`.","schema":{"type":"string"}}},"content":{"*/*":{"schema":{"type":"string","format":"binary"}}}},"206":{"description":"The range asked for.","headers":{"Content-Range":{"description":"The range served and the length of what it is part of.","schema":{"type":"string"}},"Accept-Ranges":{"schema":{"type":"string","const":"bytes"}},"ETag":{"description":"The file as served, for `If-Range`.","schema":{"type":"string"}}},"content":{"*/*":{"schema":{"type":"string","format":"binary"}}}},"416":{"description":"The range lies outside the file, or is other than one bytes range.","headers":{"Content-Range":{"description":"The length of what it serves, `bytes */{length}`, when it is known.","schema":{"type":"string"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"description":"A problem; see https://api.sherpo.io/customer/docs/errors.","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","description":"A customer's access token from the store's authorization server, https://customer-auth.sherpo.io/s/{store}."},"publishableKey":{"type":"apiKey","in":"header","name":"Publishable-Key","description":"The store's publishable key, for reading its catalog, pages and its products' prompt lists, and opening the files they list, before anyone signs in; see https://api.sherpo.io/customer/docs/auth."}}}}