Tickets

Museum tickets for general entrance or special events.

POST

/tickets

Buy museum tickets

Purchase museum tickets for general entry or special events.

Request Body

ticketType
Required
string

Type of ticket being purchased. Use general for regular museum entry and event for tickets to special events.

Example: "event"Value in: "event" | "general"

eventIdstring

Unique identifier for a special event. Required if purchasing tickets for the museum's special events.

Example: "3be6453c-03eb-4357-ae5a-984a0e574a54"Format: "uuid"

ticketDate
Required
string

Date that the ticket is valid for.

Example: "2023-10-29T00:00:00.000Z"Format: "date"

email
Required
string

Email address for ticket purchaser.

Example: "museum-lover@example.com"Format: "email"

phonestring

Phone number for the ticket purchaser (optional).

Example: "+1(234)-567-8910"
Status codeDescription
200Success
400Bad request
404Not found
curl
curl -X POST "https://api.fake-museum-example.com/tickets" \
  -d '{
  "ticketType": "event",
  "eventId": "3be6453c-03eb-4357-ae5a-984a0e574a54",
  "ticketDate": "2023-10-29T00:00:00.000Z",
  "email": "museum-lover@example.com",
  "phone": "+1(234)-567-8910"
}'

Details for a museum ticket after a successful purchase.

Example Response
{
  "message": "Museum general entry ticket purchased",
  "eventName": "Pirate Coding Workshop",
  "ticketId": "a54a57ca-36f8-421b-a6b4-2e8f26858a4c",
  "ticketType": "event",
  "ticketDate": "2023-10-29T00:00:00.000Z",
  "confirmationCode": "ticket-event-a98c8f-7eb12"
}

GET

/tickets/{ticketId}/qr

Get ticket QR code

Return an image of your ticket with scannable QR code. Used for event entry.

Path Parameters

ticketId
Required
string

An identifier for a ticket to a museum event. Used to generate ticket image.

Example: "a54a57ca-36f8-421b-a6b4-2e8f26858a4c"Format: "uuid"
Status codeDescription
200Scannable event ticket in image format
400Bad request
404Not found
curl
curl -X GET "https://api.fake-museum-example.com/tickets/a54a57ca-36f8-421b-a6b4-2e8f26858a4c/qr"

An image of a ticket with a QR code used for museum or event entry.

Example Response
"string"

Last updated on