List collections
Lists the store's product collections. Cursor-paginated like products.
List a collection's products with GET /v1/commerce/products?collectionId=....
Authorization
bearerAuth API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Query Parameters
Connected store SocialAccount id.
1 <= value <= 10020Platform collection search syntax (Shopify: title, handle, collection_type, ...).
length <= 500Response 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.listCommerceCollections({ query: { accountId: 'account_abc123', },});console.log(data);{ "collections": [ { "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": {} } ], "nextCursor": "string"}Set or adjust stock
`set` makes `quantity` the new available count; `adjust` adds `quantity` (negative to subtract). The variant must be stocked at the location. Answers the product's stock after the change.
Get a collection
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.