Item Meta Properties¶
Resource description¶
An Item Meta Property is used to include (event internally relevant) meta information with every item (product). This could be internal categories like booking positions.
The Item Meta Properties 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 |
allowed_values |
list |
List of all permitted values for this property,
or |
Endpoints¶
- GET /api/v1/organizers/(organizer)/events/(event)/item_meta_properties/¶
Returns a list of all Item Meta Properties within a given event.
Example request:
GET /api/v1/organizers/bigevents/events/sampleconf/item_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": "red", "required": true, "allowed_values": ["red", "green", "blue"] } ] }
- Parameters:
organizer – The
slug
field of the organizerevent – The
slug
field of the event
- 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)/events/(event)/item_meta_properties/(id)/¶
Returns information on one property, identified by its id.
Example request:
GET /api/v1/organizers/bigevents/events/sampleconf/item_meta_properties/1/ HTTP/1.1 Host: pretix.eu Accept: application/json, text/javascript
Example response:
{ "id": 1, "name": "Color", "default": "red", "required": true, "allowed_values": ["red", "green", "blue"] }
- Parameters:
organizer – The
slug
field of the organizerevent – The
slug
field of the eventid – The
id
field of the item 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)/events/(event)/item_meta_properties/¶
Creates a new item meta property
Example request:
POST /api/v1/organizers/bigevents/events/sampleconf/item_meta_properties/ HTTP/1.1 Host: pretix.eu Accept: application/json, text/javascript Content-Type: application/json { "name": "ref-code", "default": "abcde", "required": true, "allowed_values": null }
Example response:
{ "id": 2, "name": "ref-code", "default": "abcde", "required": true, "allowed_values": null }
- Parameters:
organizer – The
slug
field of the organizerevent – The
slug
field of the event
- Status Codes:
201 Created – no error
400 Bad Request – The item 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)/events/(event)/item_meta_properties/(id)/¶
Update an item meta property. 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.Example request:
PATCH /api/v1/organizers/bigevents/events/sampleconf/item_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": 2, "name": "ref-code", "default": "abcde", "required": false, "allowed_values": [] }
- Parameters:
organizer – The
slug
field of the organizerevent – The
slug
field of the eventid – The
id
field of the item 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)/events/(event)/item_meta_properties/(id)/¶
Delete an item meta property.
Example request:
DELETE /api/v1/organizers/bigevents/events/sampleconf/item_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
slug
field of the organizerevent – The
slug
field of the eventid – The
id
field of the item 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.