cURL
curl https://api.neuraldraft.io/v1/orders/901 \
-H "Authorization: Bearer ndsk_live_yourkey"const order = await nd.orders.get(901);
order = requests.get("https://api.neuraldraft.io/v1/orders/901",
headers={"Authorization": f"Bearer {key}"}).json()
<?php
$order = json_decode((string) $client->get('orders/901', [
'headers' => ['Authorization' => 'Bearer '.$key],
])->getBody(), true);
{
"id": 901,
"order_number": "ND-1745014102-A8F2",
"customer_email": "jsmith@example.com",
"status": "pending",
"payment_status": "unpaid",
"total": 123,
"currency": "gbp",
"customer_name": "<string>",
"customer_phone": "<string>",
"subtotal": 123,
"tax_amount": 123,
"shipping_amount": 123,
"discount_amount": 123,
"payment_method": "stripe",
"billing_address": {},
"shipping_address": {},
"notes": "<string>",
"admin_notes": "<string>",
"items": [
{
"name": "<string>",
"quantity": 1,
"unit_price": 2999,
"total": 2999,
"product_id": 123,
"product_variant_id": 123,
"sku": "<string>",
"metadata": {}
}
],
"paid_at": "2023-11-07T05:31:56Z",
"shipped_at": "2023-11-07T05:31:56Z",
"delivered_at": "2023-11-07T05:31:56Z",
"cancelled_at": "2023-11-07T05:31:56Z",
"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 an order
GET
/
orders
/
{id}
cURL
curl https://api.neuraldraft.io/v1/orders/901 \
-H "Authorization: Bearer ndsk_live_yourkey"const order = await nd.orders.get(901);
order = requests.get("https://api.neuraldraft.io/v1/orders/901",
headers={"Authorization": f"Bearer {key}"}).json()
<?php
$order = json_decode((string) $client->get('orders/901', [
'headers' => ['Authorization' => 'Bearer '.$key],
])->getBody(), true);
{
"id": 901,
"order_number": "ND-1745014102-A8F2",
"customer_email": "jsmith@example.com",
"status": "pending",
"payment_status": "unpaid",
"total": 123,
"currency": "gbp",
"customer_name": "<string>",
"customer_phone": "<string>",
"subtotal": 123,
"tax_amount": 123,
"shipping_amount": 123,
"discount_amount": 123,
"payment_method": "stripe",
"billing_address": {},
"shipping_address": {},
"notes": "<string>",
"admin_notes": "<string>",
"items": [
{
"name": "<string>",
"quantity": 1,
"unit_price": 2999,
"total": 2999,
"product_id": 123,
"product_variant_id": 123,
"sku": "<string>",
"metadata": {}
}
],
"paid_at": "2023-11-07T05:31:56Z",
"shipped_at": "2023-11-07T05:31:56Z",
"delivered_at": "2023-11-07T05:31:56Z",
"cancelled_at": "2023-11-07T05:31:56Z",
"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:
901
Response
Order.
Example:
901
Example:
"ND-1745014102-A8F2"
Available options:
pending, paid, processing, shipped, delivered, cancelled, refunded Available options:
unpaid, paid, partially_refunded, refunded, failed Example:
"gbp"
Available options:
stripe, manual Hidden in public lookups.
Show child attributes
Show child attributes