Fumadocs

Buy museum tickets

Purchase museum tickets for general entry or special events.

Demo Only
POST
/tickets
/tickets

The Authorization access token

Authorization

Authorization
Required
Basic <token>

In: header

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

Identifier for a special event.

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

ticketDate
Required
string

Date that the ticket is valid for.

Example: "2023-10-29"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"

imageFile

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

Details for a museum ticket after a successful purchase.

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