---
title: "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."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.sherpo.io/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Sherpo merchant API › file

`GET /v1/stores/{store}/body_schema`

## Authentication

- `bearer`, http, header `Authorization`, scopes: `file:read`

## Path parameters

- `store` (`getBodySchema.path.store`; string, required) — The store's id.

## Query parameters

- `kind` (`getBodySchema.query.kind`; string, 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`.
  - one of `"product"`, `"store"`, `"event"`, `"all"`, `"page"`, `"portfolio"`, `"lesson"`, `"article"`

## Code samples

### cURL

```bash
curl --request GET \
  --url 'https://api.sherpo.io/merchant/v1/stores/<store>/body_schema?kind=product' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.sherpo.io/merchant/v1/stores/<store>/body_schema?kind=product';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.sherpo.io/merchant/v1/stores/<store>/body_schema?kind=product"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 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.

#### Example

```json
{
  "kinds": [
    {
      "kind": "string",
      "summary": "string",
      "block_types": [
        "string"
      ],
      "text_block_types": [
        "string"
      ],
      "max_blocks": 0,
      "max_container_depth": 0,
      "text_max_container_depth": 0,
      "required": [
        {
          "category": "string",
          "types": [
            "string"
          ]
        }
      ],
      "at_most": [
        {
          "type": "string",
          "count": 0
        }
      ],
      "rules": [
        "string"
      ],
      "schema": "string"
    }
  ],
  "blocks": [
    {
      "type": "string",
      "summary": "string",
      "container": true,
      "props": [
        {
          "path": "string",
          "types": [
            "string"
          ],
          "required": true,
          "description": "string",
          "values": [
            true
          ],
          "pattern": "string",
          "minimum": 0,
          "maximum": 0,
          "min_length": 0,
          "max_length": 0,
          "min_items": 0,
          "max_items": 0,
          "blocks": true
        }
      ],
      "rules": [
        "string"
      ]
    }
  ]
}
```

- `kinds` (`getBodySchema.response.200.kinds`; array<object>, required)
  - `kind` (`getBodySchema.response.200.kinds.kind`; string, required)
  - `summary` (`getBodySchema.response.200.kinds.summary`; string, required)
  - `block_types` (`getBodySchema.response.200.kinds.block_types`; array<string>, required) — The types it newly stores as its blocks, inside its containers too.
  - `text_block_types` (`getBodySchema.response.200.kinds.text_block_types`; array<string>, required) — The types its texts (a markdown block's `content`, and those its blocks nest) newly hold as `<block>` elements.
  - `max_blocks` (`getBodySchema.response.200.kinds.max_blocks`; number, required)
  - `max_container_depth` (`getBodySchema.response.200.kinds.max_container_depth`; any of, required) — How deep its containers nest, a text counting as a level; null where only the layout's nesting caps them.
    - any of: `number`, `null`
  - `text_max_container_depth` (`getBodySchema.response.200.kinds.text_max_container_depth`; number, required) — How deep containers nest in its texts' inline blocks.
  - `required` (`getBodySchema.response.200.kinds.required`; array<object>, required) — The blocks a product of a category must show; `category` null for every category not listed.
    - `category` (`getBodySchema.response.200.kinds.required.category`; any of, required)
      - any of: `string`, `null`
    - `types` (`getBodySchema.response.200.kinds.required.types`; array<string>, required)
  - `at_most` (`getBodySchema.response.200.kinds.at_most`; array<object>, required) — The most of a type it shows.
    - `type` (`getBodySchema.response.200.kinds.at_most.type`; string, required)
    - `count` (`getBodySchema.response.200.kinds.at_most.count`; number, required)
  - `rules` (`getBodySchema.response.200.kinds.rules`; array<string>, required) — Where blocks may sit and what the body holds as a whole.
  - `schema` (`getBodySchema.response.200.kinds.schema`; string, optional) — The layout a save takes, in JSON Schema draft 2020-12, as JSON text; answered for one kind, not for `all`.
- `blocks` (`getBodySchema.response.200.blocks`; array<object>, required) — Every type a listed kind takes, in its body or its texts.
  - `type` (`getBodySchema.response.200.blocks.type`; string, required)
  - `summary` (`getBodySchema.response.200.blocks.summary`; string, required)
  - `container` (`getBodySchema.response.200.blocks.container`; boolean, required)
  - `props` (`getBodySchema.response.200.blocks.props`; array<object>, required)
    - `path` (`getBodySchema.response.200.blocks.props.path`; string, required)
    - `types` (`getBodySchema.response.200.blocks.props.types`; array<string>, required) — The JSON types it takes.
    - `required` (`getBodySchema.response.200.blocks.props.required`; boolean, required) — Whether the object holding it requires it.
    - `description` (`getBodySchema.response.200.blocks.props.description`; string, optional)
    - `values` (`getBodySchema.response.200.blocks.props.values`; array<any of>, optional) — The only values it takes, when it lists them; a string matching `pattern` or a number in range may be another.
      - any of: `boolean`, `string`, `number`
    - `pattern` (`getBodySchema.response.200.blocks.props.pattern`; string, optional)
    - `minimum` (`getBodySchema.response.200.blocks.props.minimum`; number, optional)
    - `maximum` (`getBodySchema.response.200.blocks.props.maximum`; number, optional)
    - `min_length` (`getBodySchema.response.200.blocks.props.min_length`; number, optional)
    - `max_length` (`getBodySchema.response.200.blocks.props.max_length`; number, optional)
    - `min_items` (`getBodySchema.response.200.blocks.props.min_items`; number, optional)
    - `max_items` (`getBodySchema.response.200.blocks.props.max_items`; number, optional)
    - `blocks` (`getBodySchema.response.200.blocks.props.blocks`; boolean, optional) — Whether it holds blocks, of the types the body takes.
  - `rules` (`getBodySchema.response.200.blocks.rules`; array<string>, required) — What its props must hold together, past each prop's own values.

### default

A problem; see https://api.sherpo.io/merchant/docs/errors.

#### Example

```json
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "context": {},
  "reached_core": true,
  "core_answer": "string"
}
```

- `type` (`getBodySchema.response.default.type`; string, required)
  - format `uri`
- `title` (`getBodySchema.response.default.title`; string, required)
- `status` (`getBodySchema.response.default.status`; integer, required)
- `detail` (`getBodySchema.response.default.detail`; string, required)
- `code` (`getBodySchema.response.default.code`; string, optional)
- `context` (`getBodySchema.response.default.context`; object, optional)
- `reached_core` (`getBodySchema.response.default.reached_core`; boolean, optional)
- `core_answer` (`getBodySchema.response.default.core_answer`; string, optional)


Source: https://docs.sherpo.io/merchant-api/reference/get-body-schema/index.md
