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