Zernio
APIFor you
Zernio
APIFor you
API Reference

Commerce

Store & Products

Get a storeGETList productsGETGet a productGETCreate a productPOSTUpdate a productPATCHDuplicate a productPOSTActivate, deactivate, archive or delete productsPOSTAdd or remove tags in bulkPOSTUpdate variant pricesPOST

Variants, Options & Images

Add variantsPOSTDelete variantsDELETEAdd optionsPOSTDelete optionsDELETEAdd imagesPOSTRemove imagesDELETEReorder imagesPOST

Inventory

List locationsGETGet a product's stockGETSet or adjust stockPOST

Collections

List collectionsGETGet a collectionGETCreate a collectionPOSTUpdate a collectionPATCHDelete a collectionDELETEAdd or remove products in a collectionPOSTReorder products in a collectionPOST

Discounts

List discountsGETGet a discountGETCreate a discountPOSTUpdate a discountPATCHActivate or deactivate a discountPOSTAdd codes to a discountPOSTDelete a discountDELETE

Sales Channels

List sales channelsGET

Markets & Price Lists

List marketsGETList price listsGETSet fixed pricesPUTRemove fixed pricesDELETE

Metafields & Metaobjects

List metaobject definitionsGETList metaobjects of a typeGETGet a metaobjectGETCreate a metaobjectPOSTUpdate a metaobjectPATCHDelete a metaobjectDELETE

Pages, Menus & Redirects

List pagesGETGet a pageGETCreate a pagePOSTUpdate a pagePATCHDelete a pageDELETEList navigation menusGETGet a navigation menuGETCreate a navigation menuPOSTReplace a navigation menuPUTDelete a navigation menuDELETEList URL redirectsGETCreate a URL redirectPOSTUpdate a URL redirectPATCHDelete a URL redirectDELETE

Marketing Activities

Record a marketing activityPUTDelete a marketing activityDELETEReport daily engagementPOST

Meta Catalog Sync

List catalog syncsGETSync a store into a Meta catalogPOSTGet a catalog syncGETRun a catalog sync nowPOSTStop a catalog syncDELETE

Other

Publish or unpublish a collectionPOSTPublish or unpublish a productPOSTDelete collection metafieldsDELETEDelete product metafieldsDELETEGet an orderGETList collection metafieldsGETList ordersGETList product metafieldsGETSet collection metafieldsPUTSet product metafieldsPUT
Dashboard
OverviewPlatformsAPI ReferenceResources
Commerce

Get an order

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


PlatformsShopify
GET
/v1/commerce/orders/{orderId}

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

orderId*string

Platform-native order id.

Query Parameters

accountId*string

Connected store SocialAccount id.

Response Body

application/json

application/json

application/json

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",    "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": [      {        "carrierName": "string",        "trackingNumber": "string",        "trackingUrl": "string"      }    ],    "platformData": {}  }}
Was this page helpful?

Delete product metafields

Deletes the product custom fields named in `keys` (comma-separated `namespace.key`, up to 25) and returns how many were deleted. Needs metafields.write.

List collection metafields

The collection's metafields as namespace, key, type and value. Needs collections.metafields: WooCommerce keeps custom fields on products only and answers 400 platform_not_supported.