Events

Special events hosted by the Museum

GET

/special-events

List special events

Return a list of upcoming special events at the museum.

Query Parameters

startDatestring

The starting date to retrieve future operating hours from. Defaults to today's date.

Example: "2023-02-23T00:00:00.000Z"Format: "date"

endDatestring

The end of a date range to retrieve special events for. Defaults to 7 days after startDate.

Example: "2023-04-18T00:00:00.000Z"Format: "date"

pageinteger

The page number to retrieve.

Example: 2Default: 1

limitinteger

The number of days per page.

Example: 15Default: 10Maximum: 30
Status codeDescription
200Success
400Bad request
404Not found
curl
curl -X GET "https://api.fake-museum-example.com/special-events"

A list of upcoming special events

Example Response
[
  {
    "eventId": "3be6453c-03eb-4357-ae5a-984a0e574a54",
    "name": "Pirate Coding Workshop",
    "location": "Computer Room",
    "eventDescription": "Captain Blackbeard shares his love of the C...language. And possibly Arrrrr (R lang).",
    "dates": [
      "2023-10-29T00:00:00.000Z"
    ],
    "price": 25
  }
]

POST

/special-events

Create special events

Creates a new special event for the museum.

Request Body

name
Required
string

Name of the special event

Example: "Pirate Coding Workshop"

location
Required
string

Location where the special event is held

Example: "Computer Room"

eventDescription
Required
string

Description of the special event

Example: "Captain Blackbeard shares his love of the C...language. And possibly Arrrrr (R lang)."

dates
Required
array of string

List of planned dates for the special event

price
Required
number

Price of a ticket for the special event

Example: 25Format: "float"
Status codeDescription
200Success
400Bad request
404Not found
curl
curl -X POST "https://api.fake-museum-example.com/special-events" \
  -d '{
  "name": "Pirate Coding Workshop",
  "location": "Computer Room",
  "eventDescription": "Captain Blackbeard shares his love of the C...language. And possibly Arrrrr (R lang).",
  "dates": [
    "2023-10-29T00:00:00.000Z"
  ],
  "price": 25
}'

Information about a special event.

Example Response
{
  "eventId": "3be6453c-03eb-4357-ae5a-984a0e574a54",
  "name": "Pirate Coding Workshop",
  "location": "Computer Room",
  "eventDescription": "Captain Blackbeard shares his love of the C...language. And possibly Arrrrr (R lang).",
  "dates": [
    "2023-10-29T00:00:00.000Z"
  ],
  "price": 25
}

GET

/special-events/{eventId}

Get special event

Get details about a special event.

Path Parameters

eventId
Required
string

An identifier for a special event.

Example: "dad4bce8-f5cb-4078-a211-995864315e39"Format: "uuid"
Status codeDescription
200Success
400Bad request
404Not found
curl
curl -X GET "https://api.fake-museum-example.com/special-events/dad4bce8-f5cb-4078-a211-995864315e39"

Information about a special event.

Example Response
{
  "eventId": "3be6453c-03eb-4357-ae5a-984a0e574a54",
  "name": "Pirate Coding Workshop",
  "location": "Computer Room",
  "eventDescription": "Captain Blackbeard shares his love of the C...language. And possibly Arrrrr (R lang).",
  "dates": [
    "2023-10-29T00:00:00.000Z"
  ],
  "price": 25
}

PATCH

/special-events/{eventId}

Update special event

Update the details of a special event

Request Body

namestring

Name of the special event

Example: "Pirate Coding Workshop"

locationstring

Location where the special event is held

Example: "Computer Room"

eventDescriptionstring

Description of the special event

Example: "Captain Blackbeard shares his love of the C...language. And possibly Arrrrr (R lang)."

datesarray of string

List of planned dates for the special event

pricenumber

Price of a ticket for the special event

Example: 25Format: "float"

Path Parameters

eventId
Required
string

An identifier for a special event.

Example: "dad4bce8-f5cb-4078-a211-995864315e39"Format: "uuid"
Status codeDescription
200Success
400Bad request
404Not found
curl
curl -X PATCH "https://api.fake-museum-example.com/special-events/dad4bce8-f5cb-4078-a211-995864315e39" \
  -d '{
  "name": "Pirate Coding Workshop",
  "location": "Computer Room",
  "eventDescription": "Captain Blackbeard shares his love of the C...language. And possibly Arrrrr (R lang).",
  "dates": [
    "2023-10-29T00:00:00.000Z"
  ],
  "price": 25
}'

Information about a special event.

Example Response
{
  "eventId": "3be6453c-03eb-4357-ae5a-984a0e574a54",
  "name": "Pirate Coding Workshop",
  "location": "Computer Room",
  "eventDescription": "Captain Blackbeard shares his love of the C...language. And possibly Arrrrr (R lang).",
  "dates": [
    "2023-10-29T00:00:00.000Z"
  ],
  "price": 25
}

DELETE

/special-events/{eventId}

Delete special event

Delete a special event from the collection. Allows museum to cancel planned events.

Path Parameters

eventId
Required
string

An identifier for a special event.

Example: "dad4bce8-f5cb-4078-a211-995864315e39"Format: "uuid"
Status codeDescription
204Success - no content
400Bad request
401Unauthorized
404Not found
curl
curl -X DELETE "https://api.fake-museum-example.com/special-events/dad4bce8-f5cb-4078-a211-995864315e39"

Last updated on