Skip to main content
POST
/
stores
/
{storeId}
/
coupons
cURL
curl --request POST \
  --url https://api.pandabase.io/v2/core/stores/{storeId}/coupons/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "code": "<string>",
  "type": "FIXED",
  "value": 2,
  "displayName": "<string>",
  "description": "<string>",
  "minimumPurchase": 1,
  "maxUses": 2,
  "maxUsesPerCustomer": 2,
  "firstPurchaseOnly": false,
  "startsAt": "2023-11-07T05:31:56Z",
  "expiresAt": "2023-11-07T05:31:56Z",
  "enabled": true,
  "productIds": [
    "<string>"
  ]
}
'
{
  "ok": true,
  "data": {
    "id": "cpn_p2v8q1mzj0kxw5h7n4tr3bcf",
    "code": "LAUNCH20",
    "displayName": "Launch week 20% off",
    "description": "Limited-time launch discount.",
    "type": "PERCENTAGE",
    "value": 20,
    "minimumPurchase": 1000,
    "maxUses": 500,
    "maxUsesPerCustomer": 1,
    "firstPurchaseOnly": false,
    "startsAt": "2026-05-01T00:00:00.000Z",
    "expiresAt": "2026-06-01T00:00:00.000Z",
    "enabled": true,
    "timesUsed": 42,
    "productIds": [],
    "createdAt": "2026-04-28T08:30:00.000Z",
    "updatedAt": "2026-05-12T11:15:00.000Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.pandabase.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer token mode — passes the secret directly. Token starts with sk_.

Path Parameters

storeId
string
required
Required string length: 12 - 48

Body

application/json
code
string
required
Required string length: 2 - 64
Pattern: ^[A-Za-z0-9_\-]+$
type
required
Available options:
FIXED
value
integer
required
Required range: x >= 1
displayName
string
Required string length: 1 - 128
description
string
Maximum string length: 500
minimumPurchase
integer
Required range: x >= 0
maxUses
integer
Required range: x >= 1
maxUsesPerCustomer
integer
Required range: x >= 1
firstPurchaseOnly
boolean
default:false
startsAt
string<date-time>
expiresAt
string<date-time>
enabled
boolean
default:true
productIds
string[]
Maximum array length: 50
Required string length: 12 - 48

Response

Default Response

ok
enum<boolean>
required
Available options:
true
data
any
required