Event Meta Properties¶
Resource description¶
An event meta property is used to to define meta information fields for its events. This information can be re-used, for example, in ticket layouts.
The event meta property resource contains the following public fields:
Field |
Type |
Description |
|---|---|---|
id |
integer |
Unique ID for this property |
name |
string |
Name of the property |
default |
string |
Value of the default option |
required |
boolean |
If |
protected |
boolean |
If |
filter_public |
boolean |
If |
public_label |
string |
Public name of the property |
filter_allowed |
boolean |
If |
choices |
list of objects |
List of JSON objects representing all permitted values
for this property, or |
Endpoints¶
- GET /api/v1/organizers/(organizer)/event_meta_properties/¶
Returns a list of all meta properties for the organizer.
Example request:
GET /api/v1/organizers/bigevents/meta_properties/ 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": "Color", "default": "blue", "required": false, "protected": false, "filter_public": false, "public_label": {}, "filter_allowed": true, "choices": [ { "key": "blue", "label": { "en": "Blue" }, } ] } ] }
- Parameters:
organizer – The
slugfield of the organizer
- 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)/event_meta_properties/(id)/¶
Returns information on one property, identified by its id.
Example request:
GET /api/v1/organizers/bigevents/event_meta_properties/1/ HTTP/1.1 Host: pretix.eu Accept: application/json, text/javascript
Example response:
{ "id": 1, "name": "Color", "default": "blue", "required": false, "protected": false, "filter_public": false, "public_label": {}, "filter_allowed": true, "choices": null }
- Parameters:
organizer – The
slugfield of the organizerid – The
idfield of the meta property to retrieve
- 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)/event_meta_properties/¶
Creates a new meta property
Example request:
POST /api/v1/organizers/bigevents/event_meta_properties/ HTTP/1.1 Host: pretix.eu Accept: application/json, text/javascript Content-Type: application/json { "name": "ref-code", "default": "abcde", "required": true, "choices": null }
Example response:
{ "id": 2, "name": "reference", "default": "abcde", "required": true, "protected": false, "filter_public": false, "public_label": null, "filter_allowed": true, "choices": null }
- Parameters:
organizer – The
slugfield of the organizer
- Status Codes:
201 Created – no error
400 Bad Request – The meta property 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)/event_meta_properties/(id)/¶
Update a meta property. You can also use
PUTinstead 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
idfield.Example request:
PATCH /api/v1/organizers/bigevents/event_meta_properties/2/ HTTP/1.1 Host: pretix.eu Accept: application/json, text/javascript Content-Type: application/json Content-Length: 94 { "required": false }
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json { "id": 3, "name": "reference", "default": "abcde", "required": false, "protected": false, "filter_public": false, "public_label": null, "filter_allowed": true, "choices": null }
- Parameters:
organizer – The
slugfield of the organizerid – The
idfield of the meta property to modify
- Status Codes:
200 OK – no error
400 Bad Request – The property 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.
- DELETE /api/v1/organizers/(organizer)/event_meta_properties/(id)/¶
Delete a meta property.
Example request:
DELETE /api/v1/organizers/bigevents/event_meta_properties/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 organizerid – The
idfield of the meta property 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.