event

Events are used to modify the price or availability of your inventory items based on date. The event endpoint allows you to retrieve information on events in the system, and see which items they are applied to.

GET /api/3.0/event

Retrieve a list of all events in the system.

Response JSON Array of Objects:
 
GET /api/3.0/event/{id}

Retrieve data on a specific event.

Response JSON Array of Objects:
 

Event Object Structure

Field Type Description
rate_id integer A unique code used to refer to this event
name string The name of this event
type string Item Events: “SP” for “Special” events, “SE” for “Seasonal” events. Discounts: “DC” for “Discount”
start_date integer The date (yyyymmdd) when this event starts to apply
end_date integer The date (yyyymmdd) when this event stops applying (0 if the event has no end date)
span integer The “Force item length to the above start and end dates” option (1 if selected, 0 if not selected)
price_src string If applicable, the type of price modification for this event (“Base Price” is “B”, “Create new Price Point” is “N”, “Dynamic” is “D”, “Yield” is “Yield”)
dynamic_rate decimal If this event is a “Dynamic” price event (price_src is “D”), this value holds the event’s percent change or fixed amount price.
dynamic_type string Dynamic Price events: “P” for percent, “F” for fixed amount
status string Item Events: whether this is an available (“A”) or unavailable (“U”) event. Discounts: always available (“A”)
repeat_id string If the event is not recurring, this value is blank. Weekly recurring events are “W”, “Always” recurring events are “*”.
enabled integer If the event is enabled, 1, otherwise 0 when disabled.
rule_set_id integer The ruleset id applying to this event. The default ruleset id is 1.
vouchers integer Discounts: the number of vouchers attached to this discount.
details array If this is event has a “Yield” price_src, this element will contain a list of objects containing a level and rate pair for each threshold. See event.details objects below
repeat array A list of days (mon, tue, …) for which this event repeats.
apply_to object See event.apply_to below.

event.details objects

Field Type Description
level integer The inventory threshold at which this Yield priced event applies
rate decimal The percentage price multiplier for this threshold

event.apply_to

Field Type Description
item_id array This array contains the list of item IDs which this event applies to.
category_id array This array contains the list of category IDs which this event applies to. This event will apply to any new items that are added to this category.

Sample Event Object

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
{
    "version": "3.0",
    "account_id": 1,
    "host_id": "your-company.checkfront.com",
    "name": "Your Company",
    "locale": {
        "id": "en_US",
        "lang": "en",
        "currency": "CAD"
    },
    "request": {
        "path": [
            "event"
        ],
        "resource": "event",
        "records": 6,
        "total_records": 6,
        "status": "OK",
        "limit": 100,
        "page": 1,
        "pages": 1,
        "time": 0.0028,
        "method": "get"
    },
    "events": {
        "1": {
            "rate_id": 1,
            "name": "Max 3 Days",
            "type": "SP",
            "start_date": 20161221,
            "end_date": 0,
            "span": 0,
            "price_src": "Yield",
            "dynamic_rate": 10,
            "dynamic_type": "P",
            "status": "A",
            "repeat_id": "W",
            "enabled": 1,
            "rule_set_id": 1,
            "details": [
                {
                    "level": 5,
                    "rate": 150.5
                },
                {
                    "level": 2,
                    "rate": 200
                }
            ],
            "repeat": [ "tue", "sat" ],
            "apply_to": {
                "item_id": [ 14, 16, 35, 36, 37 ],
                "category_id": [ 3, 5 ]
            }
        },
        "2": {
            "rate_id": 2,
            "name": "Easter Closure",
            "type": "SE",
            "start_date": "20170417",
            "end_date": "20170417",
            "span": 0,
            "price_src": "",
            "dynamic_rate": "0.0000",
            "dynamic_type": "P",
            "status": "U",
            "repeat_id": "",
            "enabled": 1,
            "rule_set_id": 1,
            "details": [],
            "repeat": [],
            "apply_to": {
                "item_id": [
                    "all"
                ],
                "category_id": []
            }
        }
    }
}