Retrieve a list of coupons
GET/api/v3/coupon
Request
Responses
- 200
 - 400
 - 401
 - 404
 
Object was fetched successfully
- application/json
 
- Schema
 - Example (from schema)
 - Example 1
 
Schema
Array [
]
code integer
status string
message stringnullable
details objectnullable
response
object[]
coupon_id integer
The coupon ID #
code string
Coupon code
descrip string
Description
type string
Coupon type
discount_item_id integer
Item ID # or related discount (if applicable)
enabled boolean
Enabled/disabled
discount array
Discount details
freetrial array
Free trial details
write_datetime string
Date/time the coupon was created
write_ipaddr string
IP address that created the coupon
{
  "code": 0,
  "status": "string",
  "message": "string",
  "details": {},
  "response": [
    {
      "coupon_id": 0,
      "code": "string",
      "descrip": "string",
      "type": "string",
      "discount_item_id": 0,
      "enabled": true,
      "discount": [
        null
      ],
      "freetrial": [
        null
      ],
      "write_datetime": "string",
      "write_ipaddr": "string"
    }
  ]
}
{
  "code": 200,
  "status": "OK",
  "message": "",
  "details": {},
  "response": [
    {
      "coupon_id": 1,
      "code": "TEST",
      "descrip": "t",
      "type": "give-a-discount",
      "enabled": true,
      "write_datetime": "2021-05-25 08:23:05",
      "write_ipaddr": "172.19.0.1",
      "discount_item_id": 673
    },
    {
      "coupon_id": 2,
      "code": "Coupon 2",
      "descrip": "test",
      "type": "give-a-discount",
      "enabled": true,
      "write_datetime": "2022-02-15 13:47:43",
      "write_ipaddr": "172.23.0.1",
      "discount_item_id": 1153
    },
    {
      "coupon_id": 3,
      "code": "Coupon 3",
      "descrip": "tset",
      "type": "free-trial",
      "enabled": true,
      "write_datetime": "2022-02-15 13:47:55",
      "write_ipaddr": "172.23.0.1",
      "discount_item_id": null
    }
  ]
}
Bad request
- application/json
 
- Schema
 - Example (from schema)
 - Example 1
 
Schema
code integer
status string
message stringnullable
details objectnullable
response boolean
{
  "code": 0,
  "status": "string",
  "message": "string",
  "details": {},
  "response": true
}
{
  "code": 400,
  "status": "Error",
  "message": "Missing or invalid parameter.",
  "details": {},
  "response": false
}
Authentication error
- application/json
 
- Schema
 - Example (from schema)
 - Example 1
 
Schema
code integer
status string
message stringnullable
details objectnullable
response boolean
{
  "code": 0,
  "status": "string",
  "message": "string",
  "details": {},
  "response": true
}
{
  "code": 401,
  "status": "Error",
  "message": "Invalid or incorrect authorization [Missing (basic) authorization header.]",
  "details": {},
  "response": false
}
Object not found
- application/json
 
- Schema
 - Example (from schema)
 - Example 1
 
Schema
code integer
status string
message stringnullable
details objectnullable
response booleannullable
{
  "code": 0,
  "status": "string",
  "message": "string",
  "details": {},
  "response": true
}
{
  "code": 404,
  "status": "Error",
  "message": "This object does not exist.",
  "details": {},
  "response": null
}
Loading...