Events
Events allow you to represent what is happening at a Pinpoint.
Each event can have multiple occurence dates, as well as rich information such as an HTML description, media and tags.
GET
/v3.0/events
List all events.
- Query Parameters
- pinpoint (integer) – Only return events belonging to the given pinpoint.
- Status Codes
- 200 OK – success
- 401 Unauthorized – you did not provide authentication
- 403 Forbidden – you tried to access a forbidden resource
POST
/v3.0/events
Create a new event.
Example request:
POST /v3.0/events HTTP/1.1
Authorization: Bearer 0a1b2c3d4e5f
Content-Type: application/json
{
"dates": [
{
"start": "2018-02-16T20:00:00.000Z",
"end": "2018-02-17T02:00:00.000Z",
}
],
"description": "Get ready for the best party <b>ever</b>!",
"media_credits": "John Doe",
"media_file": {
"content": "iVBORw0KGgoAAAANSUhEUgAAAFwAAABcCAIAAABsjUUPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gIMCwI4sS/JDAAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAhUlEQVR42u3QQQ0AAAgEoNP+nfVtBDeIQCUTrlYgRYoUKVKkSJEiRYoUKVKQIkWKFClSpEiRIkWKFClSkCJFihQpUqRIkSJFihQpSJEiRYoUKVKkSJEiRYoUKUiRIkWKFClSpEiRIkWKFKRIkSJFihQpUqRIkSJFihSkSJEiRYoUKVKkfLRXPAG3AGqXuAAAAABJRU5ErkJggg==",
"name": "test.png",
"type": "image/png"
},
"name": "Fantastic party!",
"pinpoint": 1,
"tags": ["party"]
}
Example response
HTTP/1.1 201 OK
Content-Type: application/json
{
"dates": [
{
"start": "2018-02-16T20:00:00.000Z",
"end": "2018-02-17T02:00:00.000Z",
}
],
"description": "Get ready for the best party <b>ever</b>!",
"id": 1234,
"media_credits": "John Doe",
"media_url": "https://api.getwemap.com/images/pps-events/e8c836b1c71894d1e0d7901d.png",
"name": "Fantastic party!",
"tags": ["party"]
}
- Request JSON Object
- dates (array) – List of start/end dates.
- description (string) – HTML description.
- media_credits (string) – Media credits and copyright.
- media_file (object) – Media for the event.
- name (string) – Name of the event.
- pinpoint (integer) – Pinpoint where the event takes place.
- tags (array) – List of tags.
- Status Codes
- 201 Created – success
- 400 Bad Request – for instance a required field is missing
- 401 Unauthorized – you did not provide authentication
- 403 Forbidden – you tried to access a forbidden resource
GET
/v3.0/events/:id
Return the given event.
- Status Codes
- 200 OK – success
- 401 Unauthorized – you did not provide authentication
- 403 Forbidden – you tried to access a forbidden resource
- 404 Not Found – the requested resource was not found
PUT
/v3.0/events/:id
Update the given event.
- Request JSON Object
- dates (array) – List of start/end dates.
- description (string) – HTML description.
- media_credits (string) – Media credits and copyright.
- media_file (object) – Media for the event.
- name (string) – Name of the event.
- pinpoint (integer) – Pinpoint where the event takes place.
- tags (array) – List of tags.
- Status Codes
- 200 OK – success
- 400 Bad Request – for instance a required field is missing
- 401 Unauthorized – you did not provide authentication
- 403 Forbidden – you tried to access a forbidden resource
- 404 Not Found – the requested resource was not found
DELETE
/v3.0/events/:id
Delete the given event.
- Status Codes
- 204 No Content – success
- 401 Unauthorized – you did not provide authentication
- 403 Forbidden – you tried to access a forbidden resource
- 404 Not Found – the requested resource was not found