novinzodevelopers
API referenceCore for pluginsCatalog

Create Product

POST/api/catalog/products

Adds a product with its variants to the store, with unlimited stock and no images, archived: hidden from the storefront until PublishProduct, so the plugin can first set up what selling it needs (such as its delivery) and no buyer pays for it before that. Its URL slug comes from its name. Answers the new variants in the order given. Requires the store to have granted the plugin products:write.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

name*string
Length1 <= length <= 63
description?|null
variants*array<>
Items1 <= items <= 10

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/catalog/products" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "variants": [      {        "name": "string",        "unitPriceMinor": 1      }    ]  }'
[  {    "variantId": "string",    "variantName": "string",    "productId": "string",    "productName": "string",    "unitPriceMinor": -9007199254740991,    "deliveredByPluginCode": "string"  }]