NodeRingsDocs

Create Coupon Code

Create Coupon Code on the NodeRings provider API (POST /v1/coupons/{couponId}/codes).

POST
/v1/coupons/{couponId}/codes
Authorization<token>

Bearer token

In: header

X-Organization-ID<token>

Tenant or organization identifier

In: header

Path Parameters

couponIdstring
code?string

Leave empty to generate a random code.

maxRedemptions?integer
Formatint32
validFrom?string
Formatdate-time
validUntil?string
Formatdate-time
noExpiry?boolean
customerOrgIds?array<string>
campaign?string
channel?string

Response Body

application/json

curl -X POST "https://api.noderings.com/v1/coupons/{couponId}/codes" \  -H "Authorization: Bearer {your_token}" \  -H "X-Organization-ID: {your_org_id}" \  -H "Content-Type: application/json" \  -d '{  "code": "string",  "maxRedemptions": 0,  "validFrom": "string",  "validUntil": "string",  "noExpiry": false,  "customerOrgIds": [    "string"  ],  "campaign": "string",  "channel": "string"}'
{
  "id": "string",
  "couponId": "string",
  "code": "string",
  "maxRedemptions": 0,
  "timesRedeemed": 0,
  "validFrom": "2019-08-24T14:15:22Z",
  "validUntil": "2019-08-24T14:15:22Z",
  "customerOrgIds": [
    "string"
  ],
  "campaign": "string",
  "channel": "string",
  "batchId": "string",
  "status": "STATUS_UNSPECIFIED",
  "timestamps": {
    "createTime": "2019-08-24T14:15:22Z",
    "updateTime": "2019-08-24T14:15:22Z"
  }
}