OverviewProductsPlatformsAPI ReferenceResources
Commerce

Get an order

GEThttps://zernio.com/api/v1/commerce/orders/{orderId}

One order with every line item, tax line and refund. Needs orders.read.

PlatformsShopify

Authentication

AuthorizationBearer tokenRequired

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

Path parameters

orderIdstringRequired

Platform-native order id.

Query parameters

accountIdstringRequired

Connected store SocialAccount id.

Responses

Success· the request worked

Errors· the request failed

GET/v1/commerce/orders/{orderId}
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.commerce.getCommerceOrder({  path: {    orderId: 'order_abc123',  },  query: {    accountId: 'account_abc123',  },});console.log(data);
{  "order": {    "id": "string",    "accountId": "string",    "platform": "shopify",    "number": "string",    "status": "pending_payment",    "platformStatus": "string",    "paymentStatus": "pending",    "platformPaymentStatus": "string",    "currency": "string",    "taxesIncluded": true,    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "paidAt": "2019-08-24T14:15:22Z",    "cancelledAt": "2019-08-24T14:15:22Z",    "cancelReason": "string",    "subtotal": {      "amount": "string",      "currency": "string"    },    "discountTotal": {      "amount": "string",      "currency": "string"    },    "shippingTotal": {      "amount": "string",      "currency": "string"    },    "taxTotal": {      "amount": "string",      "currency": "string"    },    "total": {      "amount": "string",      "currency": "string"    },    "refundedTotal": {      "amount": "string",      "currency": "string"    },    "discountCodes": [      "string"    ],    "paymentMethods": [      "string"    ],    "customer": {      "id": "string",      "email": "string",      "phone": "string",      "firstName": "string",      "lastName": "string"    },    "billingAddress": {      "firstName": "string",      "lastName": "string",      "company": "string",      "phone": "string",      "line1": "string",      "line2": "string",      "city": "string",      "region": "string",      "postalCode": "string",      "countryCode": "string"    },    "shippingAddress": {      "firstName": "string",      "lastName": "string",      "company": "string",      "phone": "string",      "line1": "string",      "line2": "string",      "city": "string",      "region": "string",      "postalCode": "string",      "countryCode": "string"    },    "buyerNote": "string",    "attribution": {      "ready": true,      "firstVisit": {        "occurredAt": "2019-08-24T14:15:22Z",        "landingUrl": "string",        "referrerUrl": "string",        "source": "string",        "sourceType": "string",        "utm": {          "source": "string",          "medium": "string",          "campaign": "string",          "term": "string",          "content": "string"        }      },      "lastVisit": {        "occurredAt": "2019-08-24T14:15:22Z",        "landingUrl": "string",        "referrerUrl": "string",        "source": "string",        "sourceType": "string",        "utm": {          "source": "string",          "medium": "string",          "campaign": "string",          "term": "string",          "content": "string"        }      },      "customAttributes": [        {          "key": "string",          "value": "string"        }      ]    },    "lineItems": [      {        "id": "string",        "productId": "string",        "variantId": "string",        "sku": "string",        "title": "string",        "variantTitle": "string",        "quantity": 0,        "unitPrice": {          "amount": "string",          "currency": "string"        },        "subtotal": {          "amount": "string",          "currency": "string"        },        "discountTotal": {          "amount": "string",          "currency": "string"        },        "total": {          "amount": "string",          "currency": "string"        },        "taxLines": [          {            "title": "string",            "ratePercent": 0,            "amount": {              "amount": "string",              "currency": "string"            }          }        ]      }    ],    "shippingLines": [      {        "id": "string",        "title": "string",        "amount": {          "amount": "string",          "currency": "string"        },        "discountTotal": {          "amount": "string",          "currency": "string"        },        "taxLines": [          {            "title": "string",            "ratePercent": 0,            "amount": {              "amount": "string",              "currency": "string"            }          }        ]      }    ],    "feeLines": [      {        "id": "string",        "title": "string",        "amount": {          "amount": "string",          "currency": "string"        },        "discountTotal": {          "amount": "string",          "currency": "string"        },        "taxLines": [          {            "title": "string",            "ratePercent": 0,            "amount": {              "amount": "string",              "currency": "string"            }          }        ]      }    ],    "taxLines": [      {        "title": "string",        "ratePercent": 0,        "amount": {          "amount": "string",          "currency": "string"        }      }    ],    "refunds": [      {        "id": "string",        "createdAt": "2019-08-24T14:15:22Z",        "note": "string",        "amount": {          "amount": "string",          "currency": "string"        },        "lineItems": [          {            "lineItemId": "string",            "quantity": 0,            "amount": {              "amount": "string",              "currency": "string"            }          }        ]      }    ],    "fulfillments": [      {        "id": "string",        "carrierName": "string",        "trackingNumber": "string",        "trackingUrl": "string",        "deliveryStatus": "pending",        "platformDeliveryStatus": "string",        "estimatedDeliveryAt": "2019-08-24T14:15:22Z",        "inTransitAt": "2019-08-24T14:15:22Z",        "deliveredAt": "2019-08-24T14:15:22Z"      }    ],    "platformData": {}  }}
OpenAPI specification
Was this page helpful?