Skip to content

List products

Pages the store's products with what the customer holds of each.

Needs the read scope.

Pages its answer: pass the cursor back for the next page, at most 100 items a page.

Filters: category (eq, in), listing (eq).

Sorts: catalog, published, title.

Searches title, subtitle. An empty page with a cursor means nothing so far: only a null cursor ends a search. A searched page past the count budget comes back without its total and facets, which never means zero.

Call

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

Arguments

Name Type Required Description
query object No
coupon string No A discount’s code, or its id as an affiliate link carries it, priced into the offers.
{
  "type": "object",
  "properties": {
    "query": {
      "type": "object",
      "properties": {
        "filter": {
          "type": "object",
          "properties": {
            "category": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "object",
                  "properties": {
                    "eq": {
                      "type": "string"
                    },
                    "in": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "minItems": 1,
                      "maxItems": 50
                    }
                  },
                  "minProperties": 1,
                  "additionalProperties": false
                }
              ]
            },
            "listing": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "primary",
                    "secondary"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "eq": {
                      "type": "string",
                      "enum": [
                        "primary",
                        "secondary"
                      ]
                    }
                  },
                  "minProperties": 1,
                  "additionalProperties": false
                }
              ]
            }
          },
          "additionalProperties": false
        },
        "sort": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "enum": [
                "catalog",
                "published",
                "title"
              ]
            },
            "direction": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          },
          "additionalProperties": false
        },
        "search": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "limit": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100
        },
        "cursor": {
          "type": "string",
          "maxLength": 8192
        },
        "count": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "coupon": {
      "description": "A discount's code, or its id as an affiliate link carries it, priced into the offers.",
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    }
  },
  "additionalProperties": false
}

Answer

Name Type Required Description
total number No
items array of object Yes
cursor string or null Yes

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

Type to search…

↑↓ navigate↵ selectEsc close