Skip to main content
GET
/
api
/
v3
/
store
/
categories
Spree SDK
import { createClient } from '@spree/sdk'

const client = createClient({
  baseUrl: 'https://your-store.com',
  publishableKey: '<api-key>',
})

const categories = await client.categories.list({
  page: 1,
  limit: 25,
})
{
  "data": [
    {
      "id": "ctg_UkLWZg9DAJ",
      "name": "taxonomy_1",
      "permalink": "taxonomy-1",
      "position": 0,
      "depth": 0,
      "meta_title": null,
      "meta_description": null,
      "meta_keywords": null,
      "children_count": 1,
      "parent_id": null,
      "description": "",
      "description_html": "",
      "image_url": null,
      "square_image_url": null,
      "is_root": true,
      "is_child": false,
      "is_leaf": false
    },
    {
      "id": "ctg_gbHJdmfrXB",
      "name": "taxon_1",
      "permalink": "taxonomy-1/taxon-1",
      "position": 0,
      "depth": 1,
      "meta_title": null,
      "meta_description": null,
      "meta_keywords": null,
      "children_count": 1,
      "parent_id": "ctg_UkLWZg9DAJ",
      "description": "",
      "description_html": "",
      "image_url": null,
      "square_image_url": null,
      "is_root": false,
      "is_child": true,
      "is_leaf": false
    },
    {
      "id": "ctg_EfhxLZ9ck8",
      "name": "taxon_2",
      "permalink": "taxonomy-1/taxon-1/taxon-2",
      "position": 0,
      "depth": 2,
      "meta_title": null,
      "meta_description": null,
      "meta_keywords": null,
      "children_count": 0,
      "parent_id": "ctg_gbHJdmfrXB",
      "description": "",
      "description_html": "",
      "image_url": null,
      "square_image_url": null,
      "is_root": false,
      "is_child": true,
      "is_leaf": true
    }
  ],
  "meta": {
    "page": 1,
    "limit": 25,
    "count": 3,
    "pages": 1,
    "from": 1,
    "to": 3,
    "in": 3,
    "previous": null,
    "next": null
  }
}

Authorizations

x-spree-api-key
string
header
required

Publishable API key for store access

Headers

x-spree-api-key
string
required

Query Parameters

page
integer
limit
integer
q[name_cont]
string

Filter by name

fields
string

Comma-separated list of fields to include (e.g., name,slug,price). id is always included.

Response

categories found

data
object[]
meta
object