Skip to main content
POST
/
{shopId}
/
coupons
Create shop coupon Copy
curl --request POST \
  --url http://staging.qshop.ng/apiv2/{shopId}/coupons \
  --header 'Content-Type: application/json' \
  --data '
{
  "_id": "63d90762691c5a2faaa91c76",
  "amount": 5000,
  "applyAutomatically": false,
  "applyOn": "total",
  "code": "947PG8G",
  "code_type": "flat",
  "created": "2023-01-31T12:19:46.767Z",
  "description": "",
  "expires": "2023-02-03T23:00:00.000Z",
  "isActive": true,
  "isPublic": false,
  "max_order": null,
  "mediaType": null,
  "min_order": 0,
  "shop": "62dec73d93a7452ccf49ea2f",
  "starts": "2023-01-31T12:19:24.552Z",
  "usageCount": 0,
  "usageLimit": {
    "canUseWithOtherCoupons": false,
    "maxNumberOfUses": 0,
    "maxNumberOfUsesPerUser": null,
    "useIfNumberOfOrders": {
      "count": null
    }
  },
  "usageRestriction": {
    "categories": {
      "condition": "or",
      "contains": []
    },
    "products": {
      "condition": "or",
      "contains": []
    },
    "roles": {
      "accept": [],
      "exclude": []
    },
    "tags": {
      "condition": "or",
      "contains": []
    },
    "users": {
      "condition": "all",
      "contains": []
    }
  }
}
'

Body

application/json
_id
string
Example:

"63d90762691c5a2faaa91c76"

amount
number
Example:

5000

applyAutomatically
boolean
Example:

false

applyOn
string
Example:

"total"

code
string
Example:

"947PG8G"

code_type
string
Example:

"flat"

created
string
Example:

"2023-01-31T12:19:46.767Z"

description
string
Example:

""

expires
string
Example:

"2023-02-03T23:00:00.000Z"

isActive
boolean
Example:

true

isPublic
boolean
Example:

false

max_order
unknown
mediaType
unknown
min_order
number
Example:

0

shop
string
Example:

"62dec73d93a7452ccf49ea2f"

starts
string
Example:

"2023-01-31T12:19:24.552Z"

usageCount
number
Example:

0

usageLimit
object
usageRestriction
object

Response

200 - undefined