Skip to content
Navigation

Writes the live body of the store's home, a page, a product or an entry, or with `staged: true` its unpublished next body, which `publishBody` publishes; `from` names the body read, so a write over one changed since is refused. Ask `getBodySchema` for the blocks, props and values its kind takes before writing: anything else is refused, naming the block, the prop and what it takes.

PUT
https://api.sherpo.io/merchant/v1/stores/{store}/{kind}/{id}/body

Authorization

  • bearer
    HTTP
    required

Path parameters

  • store
    string
    required

    The store's id.

  • kind
    string
    required

    The target's kind, in the plural.

    minLength: 1
  • id
    string
    required
    minLength: 1

Request body JSON required

  • content
    string
    required

    The body's text, a blocks layout whose texts (a markdown block's content, and those its blocks nest) are rich texts, stored in its canonical form in 1 MiB of UTF-8; an image it starts showing is at most 15 MB.

    maxLength: 262144 · minLength: 1
  • from
    required

    The asset.id the body (or the staged body) held when the caller read it, never its attachment.id; null when it had none.

    One of the following:

    • object
    • null
  • text_format
    optional
    html
    or
    markdown

    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.

    default: "html"
  • full
    optional
    boolean

    Answers the texts, attachments and file lists the short answer leaves out.

  • staged
    optional
    boolean

    Writes the unpublished next body instead of the live one.

  • live
    optional

    On a staged write, the live body's asset.id the caller started from, never its attachment.id; null when there was none.

    One of the following:

    • object
    • null
  • unpublished
    optional
    boolean

    On a live write, the caller saved it believing its page or product isn't live.

Returns

200

Writes the live body of the store's home, a page, a product or an entry, or with staged: true its unpublished next body, which publishBody publishes; from names the body read, so a write over one changed since is refused. Ask getBodySchema for the blocks, props and values its kind takes before writing: anything else is refused, naming the block, the prop and what it takes.

JSON
  • attachment
    object
    required
    • id
      string
      required
  • asset
    object
    required

    The asset the body holds now: the next write's from (or a staged write's live).

    • id
      string
      required
  • created
    array of
    object
    required

    The attachments the write bound: the embeds a live write or a publish derived.

    • id
      string
      required
    • role
      string
      required
    • asset
      object
      required
      • id
        string
        required
  • preview
    required

    The body's page on the store with a token opening it, for an hour; null where none is answered.

    One of the following:

    • object
    • null
  • attachments
    optional
    array of
    object

    Every attachment on the target with its asset whole; answered only with full.

    • id
      string
      required
    • target
      object
      required
      • kind
        string
        required
      • id
        string
        required
    • role
      string
      required
    • delivery
      string
      required
    • preview_only
      boolean
      required
    • from_body
      boolean
      required
    • release_file
      boolean
      required

      A file a software release ships, which its release edits and the product's own list leaves out.

    • position
      number
      required
    • asset
      object
      required
      • id
        string
        required
      • locator
        required

        One of the following:

        • string
        • null
      • origin
        string
        required
      • custodian
        string
        required
      • enforcement
        string
        required
      • mime
        required

        One of the following:

        • string
        • null
      • bytes
        required

        The file's size in bytes; null when it is charged nothing.

        One of the following:

        • number
        • null
      • quota_bytes
        number
        required

        The file's size in bytes; zero when it is charged nothing.

      • name
        string
        required
      • title
        required

        One of the following:

        • string
        • null
      • ext
        required

        One of the following:

        • string
        • null
      • status
        string
        required
      • optimized
        boolean
        required
      • parent_id
        required

        One of the following:

        • string
        • null
      • redacted
        boolean
        required
      • security
        required

        One of the following:

        • string
        • null
      • description
        required

        One of the following:

        • string
        • null
      • processed_at
        required

        One of the following:

        • string
        • null
      • metadata
        object
        required
        • width
          optional
          integer
          minimum: 0
        • height
          optional
          integer
          minimum: 0
        • duration
          optional
          number

          Seconds, measured, so rarely whole.

        • pages
          optional
          integer
          minimum: 0
        • waveform
          optional

          An audio file's waveform: 256 levels from 0 to 255, base64; null when it can't be drawn.

          One of the following:

          • string
          • null
        • transcript
          optional
          object
          • language
            optional
            string
          • confidence
            optional
            number
        • arguments
          optional
          array of
          object

          What an MCP prompt asks for; only an authored prompt carries it.

          • name
            string
            required
          • description
            required

            One of the following:

            • string
            • null
          • required
            boolean
            required
          • default
            required

            One of the following:

            • string
            • null
          • match
            required

            Pattern the whole value must match, diacritic-insensitive.

            One of the following:

            • string
            • null
          • flags
            required

            Flags among i, s and u the pattern runs with; null for i alone.

            One of the following:

            • string
            • null
          • message
            required

            What a refused value is told instead of the default reason.

            One of the following:

            • string
            • null
          • lenient
            boolean
            required
      • created_at
        required

        One of the following:

        • string
        • null
JSON
  • type
    string
    required
    format: uri
  • title
    string
    required
  • status
    integer
    required
  • detail
    string
    required
  • code
    optional
    string
  • context
    optional
    object
  • reached_core
    optional
    boolean
  • core_answer
    optional
    string

Type to search…

↑↓ navigate↵ selectEsc close