cURL
curl https://api.neuraldraft.io/v1/products/32 \
-H "Authorization: Bearer ndsk_live_yourkey"const p = await nd.products.get(32);
p = requests.get("https://api.neuraldraft.io/v1/products/32",
headers={"Authorization": f"Bearer {key}"}).json()
<?php
$p = json_decode((string) $client->get('products/32', [
'headers' => ['Authorization' => 'Bearer '.$key],
])->getBody(), true);
{
"id": 32,
"name": "Cork yoga block (pair)",
"slug": "cork-yoga-block-pair",
"price": 2999,
"currency": "gbp",
"status": "active",
"description": "<string>",
"short_description": "<string>",
"compare_at_price": 3999,
"type": "physical",
"sku": "ND-CORK-PAIR",
"stock_quantity": 24,
"track_inventory": false,
"weight": 0.6,
"images": [
"<string>"
],
"metadata": {},
"category_id": 4,
"featured": false,
"published_at": "2023-11-07T05:31:56Z",
"variants": [
{
"id": 71,
"product_id": 32,
"name": "Natural cork",
"price": 2999,
"sku": "ND-CORK-PAIR-N",
"stock_quantity": 123,
"options": {
"color": "natural"
},
"sort_order": 0,
"is_active": true
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"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
Get a product
GET
/
products
/
{id}
cURL
curl https://api.neuraldraft.io/v1/products/32 \
-H "Authorization: Bearer ndsk_live_yourkey"const p = await nd.products.get(32);
p = requests.get("https://api.neuraldraft.io/v1/products/32",
headers={"Authorization": f"Bearer {key}"}).json()
<?php
$p = json_decode((string) $client->get('products/32', [
'headers' => ['Authorization' => 'Bearer '.$key],
])->getBody(), true);
{
"id": 32,
"name": "Cork yoga block (pair)",
"slug": "cork-yoga-block-pair",
"price": 2999,
"currency": "gbp",
"status": "active",
"description": "<string>",
"short_description": "<string>",
"compare_at_price": 3999,
"type": "physical",
"sku": "ND-CORK-PAIR",
"stock_quantity": 24,
"track_inventory": false,
"weight": 0.6,
"images": [
"<string>"
],
"metadata": {},
"category_id": 4,
"featured": false,
"published_at": "2023-11-07T05:31:56Z",
"variants": [
{
"id": 71,
"product_id": 32,
"name": "Natural cork",
"price": 2999,
"sku": "ND-CORK-PAIR-N",
"stock_quantity": 123,
"options": {
"color": "natural"
},
"sort_order": 0,
"is_active": true
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"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
Example:
32
Response
The product.
Example:
32
Example:
"Cork yoga block (pair)"
Example:
"cork-yoga-block-pair"
Example:
2999
Example:
"gbp"
Available options:
draft, active, archived Example:
"active"
Maximum string length:
500Example:
3999
Available options:
physical, digital, service Example:
"physical"
Example:
"ND-CORK-PAIR"
Example:
24
Example:
0.6
Example:
4
Show child attributes
Show child attributes