Version 1.0
Page 1
Contents
Contents 2
Overview 5
Features 5
API endpoints 7
Request parameters 7
Example request 8
Example request 11
Example request 13
Example request 14
Page 2
Sample JSON response 15
Example request 15
Example request 16
Example request 17
Example request 18
Example request 19
Authorisation 20
Request headers 20
Request parameters 20
Example request 20
Page 3
Image resizing 22
URL parameters 22
Example request 22
Revision history 23
Page 4
Overview
The purpose of the Days Out Guide API is to allow partners to display a feed of attractions and offers within
their own systems, and claim offers / vouchers from the Days Out Guide system.
The API exposes all of the data used by daysoutguide.co.uk via a RESTful web API available in both JSON
and XML formats.
Permissions as to what data a given API user can access is defined when their API credentials are issued.
Features
Unlike the current “XML Feed” that only surfaces limited attraction data, the Days Out Guide API serves all
of the attraction and offers data that exists within the system. The API is even used within the Days Out
Guide site so it can be trusted as the source of truth for data.
A new system for IDs has been introduced to ensure the IDs associated with data in the system (e.g.
attractions, offers, train stations, etc) remain unique. Everything in the system has been assigned a unique
Guid based ID. Train stations now respond to their National Rail CRS station codes as their unique IDs.
It is possible to filter the wide range of attractions on offer through Days Out Guide by a wide range of
parameters, including by multiple categories, genres and regions.
The ability to redeem vouchers / coupons via the API makes it simple to integrate Days Out Guide’s rich
variety of offers into a white labelled solution presented through your own website.
All images served by the API are able to be cropped and resized to fit the specific needs for your use case.
The Days Out Guide API was built with performance and stability in mind as a more suitable alternative to
the current “XML Feed”. The API sits on separate high-availability infrastructure from the daysoutguide.co.uk
website to ensure the service is always available and requests are responded to quickly.
Page 5
“XML Feed” functionality is now considered deprecated and the Days Out Guide API should be used in its
place. Essential fixes to ensure the “XML Feed” performs as expected will be applied, but new features and
improvements will not be added going forward.
Page 6
API endpoints
There are 9 different endpoints on the API to retrieve data and perform transactions within the Days Out
Guide system.
The API is served over HTTPS and is available through a public domain https://api.daysoutguide.co.uk/.
API calls are versioned (e.g. /api/v1/attractions) to allow changes to be easily rolled out without breaking
existing implementations. Friendly meaningful error messages with corresponding HTTP status codes are
returned where necessary.
Data is available in both JSON and XML formats determined by the “Accept” or “Content-Type” headers sent
with each request, as per HTTP Content Negotiation standards. See
https://docs.microsoft.com/en-us/aspnet/web-api/overview/formats-and-model-binding/content-negotiation
for more information on Content Negotiation.
It is possible to filter and sort the collection of results returned by the API. By default there are no filters set.
Results appear in order of most popular (defined by the number of vouchers claimed).
Request parameters
Page 7
Region Filters the results set to only return Accepts a pipe “|”
attractions within a given region; e.g. separated list to filter by
London, attractions where one or
Scotland, South West more of the given regions
is set
Category Filters the results set to only return Accepts a pipe “|”
attractions within a given category; e.g. separated list to filter by
Theme & Adventure Parks, Galleries & attractions where one or
Museums more of the given
categories is set
Genre Filters the results set to only return Accepts a pipe “|”
attractions within a given genre; e.g. Under separated list to filter by
£10, Families and Children attractions where all of
the given genres is set
Example request
https://api.daysoutguide.co.uk/v1/attractions?region=London|Scotland&genre=Free|Families and
Children&showFree=true&orderBy=recent
Page 8
within
{
“Items”: [{
"Id": "1fa8e7cb-0366-466e-b6aa-63b6654840b1",
"Name": "The Coca-Cola London Eye",
"Description": "<p>The Coca-Cola London Eye has been London’s number one visitor experience for
over a decade. Step into a capsule and feel the exhilaration as you rise up over the River Thames and come
face to face with the Houses of Parliament and Big Ben, before soaring above them, up to 135 metres on the
world’s tallest cantilevered observation wheel.</p><p>A trip on the Coca-Cola London Eye undoubtedly
makes up part of the ultimate day out in the city and is ideally located on the beautiful Southbank amongst
brilliant bars and restaurants.</p><p>Included with every ticket is the Coca-Cola London Eye 4D Cinema
Experience. This heart-warming mini-movie is a must-see for any Londoner and comes with a few surprises
and a great soundtrack featuring Coldplay and Goldfrapp. It creates the perfect build up to your
take-off.</p>",
"Directions": "Exit the M4 at Junction 1",
"PhoneNumber": "03333212001",
"Website": "https://www.londoneye.com/",
"PostCode": "SE1 7PB",
"Categories": [{
"Id": "9c809ece-12b4-4122-a3c9-3837a58406bd",
"Name": "Tours & Guided Walks"
},{
"Id": "6b818e92-05fc-4c87-aad4-38bd62872c34",
"Name": "Landmarks & Historical Sites"
}],
"Genres": [{
"Id": "4d21cc5b-fa3a-43fe-b45d-365b0db54592",
"Name": "Family And Children"
},{
Page 9
"Id": "a1c1bc7b-756a-4a2d-a00f-c5aeb9239ff9",
"Name": "London"
}],
"FeaturedImage": "https://www.daysoutguide.co.uk/media/1234/london-eye.jpg",
"Images": [
"https://www.daysoutguide.co.uk/media/1234/new-image.jpg",
"https://www.daysoutguide.co.uk/media/1234/alternative-image.jpg"
],
"Region": "London",
"NearestStation": {
"Id": "WAT",
"Name": "London Waterloo"
},
"AccessInformation": "<p>Please check <a href="https://www.website.com/">website</a> for
details.</p>",
"OpeningTimes": "<p>Daily from 10.00</p>",
"Admission": {
"Adult": 24.95,
"Child": 24.95
},
"RecommendAttractions": [
"15ac9a80-abd3-410f-95d0-923940bc3ec2",
"324240e6-4ee9-4798-8580-90a85474d083",
"5303d949-902c-4a46-9e87-1c6883343d85",
"Ede10133-8509-4766-89cf-5884b5617ddc",
"F27a56b8-87e6-4e9e-a0d0-df85b5d676cd"
],
"Offers": [{
"Id": "4fce5728-4c1a-44bf-8311-341ebd8d9f23",
"Name": "2FOR1 London",
"Terms": "<p>Lorem ipsum dolor sit amet, et denique corrumpit splendide nam,</p>",
"OfferType": "2FOR1",
"Expires": 2020-12-31 00:00:00,
"SavingsInfo": "<p>Lorem ipsum dolor sit amet, et denique corrumpit splendide nam,</p>"
},
{
...
}]
},{
...
}],
“TotalItems”: 105,
“ItemsPerPage”: 10
}
Page 10
it has been made available to the requesting API user. The object returned by the endpoint will be in the
same structure as a singular result item from the /attractions endpoint - an example of this is below.
Example request
https://api.daysoutguide.co.uk/v1/attractions/1fa8e7cb-0366-466e-b6aa-63b6654840b1
Page 11
Offers List of Offers for offers associated with object
the listed attraction, including details
about the offer
{
"Id": "1fa8e7cb-0366-466e-b6aa-63b6654840b1",
"Name": "The Coca-Cola London Eye",
"Description": "<p>The Coca-Cola London Eye has been London’s number one visitor experience for over
a decade. Step into a capsule and feel the exhilaration as you rise up over the River Thames and come face
to face with the Houses of Parliament and Big Ben, before soaring above them, up to 135 metres on the
world’s tallest cantilevered observation wheel.</p><p>A trip on the Coca-Cola London Eye undoubtedly
makes up part of the ultimate day out in the city and is ideally located on the beautiful Southbank amongst
brilliant bars and restaurants.</p><p>Included with every ticket is the Coca-Cola London Eye 4D Cinema
Experience. This heart-warming mini-movie is a must-see for any Londoner and comes with a few surprises
and a great soundtrack featuring Coldplay and Goldfrapp. It creates the perfect build up to your
take-off.</p>",
"Directions": "Exit the M4 at Junction 1",
"PhoneNumber": "03333212001",
"Website": "https://www.londoneye.com/",
"PostCode": "SE1 7PB",
"Categories": [{
"Id": "9c809ece-12b4-4122-a3c9-3837a58406bd",
"Name": "Tours & Guided Walks"
},{
"Id": "6b818e92-05fc-4c87-aad4-38bd62872c34",
"Name": "Landmarks & Historical Sites"
}],
"Genres": [{
"Id": "4d21cc5b-fa3a-43fe-b45d-365b0db54592",
"Name": "Family And Children"
},{
"Id": "a1c1bc7b-756a-4a2d-a00f-c5aeb9239ff9",
"Name": "London"
}],
"FeaturedImage": "https://www.daysoutguide.co.uk/media/1234/london-eye.jpg",
"Images": [
"https://www.daysoutguide.co.uk/media/1234/new-image.jpg",
"https://www.daysoutguide.co.uk/media/1234/alternative-image.jpg"
],
"Region": "London",
"NearestStation": {
"Id": "WAT",
"Name": "London Waterloo"
},
"AccessInformation": "<p>Please check <a href="https://www.website.com/">website</a> for
details.</p>",
"OpeningTimes": "<p>Daily from 10.00</p>",
Page 12
"Admission": {
"Adult": 24.95,
"Child": 24.95
},
"RecommendAttractions": [
"15ac9a80-abd3-410f-95d0-923940bc3ec2",
"324240e6-4ee9-4798-8580-90a85474d083",
"5303d949-902c-4a46-9e87-1c6883343d85",
"Ede10133-8509-4766-89cf-5884b5617ddc",
"F27a56b8-87e6-4e9e-a0d0-df85b5d676cd"
],
"Offers": [{
"Id": "4fce5728-4c1a-44bf-8311-341ebd8d9f23",
"Name": "2FOR1 London",
"Terms": "<p>Lorem ipsum dolor sit amet, et denique corrumpit splendide nam,</p>",
"OfferType": "2FOR1",
"Expires": 2020-12-31 00:00:00,
"SavingsInfo": "<p>Lorem ipsum dolor sit amet, et denique corrumpit splendide nam,</p>"
},
{
...
}]
}
Example request
https://api.daysoutguide.co.uk/v1/attractions/1fa8e7cb-0366-466e-b6aa-63b6654840b1/offers
Page 13
OFF
{
“Items”: [{
"Id": "4fce5728-4c1a-44bf-8311-341ebd8d9f23",
"Name": "2FOR1 London",
"Terms": "<p>Lorem ipsum dolor sit amet, et denique corrumpit splendide nam,</p>",
"OfferType": "2FOR1",
"Expires": 2020-12-31 00:00:00,
"SavingsInfo": "<p>Lorem ipsum dolor sit amet, et denique corrumpit splendide nam,</p>"
},
{
...
}],
“TotalItems”: 5,
“ItemsPerPage”: 10
}
Example request
https://api.daysoutguide.co.uk/v1/offers/4fce5728-4c1a-44bf-8311-341ebd8d9f23
Page 14
OfferType Type of the offer; e.g. 2FOR1, 3FOR2, 30% string
OFF
{
“Items”: [{
"Id": "4fce5728-4c1a-44bf-8311-341ebd8d9f23",
"Name": "2FOR1 London",
"Terms": "<p>Lorem ipsum dolor sit amet, et denique corrumpit splendide nam,</p>",
"OfferType": "2FOR1",
"Expires": 2020-12-31 00:00:00,
"SavingsInfo": "<p>Lorem ipsum dolor sit amet, et denique corrumpit splendide nam,</p>"
},
{
...
}],
“TotalItems”: 5,
“ItemsPerPage”: 10
}
Example request
https://api.daysoutguide.co.uk/v1/offers/4fce5728-4c1a-44bf-8311-341ebd8d9f23/claim/1fa8e7cb-0366-466
e-b6aa-63b6654840b1
Page 15
OfferType Type of the offer; e.g. 2FOR1, 3FOR2, 30% string
OFF
{
"Id": "4fce5728-4c1a-44bf-8311-341ebd8d9f23",
"Name": "2FOR1 London",
"Terms": "<p>Lorem ipsum dolor sit amet, et denique corrumpit splendide nam,</p>",
"OfferType": "2FOR1",
"VoucherType": "Days Out Guide",
"Expires": 2020-12-31 00:00:00,
"CouponCode": "",
"ClaimUrl": "https://www.daysoutguide.co.uk/london-eye"
}
Example request
https://api.daysoutguide.co.uk/v1/taxonomy/categories
Page 16
Id Category Id Guid (string)
{[
{
"Id": "9c809ece-12b4-4122-a3c9-3837a58406bd",
"Name": "Tours & Guided Walks"
},
{
...
}
]}
Example request
https://api.daysoutguide.co.uk/v1/taxonomy/genres
{[
{
"Id": "4d21cc5b-fa3a-43fe-b45d-365b0db54592",
"Name": "Family And Children"
},
{
...
Page 17
}
]}
Example request
https://api.daysoutguide.co.uk/v1/taxonomy/regions
{[
{
"Id": "1c7dde89-526f-4a74-809c-80d68deab80f",
"Name": "London",
“InnerRegions”: [{
"Id": "1c7dde89-526f-4a74-809c-80d68deab80f",
"Name": "London",
“InnerRegions”: [{
...
}]
},
{
...
}]
},
{
...
}
Page 18
]}
Example request
https://api.daysoutguide.co.uk/v1/taxonomy/stations
{[
{
"Id": "WAT",
"Name": "London Waterloo",
“Url”: “http://ojp.nationalrail.co.uk/service/ldbboard/dep/WAT.aspx”
},
{
...
}
]}
Page 19
Authorisation
The API is protected by a token based authentication system, each access token has a lifespan of 24 hours.
Requests to the API must be sent with an “Authorization” header containing the access token.
Request headers
Request parameters
Example request
https://api.daysoutguide.co.uk/token?grant_type=password&username=demoUser&password=LxZsWrGV
Page 20
Example JSON response
{
"access_token":
"mLoY8DEiLcjvv4_kS6diTCIieKJA2Hip3xRruJLj8QgOVhaXHsW3MwD3kEF47ARKnWP8n6Q2C4ISf1Wi0tn
Q2FK54N1UXDQBjxp1J6dWqjzLnzhjY7DFc_OSWw09a7cB15orZDc5M5Cv_CF9MuFQ5cHxRWVS7ilMkED
5Z83t7FvWJMRrsUK49rhaJuxKBk2XAnGqo7PkG1lUp1oyDldfRNVCIkHUF2JkK97qyVwkuqddfcuUMzIRuBn
HqCtWqbLxkjRJ5HF7LaEssph4NllV7b6hE5aNb_u36qlNCAkYGOShB-iVhv_ZSzmCziBS2Pmk4wt5iopTLPx
Z3AfG58jkPg",
"token_type": "bearer",
"expires_in": 86399
}
For optimum performance it is recommended to store a copy of your access token within your application
until it expires as the token generation process is intensive and can be slow.
{
"message": "Authorization has been denied for this request."
}
In this scenario it is recommended to make an attempt to obtain a new token from the API via the /token
endpoint and retry the original request again. Any further errors experienced after retrying the request should
be handled gracefully by your application rather than continuing to attempt retrying request.
Page 21
Image resizing
The URLs of images returned by the API point to the resource in its original uploaded form without any
optimisations. For optimum performance, images should always be resized to appropriate dimensions for
their purpose. This can be achieved by adding a variety of query string parameters onto the image URLs.
The API relies on the ImageProcessor.NET open-source library to resize images. A full definition of the
available resize modes can be found here
http://imageprocessor.org/imageprocessor-web/imageprocessingmodule/resize/
URL parameters
● Pad
Mode mode=crop
● BoxPad
● Crop Defaults to “pad”
● Min
● Max
● Stretch
Example request
https://www.daysoutguide.co.uk/media/1234/new-image.jpg?mode=crop&width=200&height=200
In this example “new-image.jpg” would be returned but cropped to 200px in height and 200px wide.
In the case that the supplied crop size is larger or not proportionate to the original image dimensions a black
border will fill the empty space around the image.
Page 22
Revision history
From time to time changes are required to the API specification that require this document to be updated.
These are logged in the table below.
Date Description
14th June 2018 Changing separator for Region, Category and Genre filters on
/attractions API endpoint to use pipes “|” rather than commas “,”.
Previously: /attractions?region=London,Scotland
Now: /attractions?region=London|Scotland
Page 23