Place2Book Developers
api@place2book.com

Permissions

Preview These endpoints are part of the single sign-on solution, which is still in development. They are not generally available and may change. Contact support@place2book.com before you build against them.

A permission gives a user who signs in through SSO a role on an event maker. A user can have several roles on the same event maker.

The permission object

Field Type Description
id integer Unique identifier.
action string The role. See Roles.
subject_class string Type of resource the permission applies to. Always EventMaker for these endpoints.
subject_id integer Id of the event maker the user can access.
{
  "id": 1234,
  "action": "manage",
  "subject_class": "EventMaker",
  "subject_id": 1234567
}

Roles

Action Role
manage Full administrator access, including bank accounts.
manage_restricted Administrator access without bank accounts and payouts.
sell_tickets Ticket agent. Can register cash sales.
scan_tickets Ticket scanner. Can scan tickets with the Place2Book app.

For more on each role, see User system roles.

List permissions

GET/users/:user_id/permissions
Response200 OK
[
  {
    "id": 1234,
    "action": "manage",
    "subject_class": "EventMaker",
    "subject_id": 1234567
  }
]
Possible errors404 Not Found

Get a permission

GET/users/:user_id/permissions/:permission_id
Response200 OK
{
  "id": 1234,
  "action": "manage",
  "subject_class": "EventMaker",
  "subject_id": 1234567
}
Possible errors404 Not Found

Create a permission

POST/users/:user_id/permissions
Parameter Type Description
subject_id integer required Id of the event maker.
action string required One of the roles.
Request body
{
  "permission": {
    "subject_id": 1234567,
    "action": "manage"
  }
}
Response201 Created
Location: https://api.place2book.com/users/12345678/permissions/1234
{
  "id": 1234,
  "action": "manage",
  "subject_class": "EventMaker",
  "subject_id": 1234567
}

Permissions can’t be updated. To change a role, delete the permission and create a new one.

Delete a permission

DELETE/users/:user_id/permissions/:permission_id
Response204 No Content