The Experiences API is related to experiences created and managed on the AnyRoad Platform. This endpoint will allow you to retrieve details about all of the experiences associated with your account. It can be used in conjunction with the Time Slot API to provide a holistic view of an experience and the available time slots for a given experience.
Key Terminology
Experience Collection Resource
The experience collection resource is a collection of experience item resources. The experience collection resource contains a block of pagination attributes and a collection of items.
Pagination
Attribute | Description |
url - string($url) | url of current page |
next_url - string($url) | url of next page in paginated list |
previous_url - string($url) | url of previous page in paginated list |
first_url - string($url) | url of first page in paginated list |
Collection of Experience Items
Attribute | Description |
items | Collection of experience item resources |
Experience Item Resource
The experience item resource contains all of the details about an individual experience with the following attributes.
Query Date/Date Range
For endpoints with date parameters, the endpoint can be queried with a single date value, or a date range using the following conditionals inside square brackets on the query parameter.
Format | Description | Example |
gt - string($date-time) | Greater than date | created[gt]=2022-02-26T23:59:00Z |
gte - string($date-time) | Greater than or equal to date | created[gte]=2022-02-26T23:59:00Z |
lt - string($date-time) | Less than date | created[lt]=2022-02-26T23:59:00Z |
lte - string($date-time) | Less than or equal to date | created[lte]=2022-02-26T23:59:00Z |
Image Resource
attribute | Description |
url - string | URL of image associated with experience resource (typically used as the main hero image when displayed on an experience booking page) |
caption - string | Caption of the image in the images resource |
Endpoints
Get Experience Collection
Retrieve a list of the experiences in your account by invoking the experiences endpoint.
URL:
https://app.anyroad.com/external/api/v1/experiences/
Query Parameters:
Param | Description | Example |
limit - integer | Limit result set to x records | 10 |
created | Timestamp when record was created | created[gte]=2022-02-26T23:59:00Z |
updated | Timestamp when record was updated | updated[gte]=2022-02-26T23:59:00Z |
visibility - string | Filter by visibility of experiences [standard, selective, none, archived] | standard |
Example Request:
curl -XGET -H 'X-API-KEY: ' 'https://app.anyroad.com/external/api/v1/experiences/'
Example Responses:
200 - List Response
{
"url": "string",
"next_url": "string",
"previous_url": "string",
"first_url": "string",
"items": [
{
"title": "string",
"subtitle": "string",
"description": "string",
"tags": [
"string"
],
"category": "string",
"visibility": "standard",
"id": "string",
"created": "2024-01-08T19:59:20.849Z",
"updated": "2024-01-08T19:59:20.849Z",
"url": "string",
"images": [
{
"url": "string",
"size": "string",
"caption": "string"
}
]
}
]
}
Get Experience
Retrieving details about a specific experience requires an experience_id to be passed in as a url path parameter.
URL:
https://app.anyroad.com/external/api/v1/experiences/{experience_id}/
Example Request:
curl -XGET -H 'X-API-KEY: ' 'https://app.anyroad.com/external/api/v1/experiences/12345/'
Example Responses:
200 - Read Response
{
"title": "string",
"subtitle": "string",
"description": "string",
"tags": [
"string"
],
"category": "string",
"visibility": "standard",
"id": "string",
"created": "2024-01-08T20:30:25.675Z",
"updated": "2024-01-08T20:30:25.675Z",
"url": "string",
"images": [
{
"url": "string",
"size": "string",
"caption": "string"
}
]
}
Error Responses:
400 - Bad Input Parameter
{
"type": "https://example.com/error-type",
"title": "Incorrect parameters provided",
"status": 400,
"detail": "limit value 'abc' must be an integer",
"code": "limit_out_of_range",
"instance": "/path",
"request_id": "5f7e0797-7sd2-4807-afaa-3efb80c8423a"
}
401 - Unauthorized
{
"type": "https://example.com/error-type",
"title": "Authorization token invalid",
"status": 401,
"detail": "please verify your authorization token is correct and has not expired",
"code": "invalid_bearer_token",
"instance": "/path",
"request_id": "5fcd797-7a42-4807-afaa-3efb80c8423a"
}
500 - Server Error
{
"type": "https://example.com/error-type",
"title": "Something went wrong",
"status": 500,
"detail": "please try again later",
"code": "server_error",
"instance": "/path",
"request_id": "5f3frd97-7a42-4677-afaa-3efb8ty6423a"
}
If you have any additional questions, you can contact our Customer Experience team via chat or at [email protected].