OverviewPlatformsAPI ReferenceResources
Commerce

Create a collection

POSThttps://zernio.com/api/v1/commerce/collections

Creates a collection, optionally with hand-picked products. On Shopify the collection starts unpublished from the online store; publish it from the Shopify admin.

PlatformsShopify

Authentication

AuthorizationBearer tokenRequired

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

Body

application/json

What every request needs

accountIdstringRequired
titlestringRequired
Optional parameters6 fields
descriptionHtmlstring
handlestring
sortOrderstringOne of manual | best_selling | alpha_asc | alpha_desc | price_asc | price_desc | created | created_desc | most_relevant
seoobject
imageobject
urlstring (uri)Required
productIdsarray of strings

Responses

Success· the request worked

Errors· the request failed

POST/v1/commerce/collections
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.commerce.createCommerceCollection({  body: {    accountId: 'account_abc123',    title: 'Example',  },});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?