Categories
A category is an image that you can use for your pinpoint icons. Categories allow you to give multiple pinpoints a common icon without needing to re-upload media.
GET
/v3.0/categories
List all categories.
- Status Codes
- 200 OK – success
- 401 Unauthorized – you did not provide authentication
- 403 Forbidden – you tried to access a forbidden resource
POST
/v3.0/categories
Create a new category.
Example request:
POST /v3.0/categories HTTP/1.1
Authorization: Bearer 0a1b2c3d4e5f
Content-Type: application/json
{
"image_file": {
"content": "iVBORw0KGgoAAAANSUhEUgAAAFwAAABcCAIAAABsjUUPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gIMCwI4sS/JDAAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAhUlEQVR42u3QQQ0AAAgEoNP+nfVtBDeIQCUTrlYgRYoUKVKkSJEiRYoUKVKQIkWKFClSpEiRIkWKFClSkCJFihQpUqRIkSJFihQpSJEiRYoUKVKkSJEiRYoUKUiRIkWKFClSpEiRIkWKFKRIkSJFihQpUqRIkSJFihSkSJEiRYoUKVKkfLRXPAG3AGqXuAAAAABJRU5ErkJggg==",
"name": "test.png",
"type": "image/png"
},
"name": "Restaurant"
}
Example response
HTTP/1.1 201 OK
Content-Type: application/json
{
"id": 1234,
"image_url": "https://api.getwemap.com/images/pps-categories/e8c836b1c71894d1e0d7901d.png",
"name": "Restaurant"
}
- Request JSON Object
- image_file (object) – Image for the category.
- name (string) – Name of the category.
- 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/categories/:id
Return the given category.
- 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/categories/:id
Update the given category.
- Request JSON Object
- image_file (object) – Image for the category.
- name (string) – Name of the category.
- 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