Gates¶
Gate resource¶
The gate resource contains the following public fields:
Field |
Type |
Description |
|---|---|---|
id |
integer |
Internal ID of the gate within this organizer |
name |
string |
gate name |
identifier |
string |
Internal identifier to make it easier to match the data with other sources |
Endpoints¶
- GET /api/v1/organizers/(organizer)/gates/¶
Returns a list of all gates within a given organizer.
Example request:
GET /api/v1/organizers/bigevents/gates/ 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": 1, "name": "Main door", "identifier": "west_entry" } ] }
- Parameters:
organizer – The
slugfield 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)/gates/(id)/¶
Returns information on one gate, identified by its ID.
Example request:
GET /api/v1/organizers/bigevents/gates/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": 1, "name": "Main door", "identifier": "west_entry" }
- Parameters:
organizer – The
slugfield of the organizer to fetchid – The
idof the gate 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)/gates/¶
Creates a new gate
You can supply the following fields of the resource:
nameidentifier(optional, if you do not supply one, it will be auto-generated)
Example request:
POST /api/v1/organizers/bigevents/gates/ HTTP/1.1 Host: pretix.eu Accept: application/json, text/javascript Content-Type: application/json { "name": "South gate", "identifier": "south_entry", }
Example response:
HTTP/1.1 201 Created Vary: Accept Content-Type: application/json { "id": 2, "name": "South gate", "identifier": "south_entry" }
- Parameters:
organizer – The
slugfield of the organizer to create a gate for
- Status Codes:
201 Created – no error
400 Bad Request – The gate could not be created due to invalid submitted data.
401 Unauthorized – Authentication failure
403 Forbidden – The requested organizer/gate does not exist or you have no permission to create this resource.
- PATCH /api/v1/organizers/(organizer)/gates/(id)/¶
Update a gate.
Example request:
PATCH /api/v1/organizers/bigevents/gates/1/ HTTP/1.1 Host: pretix.eu Accept: application/json, text/javascript Content-Type: application/json Content-Length: 94 { "name": "Foo" }
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json { "id": 2, "name": "Foo", "identifier": "south_entry" }
- Parameters:
organizer – The
slugfield of the organizer to modifyid – The
idfield of the gate to modify
- Status Codes:
200 OK – no error
400 Bad Request – The gate could not be modified due to invalid submitted data
401 Unauthorized – Authentication failure
403 Forbidden – The requested organizer/gate does not exist or you have no permission to change this resource.
- DELETE /api/v1/organizers/(organizer)/gates/(id)/¶
Delete a gate.
Example request:
DELETE /api/v1/organizers/bigevents/gates/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
slugfield of the organizer to modifyid – The
idfield of the gate to delete
- Status Codes:
204 No Content – no error
401 Unauthorized – Authentication failure
403 Forbidden – The requested organizer/gate does not exist or you have no permission to change it or this gate cannot be deleted since it is currently in use.