Skip to content

Read body

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.

Needs the read scope.

Call

  • Tool: read_body
  • Scope: read
  • Reads only.
  • Acts on a store.

Arguments

Name Type Required Description
target object Yes
preview string No 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.
fallback boolean No Answers the target’s default layout whatever its body, for a page that can show none of its own blocks.
{
  "type": "object",
  "properties": {
    "target": {
      "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
        }
      ]
    },
    "preview": {
      "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
    },
    "fallback": {
      "description": "Answers the target's default layout whatever its body, for a page that can show none of its own blocks.",
      "type": "boolean"
    }
  },
  "required": [
    "target"
  ],
  "additionalProperties": false
}

Answer

The answer is under result.

The answer’s full shape is on its API reference page.

Type to search…

↑↓ navigate↵ selectEsc close