PayMdir

Examples/APIs/Tickets/Buy museum tickets POST

Buy museum tickets

Purchase museum tickets for general entry or special events.

POST
/tickets

Authorization

AuthorizationRequiredBasic <token>

In: header

Request Body

multipart/form-dataRequired
ticketTypeRequiredstring

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

Value in: "event" | "general"
eventIdstring

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

Format: "uuid"
ticketDateRequiredstring

Date that the ticket is valid for.

Format: "date"
emailRequiredstring

Email address for ticket purchaser.

Format: "email"
phonestring

Phone number for the ticket purchaser (optional).

imagefile
Format: "binary"
teststring
Value in: "general" | "gold" | "platinum" | "vip"
curl -X POST "https://redocly.com/_mock/docs/openapi/museum-api/tickets" \
  -H "Authorization: Basic <token>" \
  -F ticketType="general" \
  -F ticketDate="2023-09-07" \
  -F email="todd@example.com"

Success

{
  "message": "Museum general entry ticket purchased",
  "ticketId": "382c0820-0530-4f4b-99af-13811ad0f17a",
  "ticketType": "general",
  "ticketDate": "2023-09-07",
  "confirmationCode": "ticket-general-e5e5c6-dce78"
}

How is this guide?

Edit on GitHub

Last updated on 3/27/2025