POST
/
merchant
/
discount
/
new
curl --request POST \
  --url https://api.unibee.top/merchant/discount/new \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "advance": true,
  "billingType": 123,
  "code": "<string>",
  "currency": "<string>",
  "cycleLimit": 123,
  "discountAmount": 123,
  "discountPercentage": 123,
  "discountType": 123,
  "endTime": 123,
  "metadata": {},
  "name": "<string>",
  "planApplyType": 123,
  "planIds": [
    123
  ],
  "quantity": 123,
  "startTime": 123,
  "upgradeLongPlanOnly": true,
  "upgradeOnly": true,
  "userLimit": 123,
  "userScope": 123
}'
{
  "code": 123,
  "data": {
    "discount": {
      "advance": true,
      "billingType": 123,
      "code": "<string>",
      "createTime": 123,
      "currency": "<string>",
      "cycleLimit": 123,
      "discountAmount": 123,
      "discountPercentage": 123,
      "discountType": 123,
      "endTime": 123,
      "id": 123,
      "isDeleted": 123,
      "merchantId": 123,
      "metadata": {},
      "name": "<string>",
      "planApplyType": 123,
      "planIds": [
        123
      ],
      "quantity": 123,
      "startTime": 123,
      "status": 123,
      "upgradeLongerOnly": true,
      "upgradeOnly": true,
      "userLimit": 123,
      "userScope": 123
    }
  },
  "message": "<string>",
  "redirect": "<string>",
  "requestId": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Create a new discount code, code can used in onetime or subscription purchase to make discount

Response

200 - application/json

The response is of type object.