Seating plans¶
Resource description¶
The seating plan resource contains the following public fields:
Field |
Type |
Description |
---|---|---|
id |
integer |
Internal ID of the plan |
name |
string |
Human-readable name of the plan |
layout |
object |
JSON representation of the seating plan. These representations follow a JSON schema that currently still evolves. The version in use can be found here. |
Endpoints¶
- GET /api/v1/organizers/(organizer)/seatingplans/¶
Returns a list of all seating plans within a given organizer.
Example request:
GET /api/v1/organizers/bigevents/seatingplans/ HTTP/1.1 Host: pretix.eu Accept: application/json, text/javascript
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json { "count": 1, "next": null, "previous": null, "results": [ { "id": 2, "name": "Main plan", "layout": { … } } ] }
- Query Parameters:
page (integer) – The page number in case of a multi-page result set, default is 1
- Parameters:
organizer – The
slug
field of the organizer to fetch
- Status Codes:
200 OK – no error
401 Unauthorized – Authentication failure
403 Forbidden – The requested organizer does not exist or you have no permission to view this resource.
- GET /api/v1/organizers/(organizer)/seatingplans/(id)/¶
Returns information on one plan, identified by its ID.
Example request:
GET /api/v1/organizers/bigevents/seatingplans/1/ HTTP/1.1 Host: pretix.eu Accept: application/json, text/javascript
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json { "id": 2, "name": "Main plan", "layout": { … } }
- Parameters:
organizer – The
slug
field of the organizer to fetchid – The
id
field of the seating plan to fetch
- Status Codes:
200 OK – no error
401 Unauthorized – Authentication failure
403 Forbidden – The requested organizer does not exist or you have no permission to view this resource.
- POST /api/v1/organizers/(organizer)/seatingplans/¶
Creates a new seating plan
Example request:
POST /api/v1/organizers/bigevents/seatingplans/ HTTP/1.1 Host: pretix.eu Accept: application/json, text/javascript Content-Type: application/json { "name": "Main plan", "layout": { … } }
Example response:
HTTP/1.1 201 Created Vary: Accept Content-Type: application/json { "id": 3, "name": "Main plan", "layout": { … } }
- Parameters:
organizer – The
slug
field of the organizer to create a seating plan for
- Status Codes:
201 Created – no error
400 Bad Request – The seating plan could not be created due to invalid submitted data.
401 Unauthorized – Authentication failure
403 Forbidden – The requested organizer does not exist or you have no permission to create this resource.
- PATCH /api/v1/organizers/(organizer)/seatingplans/(id)/¶
Update a plan. You can also use
PUT
instead ofPATCH
. WithPUT
, you have to provide all fields of the resource, other fields will be reset to default. WithPATCH
, you only need to provide the fields that you want to change.You can change all fields of the resource except the
id
field. You can not change a plan while it is in use for any events.Example request:
PATCH /api/v1/organizers/bigevents/seatingplans/1/ HTTP/1.1 Host: pretix.eu Accept: application/json, text/javascript Content-Type: application/json Content-Length: 94 { "name": "Old plan" }
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json { "id": 1, "name": "Old plan", "layout": { … } }
- Parameters:
organizer – The
slug
field of the organizer to modifyid – The
id
field of the plan to modify
- Status Codes:
200 OK – no error
400 Bad Request – The plan could not be modified due to invalid submitted data
401 Unauthorized – Authentication failure
403 Forbidden – The requested organizer does not exist or you have no permission to change this resource or the plan is currently in use.
- DELETE /api/v1/organizers/(organizer)/seatingplans/(id)/¶
Delete a plan. You can not delete plans which are currently in use by any events.
Example request:
DELETE /api/v1/organizers/bigevents/seatingplans/1/ HTTP/1.1 Host: pretix.eu Accept: application/json, text/javascript
Example response:
HTTP/1.1 204 No Content Vary: Accept
- Parameters:
organizer – The
slug
field of the organizer to modifyid – The
id
field of the plan to delete
- Status Codes:
204 No Content – no error
401 Unauthorized – Authentication failure
403 Forbidden – The requested organizer does not exist or you have no permission to delete this resource or the plan is currently in use.