Skip to main content
PATCH
/
stores
/
{storeId}
/
products
/
{productId}
Update a product
curl --request PATCH \
  --url https://api.pandabase.io/v2/core/stores/{storeId}/products/{productId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "subtitle": "<string>",
  "description": "<string>",
  "productType": "SUBSCRIPTION",
  "price": 1,
  "compareAtPrice": 1,
  "images": [
    "<string>"
  ],
  "message": "<string>",
  "inStock": true,
  "fulfillmentMode": "MANAGED_LICENSE",
  "pricingModel": "STANDARD",
  "status": "DRAFT",
  "minimumPrice": 1,
  "maxPerCustomer": 2,
  "availableFrom": "2023-11-07T05:31:56Z",
  "availableUntil": "2023-11-07T05:31:56Z",
  "downloadUrl": "<string>",
  "redirectUrl": "<string>",
  "keyFormat": "ALPHANUMERIC",
  "customPrefix": "<string>",
  "maxActivations": 2,
  "licenseDuration": "THIRTY_DAYS",
  "revokeOnRefund": true,
  "lowStockThreshold": 1,
  "webhookUrl": "<string>",
  "webhookSecret": "<string>",
  "billingInterval": "WEEKLY",
  "billingAnchor": "IMMEDIATELY",
  "trialDays": 1,
  "licenseKeys": [
    "<string>"
  ],
  "variants": [
    {
      "id": "<string>",
      "title": "<string>",
      "slug": "<string>",
      "description": "<string>",
      "sku": "<string>",
      "options": "<unknown>",
      "price": 1,
      "compareAtPrice": 1,
      "images": [
        "<string>"
      ],
      "inStock": true,
      "quantity": 1,
      "trackStock": true,
      "position": 1
    }
  ],
  "options": [
    {
      "name": "<string>",
      "values": [
        "<string>"
      ],
      "position": 1
    }
  ],
  "categoryIds": [
    "<string>"
  ]
}
'
{
  "ok": true,
  "data": "<unknown>"
}

Authorizations

Authorization
string
header
required

Store API token. Use the sk_ prefixed secret key as the Bearer token.

Path Parameters

storeId
string
required

Store ID (shp_ prefix)

Required string length: 12 - 48
productId
string
required

Product ID (prd_ prefix)

Required string length: 12 - 48

Body

application/json
title
string
Required string length: 1 - 256
subtitle
string | null
Maximum string length: 512
description
string | null
Maximum string length: 10000
productType
enum<string>
Available options:
SUBSCRIPTION,
DIGITAL_DOWNLOAD,
LICENSE_KEY
price
integer
Required range: x >= 0
compareAtPrice
integer | null
Required range: x >= 0
images
string[]
Maximum array length: 10
message
string | null
Maximum string length: 1000
inStock
boolean
fulfillmentMode
enum<string> | null
Available options:
MANAGED_LICENSE,
LICENSE_POOL,
LICENSE_WEBHOOK,
INSTANT_DOWNLOAD,
REDIRECT,
MANUAL
pricingModel
enum<string>
Available options:
STANDARD,
PAY_WHAT_YOU_WANT,
FREE
status
enum<string>
Available options:
DRAFT,
ACTIVE
minimumPrice
integer | null
Required range: x >= 0
maxPerCustomer
integer | null
Required range: x >= 1
availableFrom
string<date-time> | null
availableUntil
string<date-time> | null
downloadUrl
string | null
Maximum string length: 2048
redirectUrl
string | null
Maximum string length: 2048
keyFormat
enum<string> | null
Available options:
ALPHANUMERIC,
UUID,
CUSTOM_PREFIX
customPrefix
string | null
Maximum string length: 32
maxActivations
integer | null
Required range: x >= 1
licenseDuration
enum<string> | null
Available options:
THIRTY_DAYS,
NINETY_DAYS,
ONE_YEAR,
LIFETIME
revokeOnRefund
boolean
lowStockThreshold
integer | null
Required range: x >= 0
webhookUrl
string | null
Maximum string length: 2048
webhookSecret
string | null
Maximum string length: 256
billingInterval
enum<string> | null
Available options:
WEEKLY,
MONTHLY,
YEARLY
billingAnchor
enum<string> | null
Available options:
IMMEDIATELY,
END_OF_PERIOD
trialDays
integer | null
Required range: x >= 0
licenseKeys
string[]
Maximum array length: 1000
Maximum string length: 512
variants
object[]
Maximum array length: 4
options
object[]
Maximum array length: 20
categoryIds
string[]
Maximum array length: 20

Response

Successful operation

ok
boolean
required
data
any
required