cURL
curl -X PATCH https://api.neuraldraft.io/v1/product-categories/5 \
-H "Authorization: Bearer ndsk_live_yourkey" \
-H "Content-Type: application/json" \
-d '{"sort_order":10}'await nd.productCategories.update(5, { sortOrder: 10 });
requests.patch("https://api.neuraldraft.io/v1/product-categories/5",
headers={"Authorization": f"Bearer {key}"}, json={"sort_order":10})
<?php
$client->patch('product-categories/5', [
'headers' => ['Authorization' => 'Bearer '.$key],
'json' => ['sort_order' => 10],
]);
{
"id": 4,
"name": "Studio essentials",
"slug": "studio-essentials",
"description": "<string>",
"image": "<string>",
"parent_id": 123,
"sort_order": 0,
"is_active": true,
"children": "<array>"
}{
"type": "https://api.neuraldraft.io/errors/bad_request",
"title": "Bad request",
"status": 400,
"detail": "Request body could not be parsed.",
"code": "bad_request",
"instance": "req_2Nh4PqRsTuVw"
}{
"type": "https://api.neuraldraft.io/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "API key missing or invalid.",
"code": "unauthorized",
"instance": "req_2Nh4PqRsTuVw"
}{
"type": "https://api.neuraldraft.io/errors/not_found",
"title": "Not found",
"status": 404,
"detail": "No such resource.",
"code": "not_found",
"instance": "req_2Nh4PqRsTuVw"
}Commerce
Update a product category
PATCH
/
product-categories
/
{id}
cURL
curl -X PATCH https://api.neuraldraft.io/v1/product-categories/5 \
-H "Authorization: Bearer ndsk_live_yourkey" \
-H "Content-Type: application/json" \
-d '{"sort_order":10}'await nd.productCategories.update(5, { sortOrder: 10 });
requests.patch("https://api.neuraldraft.io/v1/product-categories/5",
headers={"Authorization": f"Bearer {key}"}, json={"sort_order":10})
<?php
$client->patch('product-categories/5', [
'headers' => ['Authorization' => 'Bearer '.$key],
'json' => ['sort_order' => 10],
]);
{
"id": 4,
"name": "Studio essentials",
"slug": "studio-essentials",
"description": "<string>",
"image": "<string>",
"parent_id": 123,
"sort_order": 0,
"is_active": true,
"children": "<array>"
}{
"type": "https://api.neuraldraft.io/errors/bad_request",
"title": "Bad request",
"status": 400,
"detail": "Request body could not be parsed.",
"code": "bad_request",
"instance": "req_2Nh4PqRsTuVw"
}{
"type": "https://api.neuraldraft.io/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "API key missing or invalid.",
"code": "unauthorized",
"instance": "req_2Nh4PqRsTuVw"
}{
"type": "https://api.neuraldraft.io/errors/not_found",
"title": "Not found",
"status": 404,
"detail": "No such resource.",
"code": "not_found",
"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.
Path Parameters
Body
application/json