Needs the product:write scope.
Rich text (description, what_you_get) is HTML in a closed format: p, h1 to h3, br, strong, em, u, s, sup, sub, code, a (href), span (style color, background-color), text-align on p and h1 to h3, ul, ol, li (data-checked), table rows and cells, pre with code, blockquote, hr, details with summary, figure with figcaption, and
Intro
Read this first.
Set text_format to “markdown” to write Markdown instead.Call
- Tool:
create_product - Scope:
product:write - Writes, adding without changing what is there.
- Acts on a store.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
store |
string |
No | The store to act on. |
text_format |
"html" or "markdown" |
No | The format the rich text fields are written in: the rich text format’s HTML, or Markdown converted into it before it is validated. A text already stored in the format (starting with <rich-text) is kept as it is either way. |
full |
true |
No | Answers the texts, attachments and file lists the short answer leaves out. |
slug |
string |
No | Made from the title when absent: its words, numbered past a twin. |
title |
string |
Yes | |
category |
string |
Yes | |
subtitle |
string or null |
No | The short line shown under the title. |
description |
string or null |
No | The page’s long description, a rich text (images, videos, audio, slideshows and formulas only as blocks, an image it starts showing at most 15 MB) stored in its canonical form. |
what_you_get |
string or null |
No | What a buyer gets, a rich text (images, videos, audio, slideshows and formulas only as blocks, an image it starts showing at most 15 MB) stored in its canonical form. |
listing |
"primary" or "secondary" |
No | |
priority |
integer |
No | |
settings |
object |
No | |
metadata |
object |
No |
{
"type": "object",
"properties": {
"store": {
"type": "string",
"description": "The store to act on."
},
"text_format": {
"type": "string",
"enum": [
"html",
"markdown"
],
"default": "html",
"description": "The format the rich text fields are written in: the rich text format’s HTML, or Markdown converted into it before it is validated. A text already stored in the format (starting with `<rich-text`) is kept as it is either way."
},
"full": {
"description": "Answers the texts, attachments and file lists the short answer leaves out.",
"type": "boolean",
"const": true
},
"slug": {
"description": "Made from the title when absent: its words, numbered past a twin.",
"type": "string",
"minLength": 1,
"maxLength": 120,
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"category": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"subtitle": {
"description": "The short line shown under the title.",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 100
},
{
"type": "null"
}
]
},
"description": {
"description": "The page's long description, a rich text (images, videos, audio, slideshows and formulas only as blocks, an image it starts showing at most 15 MB) stored in its canonical form.",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 100000
},
{
"type": "null"
}
],
"x-rich-text": "text"
},
"what_you_get": {
"description": "What a buyer gets, a rich text (images, videos, audio, slideshows and formulas only as blocks, an image it starts showing at most 15 MB) stored in its canonical form.",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 100000
},
{
"type": "null"
}
],
"x-rich-text": "text"
},
"listing": {
"type": "string",
"enum": [
"primary",
"secondary"
]
},
"priority": {
"type": "integer",
"minimum": 0,
"maximum": 1000000
},
"settings": {
"type": "object",
"properties": {
"feeds": {
"description": "A blog's or a podcast's feeds: the public one always stays; `private` false turns every customer's private feed off.",
"type": "object",
"properties": {
"private": {
"type": "boolean"
},
"category": {
"description": "A podcast's directory category, one of Apple's, its subcategory after ` > ` (`Arts > Books`).",
"type": "string",
"maxLength": 64
},
"explicit": {
"description": "Whether a podcast's episodes are explicit; not where unset.",
"type": "boolean"
},
"owner_email": {
"description": "The address directories mail to verify a podcast's owner; never in a private feed.",
"type": "string",
"maxLength": 254
}
},
"additionalProperties": false
},
"refund_policy": {
"type": "string",
"enum": [
"none",
"24h",
"72h",
"7d",
"14d",
"30d"
]
},
"progress_tracking": {
"type": "string",
"enum": [
"manual",
"on_open",
"on_complete",
"disabled"
]
},
"reviews_enabled": {
"type": "boolean"
},
"review_summary_visible": {
"description": "Whether customers see the generated review summary; it is written either way.",
"type": "boolean"
},
"purchase_note": {
"description": "Shown beside the buy button.",
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"fundraising": {
"description": "A fundraiser: the goal, in minor units of its currency.",
"type": "object",
"properties": {
"goal": {
"type": "integer",
"minimum": 1
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3
}
},
"required": [
"goal",
"currency"
],
"additionalProperties": false
},
"storefront": {
"type": "object",
"properties": {
"sales_counter": {
"description": "A public count of orders on the product page.",
"type": "boolean"
},
"background_poster": {
"description": "The poster doubles as the page background.",
"type": "boolean"
},
"require_dark": {
"description": "The page renders dark whatever the visitor chose.",
"type": "boolean"
}
},
"additionalProperties": false
},
"coffee": {
"description": "A tip button: what it is called and what it shows.",
"anyOf": [
{
"type": "object",
"properties": {
"emoji": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"descriptor": {
"anyOf": [
{
"type": "string",
"minLength": 3,
"maxLength": 15,
"pattern": "^\\S(.*\\S)?$"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"calendar": {
"description": "A bookable product: the seller's Cal.com event and the host card beside the widget.",
"anyOf": [
{
"type": "object",
"properties": {
"calcom": {
"anyOf": [
{
"type": "object",
"properties": {
"username": {
"description": "A path segment of a Cal.com link, as it stands in it; set with `event_slug`.",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 100,
"pattern": "^(?!\\.\\.?$)[A-Za-z0-9_.!~*'()-]+$"
},
{
"type": "null"
}
]
},
"event_slug": {
"description": "A path segment of a Cal.com link, as it stands in it; set with `username`.",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 100,
"pattern": "^(?!\\.\\.?$)[A-Za-z0-9_.!~*'()-]+$"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"host": {
"anyOf": [
{
"type": "object",
"properties": {
"title": {
"description": "Trimmed and well formed, with no line break or control character.",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 120,
"pattern": "^[^\\s\\u0000-\\u001f\\u007f-\\u009f]([^\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029]*[^\\s\\u0000-\\u001f\\u007f-\\u009f])?$"
},
{
"type": "null"
}
]
},
"subtitle": {
"description": "Trimmed and well formed, with no line break or control character.",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 150,
"pattern": "^[^\\s\\u0000-\\u001f\\u007f-\\u009f]([^\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029]*[^\\s\\u0000-\\u001f\\u007f-\\u009f])?$"
},
{
"type": "null"
}
]
},
"description": {
"description": "Trimmed and well formed, line feeds and carriage returns allowed but no other control character.",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 500,
"pattern": "^[^\\s\\u0000-\\u001f\\u007f-\\u009f]([^\\u0000-\\u0009\\u000b\\u000c\\u000e-\\u001f\\u007f-\\u009f]*[^\\s\\u0000-\\u001f\\u007f-\\u009f])?$"
},
{
"type": "null"
}
]
},
"tags": {
"description": "Each trimmed and well formed, with no comma, line break or control character; at most 250 characters joined one per line.",
"anyOf": [
{
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 250,
"pattern": "^[^\\s,\\u0000-\\u001f\\u007f-\\u009f]([^\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029,]*[^\\s,\\u0000-\\u001f\\u007f-\\u009f])?$"
}
},
{
"type": "null"
}
]
},
"icon": {
"description": "An image URL legacy stores set, trimmed (of code points that draw nothing too) and well formed, with no line break, control or bidirectional character.",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 2000,
"pattern": "^[^\\s\\u0000-\\u001f\\u007f-\\u009f]([^\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029]*[^\\s\\u0000-\\u001f\\u007f-\\u009f])?$"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
}
}
},
"required": [
"title",
"category"
],
"additionalProperties": false
}Answer
| Name | Type | Required | Description |
|---|---|---|---|
status |
string |
Yes | |
category |
string |
Yes | |
listing |
string |
Yes | |
id |
string |
Yes | |
slug |
string |
Yes | |
title |
string |
Yes | |
subtitle |
string or null |
Yes | The short line shown under the title. |
priority |
number |
Yes | |
published_at |
string or null |
Yes | |
discontinued_at |
string or null |
Yes | |
unlisted_at |
string or null |
Yes | |
created_at |
string or null |
Yes | |
updated_at |
string or null |
Yes | |
settings |
object |
Yes | |
metadata |
object |
Yes | |
unlisted |
boolean |
Yes | |
in_use |
array of object |
Yes | |
poster |
object or null |
No | |
path |
string |
Yes | The storefront path. |
url |
string or null |
Yes | The absolute URL on the store’s verified hostname, or null before it has one. |
tiers |
array of object |
Yes | |
prices |
array of object |
Yes | |
delete_blocked_by |
array of object |
Yes | |
stats |
array of object |
Yes | |
ratings |
object |
Yes | |
feed_url |
string or null |
Yes | The public feed’s absolute URL, for a blog or a podcast that is published, listed and on a verified hostname; else null. |
description |
string or null |
No | The page’s long description, in the rich text format as stored; answered only with full. |
what_you_get |
string or null |
No | What a buyer gets, in the rich text format as stored; answered only with full. |
files |
object |
No | The files its prose names; answered only with full. |
created |
array of object |
Yes | The attachments the write bound: the files its new prose names. |
The answer’s full shape is on its API reference page.
Errors
A refused call is a tool error. Its structuredContent holds a code and its context, except for client-fault. This tool may answer:
invalid: an argument is malformed;context.pathnames it.invalidat["store"]:storeis missing while the connection reaches more than one store, or names a store it doesn’t reach.conflict: the call clashes with the current state;contextnames the field and, where it helps, its current value, and for afrom,live,expector version that no longer matches, the argument (path) and what it takes (reason).not_permitted: this connection may not make this call. Whencontext.reasonislimit, too many calls:retry_aftersays when to try again.internalorunavailable: the call failed inside Sherpo, and the write may have landed. This write takes no idempotency key, so read the state back before trying again.client-fault: the server failed around the call.core_answerokmeans the write landed, so don’t send it again. Whenreached_coreis false, nothing happened and the call may be made again. Otherwise, this write takes no idempotency key, so read the state back before trying again.- HTTP 403 with
insufficient_scope: the connection lacks the scope this tool needs. - HTTP 401 with
invalid_token: the access token expired or the connection ended. Refresh the token, and connect again if the refresh fails or the new token is refused too.
Any other code may come back too, such as a conflict when the state changed under the call. When the answer was already streaming, a 401 or 403 comes back as a tool error with only its text. See Errors for every code and its context.