Events
Use the /events routes to list, create, update and delete events.
Listing All Events
Section titled “Listing All Events”Request
Section titled “Request”GET /events/Example Response
Section titled “Example Response”// GET /events/
{ "123456": { "id": 123456, "caption": "v1 Approved", "date": "2016-07-15T14:08:41", "origin": "User", "details": null, "products": [ "300400" ] }, "123457": { "id": 123457, "caption": "v2 Approved", "date": "2016-09-15T14:07:28", "origin": "User", "details": "V2 approved on this day. Info: [https://mysite.com/relevant/link]", "products": [ "300400" ] }}Creating an Event
Section titled “Creating an Event”Request
Section titled “Request”POST /events/Arguments
Section titled “Arguments”| Argument | Type | Description |
|---|---|---|
| caption | String | The event’s caption. |
| date | Date | (yyyy-mm-dd) The event’s date. |
| details | String | Notes about the event. |
| products | List | An array of product IDs, or an array with the string all to apply the event to every product. |
Example Request
Section titled “Example Request”To tag specific products, pass their IDs instead of all (ex. [23433, 34343]).
// POST /events/{ "caption":"Ad Campaign", "date":"2016-12-21", "products":[ "all" ]}Example Response
Section titled “Example Response”// POST /events/
{ "id": 28961, "caption": "Ad Campaign", "date": "2016-12-21T00:00:00", "origin": "API", "details": "Better on Paper", "products": [ "all" ]}Updating an Event
Section titled “Updating an Event”Request
Section titled “Request”PUT /events/{event_id}Arguments
Section titled “Arguments”| Argument | Type | Description |
|---|---|---|
| caption | String | The event’s caption. |
| date | Date | (yyyy-mm-dd) The event’s date. |
| details | String | Notes about the event. |
| products | List | An array of product IDs, or an array with the string all to apply the event to every product. |
Example Response
Section titled “Example Response”// PUT /events/5438
{ "id": 543812, "account_id": 32109, "caption": "Changed Category", "date": "2017-04-12T00:00:00", "origin": "User", "products": [ "300400" ]}Deleting an Event
Section titled “Deleting an Event”Request
Section titled “Request”DELETE /events/{event_id}Arguments
Section titled “Arguments”| Argument | Type | Description |
|---|---|---|
| eventId | String | The ID of the event to delete. |
Example Response
Section titled “Example Response”// DELETE /events/5438// HTTP 204