OverviewPlatformsAPI ReferenceResources
Commerce

Get a collection

GEThttps://zernio.com/api/v1/commerce/collections/{collectionId}

One collection (a category on WooCommerce) with its image, sort order and product count. List its products with GET /v1/commerce/products?collectionId=. Needs collections.read.

PlatformsShopify

Authentication

AuthorizationBearer tokenRequired

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

Path parameters

collectionIdstringRequired

Platform-native collection id.

Query parameters

accountIdstringRequired

Connected store SocialAccount id.

Responses

Success· the request worked

Errors· the request failed

GET/v1/commerce/collections/{collectionId}
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.commerce.getCommerceCollection({  path: {    collectionId: 'collection_abc123',  },  query: {    accountId: 'account_abc123',  },});console.log(data);
{  "collection": {    "id": "string",    "accountId": "string",    "platform": "shopify",    "title": "string",    "handle": "string",    "descriptionHtml": "string",    "image": {      "id": "string",      "url": "string",      "altText": "string"    },    "sortOrder": "manual",    "productCount": 0,    "seo": {      "title": "string",      "description": "string"    },    "updatedAt": "2019-08-24T14:15:22Z",    "platformData": {}  }}
OpenAPI specification
Was this page helpful?