cURL
curl https://api.neuraldraft.io/v1/product-categories \
-H "Authorization: Bearer ndsk_live_yourkey"const cats = await nd.productCategories.list();cats = requests.get("https://api.neuraldraft.io/v1/product-categories",
headers={"Authorization": f"Bearer {key}"}).json()["data"]<?php
$cats = json_decode((string) $client->get('product-categories', [
'headers' => ['Authorization' => 'Bearer '.$key],
])->getBody(), true)['data'];{
"data": [
{
"id": 4,
"name": "Studio essentials",
"slug": "studio-essentials",
"parent_id": null,
"is_active": true,
"children": [
{
"id": 5,
"name": "Blocks",
"slug": "blocks",
"parent_id": 4,
"is_active": true
},
{
"id": 6,
"name": "Mats",
"slug": "mats",
"parent_id": 4,
"is_active": true
}
]
}
]
}{
"type": "https://api.neuraldraft.io/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "API key missing or invalid.",
"code": "unauthorized",
"instance": "req_2Nh4PqRsTuVw"
}Commerce
List product categories (tree)
GET
/
product-categories
cURL
curl https://api.neuraldraft.io/v1/product-categories \
-H "Authorization: Bearer ndsk_live_yourkey"const cats = await nd.productCategories.list();cats = requests.get("https://api.neuraldraft.io/v1/product-categories",
headers={"Authorization": f"Bearer {key}"}).json()["data"]<?php
$cats = json_decode((string) $client->get('product-categories', [
'headers' => ['Authorization' => 'Bearer '.$key],
])->getBody(), true)['data'];{
"data": [
{
"id": 4,
"name": "Studio essentials",
"slug": "studio-essentials",
"parent_id": null,
"is_active": true,
"children": [
{
"id": 5,
"name": "Blocks",
"slug": "blocks",
"parent_id": 4,
"is_active": true
},
{
"id": 6,
"name": "Mats",
"slug": "mats",
"parent_id": 4,
"is_active": true
}
]
}
]
}{
"type": "https://api.neuraldraft.io/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "API key missing or invalid.",
"code": "unauthorized",
"instance": "req_2Nh4PqRsTuVw"
}Authorizations
Project API key. Pass as Authorization: Bearer ndsk_live_.... Manage
keys via /projects/me/api-keys. Test-mode keys use
the ndsk_test_ prefix.
Response
Category tree.
Show child attributes
Show child attributes
⌘I