Offline sales

Note

This API is only available when the plugin pretix-offlinesales is installed (pretix Hosted and Enterprise only).

The offline sales module allows you to create batches of tickets intended for the sale outside the system.

Resource description

The offline sales batch resource contains the following public fields:

Field

Type

Description

id

integer

Internal batch ID

creation

datetime

Time of creation

testmode

boolean

true if orders are created in test mode

sales_channel

string

Sales channel of the orders

layout

integer

Internal ID of the chosen ticket layout

subevent

integer

Internal ID of the chosen subevent (or null)

item

integer

Internal ID of the chosen product

variation

integer

Internal ID of the chosen variation (or null)

amount

integer

Number of tickets in the batch

comment

string

Internal comment

orders

list of strings

List of order codes (omitted in list view for performance reasons)

Endpoints

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

Returns a list of all offline sales batches

Example request:

GET /api/v1/organizers/bigevents/events/democon/offlinesalesbatches/ 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,
      "creation": "2025-07-08T18:27:32.134368+02:00",
      "testmode": False,
      "sales_channel": "web",
      "comment": "Batch for sale at the event",
      "layout": 3,
      "subevent": null,
      "item": 23,
      "variation": null,
      "amount": 7
    }
  ]
}
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)/offlinesalesbatches/(id)/

Returns information on a given batch.

Example request:

GET /api/v1/organizers/bigevents/events/democon/offlinesalesbatches/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,
  "creation": "2025-07-08T18:27:32.134368+02:00",
  "testmode": False,
  "sales_channel": "web",
  "comment": "Batch for sale at the event",
  "layout": 3,
  "subevent": null,
  "item": 23,
  "variation": null,
  "amount": 7,
  "orders": ["TSRNN", "3FBSL", "WMDNJ", "BHW9H", "MXSUG", "DSDAP", "URLLE"]
}
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 batch to fetch

Status Codes:
POST /api/v1/organizers/(organizer)/events/(event)/offlinesalesbatches/

With this API call, you can instruct the system to create a new batch.

Since batches can contain up to 10,000 tickets, they are created asynchronously on the server. If your input parameters validate correctly, a 202 Accepted status code is returned. The body points you to the check URL of the result. Running a GET request on that result URL will yield one of the following status codes:

  • 200 OK – The creation of the batch has succeeded. The body will be your resulting batch with the same information as in the detail endpoint above.

  • 409 Conflict – Your creation job is still running. The body will be JSON with the structure {"status": "running"}. status can be waiting before the task is actually being processed. Please retry, but wait at least one second before you do.

  • 410 Gone – Creating the batch has failed permanently (e.g. quota no longer available). The body will be JSON with the structure {"status": "failed", "message": "Error message"}

  • 404 Not Found – The job does not exist / is expired.

Note

To avoid performance issues, a maximum amount of 10000 is currently allowed.

Note

Do not wait multiple hours or more to retrieve your result. After a longer wait time, 409 might be returned permanently due to technical constraints, even though nothing will happen any more.

Example request:

POST /api/v1/organizers/bigevents/events/sampleconf/offlinesalesbatches/ HTTP/1.1
Host: pretix.eu
Accept: application/json, text/javascript
Content-Type: application/json

{
  "testmode": True,
  "layout": 123,
  "item": 14,
  "sales_channel": "web",
  "amount": 10,
}

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

{
  "check": "https://pretix.eu/api/v1/organizers/bigevents/events/sampleconf/offlinesalesbatches/check/29891ede-196f-4942-9e26-d055a36e98b8/"
}
Parameters:
  • organizer – The slug field of the organizer to fetch

  • event – The slug field of the event to fetch

Status Codes:
POST /api/v1/organizers/(organizer)/events/(event)/offlinesalesbatches/(id)/render/

With this API call, you can render the PDF representation of a batch.

Since batches can contain up to 10,000 tickets, they are rendered asynchronously on the server. If your input parameters validate correctly, a 202 Accepted status code is returned. The body points you to the download URL of the result. Running a GET request on that result URL will yield one of the following status codes:

  • 200 OK – The creation of the batch has succeeded. The body will be your resulting batch with the same information as in the detail endpoint above.

  • 409 Conflict – Your rendering process is still running. The body will be JSON with the structure {"status": "running"}. status can be waiting before the task is actually being processed. Please retry, but wait at least one second before you do.

  • 410 Gone – Rendering the batch has failed permanently. The body will be JSON with the structure {"status": "failed", "message": "Error message"}

  • 404 Not Found – The rendering job does not exist / is expired.

Example request:

POST /api/v1/organizers/bigevents/events/sampleconf/offlinesalesbatches/1/render HTTP/1.1
Host: pretix.eu
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

{
  "download": "https://pretix.eu/api/v1/organizers/bigevents/events/sampleconf/offlinesalesbatches/1/download/29891ede-196f-4942-9e26-d055a36e98b8/3f279f13-c198-4137-b49b-9b360ce9fcce/"
}
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 batch to fetch

Status Codes: