v1.1 | v1.0
The
/events resource provides complete control over events and allows retrieving, updating, adding, and deleting events.Listing All Events
Request
GET /events/
Example Response
// GET /events/ { "123456": { "id": 123456, "account_id": 123456, "caption": "v1 Approved", "date": "2010-07-15T14:08:41", "origin": "User", "products": [ "300400" ] }, "123457": { "id": 123457, "account_id": 123456, "caption": "v2 Approved", "date": "2010-09-15T14:07:28", "origin": "User", "products": [ "300400" ] } }
Creating an Event
Request
POST /events/
Arguments
caption
The caption of the event
date
(yyyy-mm-dd) date for the event
products
A comma separated string of productIds
Example Response
// POST /events/ { "id": 888888, "account_id": id, "caption": "Ad Campaign", "date": "2010-04-12T00:00:00", "origin": "User", "products": [ "300400", "300401" ] }
Updating an Event
Request
PUT /events/{eventId}
Arguments
eventId
The Id of the event to update
caption
The caption of the event
date
(yyyy-mm-dd) date for the event
products
A comma separated string of productIds
Example Response
// PUT /events/5438 { "id": 543812, "account_id": 32109, "caption": "Changed Category", "date": "2010-04-12T00:00:00", "origin": "User", "products": [ "300400" ] }
Deleting an Event
Request
DELETE /events/{eventId}
Arguments
eventId
The ID of the event to delete
Example Response
// DELETE /events/5438 // HTTP 200