User permissions API

Field descriptions

Field Type Description
id integer The uniq identifier of the permission
subject_id integer Id of the event maker the user can access
action string What role the user is in regards to the event maker. Valid permission is currently manage, manage_without_bank_account, sell_tickets and scan_tickets. A user can have more than one role for the same event maker

List permissions

List the users permission

GET /users/:user_id/permissions

Response

Status: 200 OK
[
  {
    "id": 1234,
    "subject_id": 567,
    "action": "manage"
  }
]

Get a single permission

GET /users/:user_id/permissions/:id

Response

Status: 200 OK
{
  "id": 1234,
  "subject_id": 567,
  "action": "manage"
}

Error codes

Status: 404 Not Found

Create an permission

POST /user/:user_id/permissions

Input

subject_id
Required integer
action
Required string
{
  "permission": {
    "subject_id": 1234,
    "action": "manager"
  }
}

Response

Status: 201 Created
Location: https://api.place2book.com/user/123/permissions/1234567
{
  "id": 1234,
  "subject_id": 567,
  "action": "manage"
}

Error codes

Status: 400 Bad Request
Status: 500 Server Error

Update permission

It is not possible to update an permission.

Response

Status: 404 Not Found

Delete permission

DELETE /users/:user_id/permissions/:id

Response

Status: 204 No Content

Error codes

Status: 403 Forbidden
Status: 404 Not Found