Commerce
Get an order
One order with every line item, tax line and refund. Needs orders.read.
PlatformsShopify
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.