Commerce
Activate, deactivate, archive or delete products
Applies one action to up to 50 products and reports each product's
outcome, so one failure does not abort the rest. On Shopify,
deactivate sets the product to draft and delete is permanent.
PlatformsShopify
Authorization
bearerAuth AuthorizationBearer <token>
API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
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.changeCommerceProductState({ body: { accountId: 'account_abc123', productIds: [ 'product_abc123', ], action: 'activate', },});console.log(data);{ "action": "activate", "succeeded": [ "string" ], "failed": [ { "productId": "string", "message": "string" } ]}Was this page helpful?