Shipping

The shipping plugin provides a HTTP API that exposes the various layouts used to generate PDF badges.

Shipping address resource

The shipping address resource contains the following public fields:

Field

Type

Description

company

string

Customer company name

name

string

Customer name

street

string

Customer street

zipcode

string

Customer ZIP code

city

string

Customer city

country

string

Customer country code

state

string

Customer state (ISO 3166-2 code). Only supported in AU, BR, CA, CN, MY, MX, and US.

gift

boolean

Request by customer to not disclose prices in the shipping

Shipping status resource

The shipping status resource contains the following public fields:

Field

Type

Description

method

integer

Internal ID of shipping method

status

string

Status, one of "new" or "shipped"

method_type

string

Method type, one of "ship", "online", or "collect"

Endpoints

GET /api/v1/organizers/(organizer)/events/(event)/orders/(code)/shippingaddress/

Returns the shipping address of an order

Example request:

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

Example response:

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

{
  "company": "ACME Corp",
  "name": "John Doe",
  "street": "Sesame Street 12\nAp. 5",
  "zipcode": "12345",
  "city": "Berlin",
  "country": "DE",
  "state": "",
  "gift": false
}
Parameters:
  • organizer – The slug field of a valid organizer

  • event – The slug field of a valid event

  • order – The code field of a valid order

Status Codes:
GET /api/v1/organizers/(organizer)/events/(event)/orders/(code)/shippingaddress/

Returns the shipping status of an order

Example request:

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

Example response:

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

{
  "method": 23,
  "method_type": "ship",
  "status": "new"
}
Parameters:
  • organizer – The slug field of a valid organizer

  • event – The slug field of a valid event

  • order – The code field of a valid order

Status Codes:
GET /api/v1/organizers/(organizer)/printjobs/

Returns a list of ticket orders, only useful with some query filters

Example request:

GET /api/v1/organizers/bigevents/printjobs/?method=ship&status=new 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": [
    {
      "event": "democon",
      "order": "ABC12",
      "method": "ship",
      "status": "new"
    }
  ]
}
Query Parameters:
  • method (string) – Filter by response field method (can be passed multiple times)

  • status (string) – Filter by response field status

  • event (string) – Filter by response field event

Parameters:
  • organizer – The slug field of a valid organizer

  • event – The slug field of a valid event

Status Codes:
GET /api/v1/organizers/(organizer)/printjobs/poll/

Returns the PDF file for the next job to print.

Example request:

GET /api/v1/organizers/bigevents/printjobs/poll/?method=ship&status=new HTTP/1.1
Host: pretix.eu
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/pdf
X-Pretix-Order-Code: ABC12

...
Query Parameters:
  • method (string) – Filter by response field method (can be passed multiple times)

  • status (string) – Filter by response field status

  • event (string) – Filter by response field event

Parameters:
  • organizer – The slug field of a valid organizer

  • event – The slug field of a valid event

Status Codes:
POST /api/v1/organizers/(organizer)/printjobs/(order)/ack/

Change an order’s status to “shipped”.

Example request:

POST /api/v1/organizers/bigevents/printjobs/ABC12/ack/ 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 a valid organizer

  • event – The slug field of a valid event

  • order – The code field of a valid order

Status Codes: