API Documentation

GET: ALL DISCOUNTS

Type: GET
Method: discounts
Parameter: (integer) {start} / {limit}
URL Example: https://www.bizstim.com/api/discounts/0/20
start parameter refers to the first record to return.  Default = 0.
limit parameter refers to the number of records to return.  Default = 20.  Maximum = 100.
start and limit can be omitted from the URL and their defaults will be chosen.
total key in the json object is the total number of records found.  Use this to create your own pagination.
ELEMENT TYPE DESCRIPTION
id integer Unique id.
uses integer Number of times the discount can be used per client
secret integer 0 = public, 1 = secret
expires string Expiry date (YYYY-MM-DD)
code string Unique name of the discount code (e.g. 10%OFF)
fixed integer 0 = percentage off, 1 = fixed amount off
type integer 0 = subtract from cost, 1 = additional credit
amount float Accurate to 2 decimal places (25.00)
services string Comma separated service ID's
{
    "status": "success",
    "total": 9,
    "response": [
        {
            "id": "12",
            "uses": "0",
            "secret": "0",
            "expires": "2021-12-25",
            "code": "10%CRED",
            "fixed": "0",
            "type": "1",
            "amount": "10.00",
            "services": "66,67,36"
        },
        {
            ...
        }
    ]
}

GET: DISCOUNT

Type: GET
Method: discount
Parameter: (integer) {discount_id}
URL Example: https://www.bizstim.com/api/discount/17
ELEMENT TYPE DESCRIPTION
id integer Unique id.
uses integer Number of times the discount can be used per client
secret integer 0 = public, 1 = secret
expires string Expiry date (YYYY-MM-DD)
code string Unique name of the discount code (e.g. 10%OFF)
fixed integer 0 = percentage off, 1 = fixed amount off
type integer 0 = subtract from cost, 1 = additional credit
amount float Accurate to 2 decimal places (25.00)
services string Comma separated service ID's
{
    "status": "success",
    "response": {
        "id": "17",
        "uses": "0",
        "secret": "0",
        "expires": "2021-12-25",
        "code": "10%OFF",
        "fixed": "0",
        "type": "0",
        "amount": "10.00",
        "services": ""
    }
}