PDF ticket output

The PDF ticket output plugin provides a HTTP API that exposes the various layouts used to generate PDF tickets.

Resource description

The ticket layout resource contains the following public fields:

Field Type Description
id integer Internal layout ID
name string Internal layout description
default boolean true if this is the default layout
layout object Layout specification for libpretixprint
background URL Background PDF file
item_assignments list of objects Products this layout is assigned to
├ sales_channel string Sales channel (defaults to web).
└ item integer Item ID

Changed in version 1.16: This resource has been added.

Changed in version 2.3: The item_assignments.sales_channel field has been added.

Endpoints

GET /api/v1/organizers/(organizer)/events/(event)/ticketlayouts/

Returns a list of all ticket layouts

Example request:

GET /api/v1/organizers/bigevents/events/democon/ticketlayouts/ HTTP/1.1
Host: pretix.eu
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "count": 1,
  "next": null,
  "previous": null,
  "results": [
    {
      "id": 1,
      "name": "Default layout",
      "default": true,
      "layout": {…},
      "background": {},
      "item_assignments": []
    }
  ]
}
Query Parameters:
 
  • page – The page number in case of a multi-page result set, default is 1
Parameters:
  • organizer – The slug field of a valid organizer
  • event – The slug field of a valid event
Status Codes:
GET /api/v1/organizers/(organizer)/events/(event)/ticketlayouts/(id)/

Returns information on layout.

Example request:

GET /api/v1/organizers/bigevents/events/democon/ticketlayouts/1/ HTTP/1.1
Host: pretix.eu
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "id": 1,
  "name": "Default layout",
  "default": true,
  "layout": {…},
  "background": {},
  "item_assignments": []
}
Parameters:
  • organizer – The slug field of the organizer to fetch
  • event – The slug field of the event to fetch
  • id – The id field of the layout to fetch
Status Codes: