Create Event Ticket Type

POST /events/:eventId/ticket-types

You can add a ticket type to an event by providing the following fields:

PropertyTypeDescription
name*stringName of the ticket type
descriptionstringDescription of the ticket type, as plain text (unlike an event's, which is rich text). May be null
masterLanguagestringThe language name and description are written in, as a lowercase ISO 639-1 code. Defaults to the event's language
translationsarray of EventTicketTypeTranslationThe ticket type in other languages, each as { "language": "da", "name": "…", "description": "…" }. name and description may be null
pricenumberThe price of one ticket in the smallest unit of your currency, such as cents for EUR or øre for DKK: 15000 is 150.00. A whole number of 0 or more. 0 or null, the default, is free
maxQuantitynumberThe most tickets of this type: a whole number of 1 or more. null, the default, is no limit of its own, so the ticket type shares the event's places (maxTickets)
addOnbooleanWhether the ticket type is an add-on, which can't be used as admittance to the event. Defaults to false
publishedbooleanWhether the ticket type is publicly visible. Defaults to true

Like a ticket type created in the back office, it is sold online and in the point of sale, gets your museum's default VAT for event tickets, and comes after the event's other ticket types. The response is the Event Ticket Type, the same object List Event Ticket Types returns.

To add a ticket type to the event 5c1f8e2a-3b4d-4e6f-9a7b-8c9d0e1f2a3b, send POST /events/5c1f8e2a-3b4d-4e6f-9a7b-8c9d0e1f2a3b/ticket-types with:

Copy
{ "name": "Adult", "description": "Ages 18 and up", "translations": [ { "language": "da", "name": "Voksen", "description": "Fra 18 år" } ], "price": 15000, "maxQuantity": 100 }

Response:

Copy
{ "id": "e3a1c9f4-7b2d-4c8e-a5f6-1d2e3f4a5b6c", "name": "Adult", "description": "Ages 18 and up", "price": 15000, "masterLanguage": "en", "translations": [ { "language": "da", "name": "Voksen", "description": "Fra 18 år" } ], "maxQuantity": 100, "availableQuantity": 100, "soldOut": false, "addOn": false, "published": true, "numberOfIssuedTickets": 0, "totalNumberOfReservedTickets": 0, "remainingTickets": 100 }

Series

In a series, ticket types belong to the main event: create them there, and they are copied to each of its dates, also to dates added later. Each copy has its own id and counts its own tickets: List Event Ticket Types on a date shows them. Creating a ticket type on a date gives SET_ON_MAIN_EVENT.

Errors

Errors are returned as { "errors": [{ "message": "EVENT_TICKET_TYPE_NAME_REQUIRED" }] }.

StatusMessageWhen
400EVENT_TICKET_TYPE_NAME_REQUIREDname is missing or blank
400EVENT_TICKET_TYPE_INVALID_PRICEprice is below 0
400EVENT_TICKET_TYPE_INVALID_MAX_QUANTITYmaxQuantity is below 1
400SET_ON_MAIN_EVENTThe event is a date in a series: create the ticket type on its main event
400LANGUAGE_NOT_SUPPORTEDmasterLanguage or the language of a translation isn't a language Loby supports
400FIELD_NOT_ALLOWED: <field>The body holds a field that isn't listed above. For a field in a translation, <field> is translations.<field>
400INVALID_BODYThe body isn't a JSON object, a translation has no language, a field has the wrong JSON type (price and maxQuantity are whole numbers), or a field that may not be null is null
403NO_ACCESSYour API key may not create ticket types
404EVENT_NOT_FOUNDThe event in the path doesn't exist, was deleted, belongs to another museum, or has the other mode (live or test) than your API key
‹ Previous
List Event Ticket Types
Next ›
Update Event Ticket Type