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

List orders

The store's orders in one format for every platform, with what an invoice needs: line items with unit prices, discounts and tax per line, shipping and fee lines, billing details, payment status and refunds. Newest order first; with updatedAfter, oldest change first, so a sync can page forward from its last seen updatedAt. Start each sync a few minutes before the last updatedAt you saw and drop duplicates by id, since an order edited while you page can shift the list. Shopify returns at most 25 orders per page and, unless the store was granted access to all orders, only the last 60 days. Buyer fields (customer and addresses) are null when the store's approval does not cover buyer data. Needs orders.read.


PlatformsShopify
GET
/v1/commerce/orders

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Query Parameters

accountId*string

Connected store SocialAccount id.

limit?integer
Range1 <= value <= 100
Default20
cursor?string
createdAfter?string
Formatdate-time
createdBefore?string
Formatdate-time
updatedAfter?string

Only orders changed after this time, oldest change first.

Formatdate-time

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.listCommerceOrders({  query: {    accountId: 'account_abc123',  },});console.log(data);
{  "orders": [    {      "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": {}    }  ],  "nextCursor": "string"}
Was this page helpful?

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.

List product metafields

The product's custom fields (metafields on Shopify, public meta on WooCommerce) as namespace, key, type and value. Needs metafields.read.