Pandabase
Store APIsProducts

Create product

POST
/stores/{storeId}/products/

Creates a new product on the store. Subscription products require a billing interval. Requires the PRODUCTS_WRITE scope.

Authorization

AuthorizationBearer <token>

Bearer token authentication. Pass the secret directly in the Authorization header. Token secrets start with sk_.

In: header

Path Parameters

storeId*string
Length12 <= length <= 48

Header Parameters

idempotency-key?string
Length8 <= length <= 32

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/stores/stringstring/products/" \  -H "Content-Type: application/json" \  -d '{    "title": "string",    "productType": "SUBSCRIPTION",    "price": 0  }'
{  "ok": true,  "data": {    "id": "prd_8h4t6sqzy3x9w5n2k1m0vqbf",    "title": "Pro Plan",    "subtitle": "Everything you need to ship",    "description": "Full access to the platform. Unlimited stores, no transaction caps.",    "handle": "pro-plan",    "price": 2900,    "compareAtPrice": 4900,    "images": [      "https://cdn.pandabase.io/products/img_xxx.jpg"    ],    "inStock": true,    "currency": "USD",    "productType": "DIGITAL",    "fulfillmentMode": "LICENSE_POOL",    "pricingModel": "STANDARD",    "status": "ACTIVE",    "minimumPrice": null,    "maxPerCustomer": null,    "availableFrom": null,    "availableUntil": null,    "revokeOnRefund": true,    "options": [],    "variants": [],    "categories": []  }}

Last updated on