Skip to main content
PATCH
/
products
/
{productId}
/
licenses
/
{licenseId}
Update a license
curl --request PATCH \
  --url https://pandabase.io/api/products/{productId}/licenses/{licenseId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Storefront-Id: <x-storefront-id>' \
  --data '{
  "status": "active",
  "metadata": {},
  "expires_at": "2023-11-07T05:31:56Z"
}'
{
  "ok": true,
  "data": {
    "id": "lic_abc123",
    "key": "XXXX-XXXX-XXXX-XXXX",
    "product_id": "prod_xyz789",
    "status": "active",
    "customer_id": "cust_123456",
    "metadata": {},
    "expires_at": "2025-12-31T23:59:59Z",
    "activated_at": "2023-11-07T05:31:56Z",
    "created_at": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

V3 API key authentication. Format: sk_v3_xxxxx

Headers

X-Storefront-Id
string
required

Your storefront/shop ID

Path Parameters

productId
string
required
licenseId
string
required

Body

application/json
status
enum<string>

Update license status

Available options:
active,
suspended,
revoked
metadata
object
expires_at
string<date-time> | null

Response

License updated successfully

ok
boolean
Example:

true

data
object