Skip to content
Navigation

Answers what a save takes for a kind of body: its block types, each block's props with their types, values and limits, which are required, and where blocks may sit.

GET
https://api.sherpo.io/merchant/v1/stores/{store}/body_schema

Authorization

  • bearer
    HTTP
    required

Path parameters

  • store
    string
    required

    The store's id.

Query parameters

  • kind
    product
    or
    store
    or
    event
    or
    all
    or
    page
    or
    portfolio
    +2 more
    required

    The kind of body: store, page, product (any product but an event or a portfolio), event, portfolio, lesson (an entry of any product but a blog or a podcast, a portfolio's posts included), article (a blog's or a podcast's entry) or all.

Returns

200

Answers what a save takes for a kind of body: its block types, each block's props with their types, values and limits, which are required, and where blocks may sit.

JSON
  • kinds
    array of
    object
    required
    • kind
      string
      required
    • summary
      string
      required
    • block_types
      array of
      string
      required

      The types it newly stores as its blocks, inside its containers too.

    • text_block_types
      array of
      string
      required

      The types its texts (a markdown block's content, and those its blocks nest) newly hold as <block> elements.

    • max_blocks
      number
      required
    • max_container_depth
      required

      How deep its containers nest, a text counting as a level; null where only the layout's nesting caps them.

      One of the following:

      • number
      • null
    • text_max_container_depth
      number
      required

      How deep containers nest in its texts' inline blocks.

    • required
      array of
      object
      required

      The blocks a product of a category must show; category null for every category not listed.

      • category
        required

        One of the following:

        • string
        • null
      • types
        array of
        string
        required
    • at_most
      array of
      object
      required

      The most of a type it shows.

      • type
        string
        required
      • count
        number
        required
    • rules
      array of
      string
      required

      Where blocks may sit and what the body holds as a whole.

    • schema
      optional
      string

      The layout a save takes, in JSON Schema draft 2020-12, as JSON text; answered for one kind, not for all.

  • blocks
    array of
    object
    required

    Every type a listed kind takes, in its body or its texts.

    • type
      string
      required
    • summary
      string
      required
    • container
      boolean
      required
    • props
      array of
      object
      required
      • path
        string
        required
      • types
        array of
        string
        required

        The JSON types it takes.

      • required
        boolean
        required

        Whether the object holding it requires it.

      • description
        optional
        string
      • values
        optional
        array of

        The only values it takes, when it lists them; a string matching pattern or a number in range may be another.

        One of the following:

        • boolean
        • string
        • number
      • pattern
        optional
        string
      • minimum
        optional
        number
      • maximum
        optional
        number
      • min_length
        optional
        number
      • max_length
        optional
        number
      • min_items
        optional
        number
      • max_items
        optional
        number
      • blocks
        optional
        boolean

        Whether it holds blocks, of the types the body takes.

    • rules
      array of
      string
      required

      What its props must hold together, past each prop's own values.

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