Was this helpful?
The Alpaca GraphQL API allows you to connect to ATDW in a single integration, accessing product information as well as performing search, and adding those products to your own collection. In addition to loading the information from ATDW, you can add your own tags, categories and other attributes to the data. You can also put ATDW data into Itineraries, to form itineraries that are kept up to date with information from organisations that update when data in ATDW updates.
Alpaca provide an integration directly into the Australian Tourism Data Warehouse (ATDW) to enable you to leverage their API and service for information about Australian tourism products.
This information becomes easily accessible to drive your place database or be integrated seemlessly into lists, itineraries and more. Leveraging the Alpaca API, information accessed from the ATDW will be sync'd refreshed automatically, saving you the need to write additional integrations.
The Australian Tourism Data Warehouse, commonly shortenned to ATDW, is a private company owned by the state tourism bodies, and offers servies for Australian Tourism Operators to offer information about their products to distributors. With an ATDW distributor agreement, you can access a wealth of information about different tourism operators in Australia. This information is encouraged to be kept up to date, as it is used by the state tourism providers, RTO's and other commercial distributors to list information about the business.
Your ATDW API Key has been associated with your profile (connect application)
You have your Alpaca API Key for querying GraphQL
The Australian Tourism Data Warehouse (ATDW) uses a unique product ID to reference different products on their platform. These product IDs are a string of characters that look like "5cae80be57a096cd7084b6ab".
These product IDs can be used to retrieve information for different types of content on the ATDW such as:
Accommodation
Attractions
Events
Tours
To reference an ATDW place in the Alpaca platform, you will need to use the
format place/atdw:product:<product_id>
, where <product_id>
is the product ID
of the place you want to reference. For example, to reference the ATDW place
with the product ID "5cae80be57a096cd7084b6ab", you would use the identifier
"place/atdw:product:5cae80be57a096cd7084b6ab" in the Alpaca platform.
place/atdw:product:<product_id>
Please note that Alpaca also supports other place providers such as Facebook and OpenStreetMap, each one of them has their unique identifier format.
1# Load information about a winery from Australian Tourism Data Warehouse
2
3query GetWinery {
4 # use the place() query to load information about a specific winery
5 place(id: "place/atdw:product:5732b88b19f4a4ae38aa1974") {
6 # Identifiers/Type
7 id
8 __typename
9
10 # Basic information
11 name
12 description
13
14 # Various contact methods for the place
15 contact {
16 facebookUrl
17 twitterUrl
18 instagramUrl
19 bookingUrl
20 }
21
22 # Images
23 images: mediaContainers(first: 3) {
24 nodes {
25 resource {
26 ... on MediaImage {
27 url(bestFit: [200, 200])
28 copyright
29 attribution
30 caption
31 }
32 }
33 }
34 }
35
36 # Source and Attribution
37 contributor
38
39 # Required attribution/tracking for the place for ATDW
40 attribution {
41 pixel
42 }
43
44 # Address Information
45 address {
46 addressLineOne
47 locality
48 region
49 postalCode
50 }
51
52 # Geo Coordinates
53 position {
54 lon
55 lat
56 }
57
58 # Layers/Categories
59 layers {
60 name
61 }
62
63 # Wine specific attributes...
64 # There are many attributes that can be obtain about places which we have
65 # catalogued, this example draws from specific wine information
66 # Wine Varieties
67 wineVarieties: attr(id: "place/wine-varieties") {
68 value
69 }
70 # Wine Alternative Styles
71 wineAlternativeStyles: attr(id: "place/wine-alternative-styles") {
72 value
73 }
74 # Wine Viticultural Practices
75 wineViticulturalPractices: attr(
76 id: "place/winemaking-viticultural-practices"
77 ) {
78 value
79 }
80 # Wine Regions
81 wineRegions: attr(id: "place/wine-regions") {
82 value
83 }
84 # Some additional...
85 # Accreditations for Venue
86 accreditations: attr(id: "place/accreditations") {
87 value
88 }
89 # Cuisine Types
90 cuisineTypes: attr(id: "place/cuisine-types") {
91 value
92 }
93 # Accessibility
94 accessibility: attr(id: "place/accessible-comment") {
95 value
96 }
97 }
98}
Sandbox: Configure | Try Operation
Example Response
1{
2 "data": {
3 "place": {
4 "id": "place/atdw:product:5732b88b19f4a4ae38aa1974",
5 "__typename": "Place",
6 "name": "Heathcote Winery",
7 "description": "<p>Heathcote Winery is one of the pioneer wineries of the Heathcote Region and has established a reputation as one of the icon wineries of the Region.</p><p>Heathcote Winery specialises in the production of Shiraz and has a premium range of wines sourced entirely from estate vineyards. The Mail Coach Shiraz, upon which Heathcote Winery has built its reputation, delivers a quintessential Heathcote Shiraz that is the envy of many other producers. Three single vineyard wines, the Slaughterhouse Paddock Shiraz, The Origin Shiraz, and Heathcote Winery's signature wine The Wilkins Shiraz complete the super premium range</p><p>Tastings at Heathcote Winery are free and also include the estate Vermentino, Viognier, Grenache Rose and an enticing Fortified Shiraz, the Slaughterfied, to complete the experience.</p><p>The unique Cellar Door in Heathcote's Main Street is open seven days a week and light fare to compliment the wines is available on weekends and public holidays.</p>",
8 "contact": {
9 "facebookUrl": "http://www.facebook.com/heathcotewinery/",
10 "twitterUrl": "https://twitter.com/heathcotewinery",
11 "instagramUrl": "https://www.instagram.com/heathcotewinery",
12 "bookingUrl": null
13 },
14 "images": {
15 "nodes": ...
16 },
17 "attribution": [
18 {
19 "pixel": "https://atlas.atdw-online.com.au/pixel?productId=5732b88b19f4a4ae38aa1974&distributorId={distributorId}&language=ENGLISH&syndicationMethod=API"
20 }
21 ],
22 "address": {
23 "addressLineOne": "185 High Street",
24 "locality": "Heathcote",
25 "region": "Victoria",
26 "postalCode": "3523"
27 },
28 "position": {
29 "lon": 144.70510430000002,
30 "lat": -36.9188535
31 },
32 "layers": [
33 {
34 "name": "Food and Drink"
35 },
36 {
37 "name": "Wineries"
38 }
39 ],
40 "wineVarieties": {
41 "value": [
42 {
43 "type": "Red wines",
44 "varieties": ["Shiraz / Syrah"]
45 },
46 {
47 "type": "White wines",
48 "varieties": ["Vermentino", "Viognier"]
49 },
50 {
51 "type": "Fortified Wine",
52 "varieties": ["Vintage Fortified"]
53 }
54 ]
55 },
56 "wineAlternativeStyles": {
57 "value": ["Vegan or Vegetarian Wine"]
58 },
59 "wineViticulturalPractices": {
60 "value": [
61 "Hand-picked",
62 "Single Vineyard",
63 "Estate Grown",
64 "Family Run"
65 ]
66 },
67 "wineRegions": {
68 "value": ["Heathcote", "Central Victoria (zone)"]
69 },
70 "accreditations": {
71 "value": ["Quality Tourism Accreditation"]
72 },
73 "cuisineTypes": {
74 "value": ["Australian", "Light Meals", "Share Plates"]
75 },
76 "accessibility": {
77 "value": "Caters for people who use a wheelchair. Caters for people with sufficient mobility to climb a few steps but who would benefit from fixtures to aid balance. (This includes people using walking frames and mobility aids)"
78 }
79 }
80 }
81}
You can also find all the attributes that are available for a location with the following query:
1query {
2 place(id: "place/atdw:product:5732b88b19f4a4ae38aa1974") {
3 id
4
5 # Load the first 30 attributes for the product
6 attrs(first: 30) {
7 edges {
8 node {
9 id
10 value
11 }
12 }
13 }
14 }
15}
Sandbox: Configure | Try Operation
Alpaca offers a additional attributes that can be used to enhance the data available about a location.
1query GetPlace {
2 place(id: "place/atdw:product:5732b88b19f4a4ae38aa1974") {
3 position {
4 lon
5 lat
6
7 # Access the timezone at the coordinate
8 timezone: attrValue(id: "place/time-zone")
9
10 # Further information, such as regions..
11 iso3166: attrValue(id: "place/iso-3166-2")
12
13 # Australian information, such as locality, gov, etc
14 locality: attrValue(id: "place/abs:locality")
15 lga: attrValue(id: "place/abs:local-government-area")
16 electoral: attrValue(id: "place/abs:commonwealth-electoral-division")
17 tourismRegion: attrValue(id: "place/abs:tourism-region")
18 }
19 }
20}
Sandbox: Configure | Try Operation
The response if successful will look like the following:
1{
2 "data": {
3 "place": {
4 "position": {
5 "lon": 144.70510430000002,
6 "lat": -36.9188535,
7 "timezone": "UTC+10:00",
8 "iso3166": "AU-VIC",
9 "locality": "Heathcote (Vic.)",
10 "lga": "Greater Bendigo (C)",
11 "electoral": "Euroa (Northern Victoria)",
12 "tourismRegion": "Bendigo Loddon"
13 }
14 }
15 }
16}
Where opening hours are available, you can use the Alpaca platform to interpret and display opening hours of locations.
Search for a upcoming or future range
Localise the hours to a different timezone
Identify public holidays that could affect opening hours
Change the format and display for dates and times
Alpaca also offers the inclusion of Public Holidays in order to flag to users of your website or application that they may have affected operating hours due to local observed public holidays.
1# Obtain the open/closed hours for the place given a period, such as the
2# upcoming week or future date range. Includes information on local public
3# holidays that could affect opening hours.
4
5query QueryDateRangeOpenClosedTimes($placeId: ID!) {
6 # Use the place() operation
7 place(id: $placeId) {
8 # Access the opening hours (where specified)
9 hours {
10 # Use the forDays operation to obtain days across a range of dates. By
11 # default, without any arguments the next 7 days will be selected. You
12 # can change the range by specifying an alternative offset (which allows
13 # you to specify values like { days: 14 }) or provide a specific start and
14 # end dates (as ISO-8601 date strings)
15 forDays {
16 # Date/day, as ISO-8601, or as formatted for presentation using the
17 # Unicode Technical Standard #35 Date Field Symbols
18 date(format: "EEE, MMM d")
19 # Whether there is a public holiday for this date detected for this
20 # region on this date
21 publicHolidays
22 # Obtain the intervals for this date, requesting the opening status
23 # status is optional, otherwise use Open/Closed to specify your pref
24 intervals(status: Open) {
25 # Hours, from/to as ISO-8601 string, or formatted using the Unicode
26 # Technical Standard #35 Date Field Symbols
27 from(format: "h:mm a")
28 to(format: "h:mm a")
29 # Status (Open/Closed)
30 status
31 # Any corresponding comment for the opening hours
32 comment
33 }
34 }
35 }
36 }
37}
Sandbox: Configure | Try Operation
1{
2 "data": {
3 "place": {
4 "hours": {
5 "forDays": [
6 {
7 "date": "Mon, Jan 23",
8 "publicHolidays": [],
9 "intervals": [
10 {
11 "from": "7:00 AM",
12 "to": "3:30 PM",
13 "status": "Open",
14 "comment": null
15 }
16 ]
17 },
18 {
19 "date": "Tue, Jan 24",
20 "publicHolidays": [],
21 "intervals": [
22 {
23 "from": "7:00 AM",
24 "to": "3:30 PM",
25 "status": "Open",
26 "comment": null
27 }
28 ]
29 },
30 {
31 "date": "Wed, Jan 25",
32 "publicHolidays": [],
33 "intervals": [
34 {
35 "from": "7:00 AM",
36 "to": "3:30 PM",
37 "status": "Open",
38 "comment": null
39 }
40 ]
41 },
42 {
43 "date": "Thu, Jan 26",
44 "publicHolidays": ["Australia Day"],
45 "intervals": [
46 {
47 "from": "7:00 AM",
48 "to": "3:30 PM",
49 "status": "Open",
50 "comment": null
51 }
52 ]
53 },
54 {
55 "date": "Fri, Jan 27",
56 "publicHolidays": [],
57 "intervals": [
58 {
59 "from": "7:00 AM",
60 "to": "3:30 PM",
61 "status": "Open",
62 "comment": null
63 }
64 ]
65 },
66 {
67 "date": "Sat, Jan 28",
68 "publicHolidays": [],
69 "intervals": [
70 {
71 "from": "8:00 AM",
72 "to": "3:30 PM",
73 "status": "Open",
74 "comment": null
75 }
76 ]
77 },
78 {
79 "date": "Sun, Jan 29",
80 "publicHolidays": [],
81 "intervals": [
82 {
83 "from": "9:00 AM",
84 "to": "3:30 PM",
85 "status": "Open",
86 "comment": null
87 }
88 ]
89 }
90 ]
91 }
92 }
93 }
94}
You can also leverage the place search capabilities of the API by specifying the
sources
as AustralianTourismDataWarehouse
.
1# Search the Australian Tourism Data Warehouse (ATDW) for places using an
2# autocomplete style text query. Search includes highlighting for results
3# and summarising places into 2 main/secondary labels
4
5query SearchPlaceAutocompleteFromATDW {
6 # use the placeAutocompleteSearch operation to query ATDW
7 placeAutocompleteSearch(
8 text: "Heathcote Winery"
9 # Supply Australian Tourism Data Warehouse as source
10 sources: AustralianTourismDataWarehouse
11 # Provide the max number of records to return (differs by provider)
12 first: 5
13 ) {
14 edges {
15 node {
16 # Place Identifier/types
17 id
18 __typename
19 # obtain place information here...
20 }
21 # Autocomplete Matching
22 # Main label for place
23 main {
24 label
25 # Text matching for text highlighting on result
26 matches {
27 offset
28 length
29 }
30 }
31 # Secondary label for place (additional supporting text, 2nd line text)
32 secondary {
33 label
34 # Text maching for text highlighting on result
35 matches {
36 offset
37 length
38 }
39 }
40 }
41 }
42}
Sandbox: Configure | Try Operation
1{
2 "data": {
3 "placeAutocompleteSearch": {
4 "edges": [
5 {
6 "node": {
7 "id": "place/atdw:product:5732b88b19f4a4ae38aa1974",
8 "__typename": "PlaceSearchNode"
9 },
10 "main": {
11 "label": "Heathcote Winery",
12 "matches": [
13 {
14 "offset": 0,
15 "length": 9
16 },
17 {
18 "offset": 10,
19 "length": 6
20 }
21 ]
22 },
23 "secondary": {
24 "label": "185 High Street, Heathcote",
25 "matches": [
26 {
27 "offset": 17,
28 "length": 9
29 }
30 ]
31 }
32 },
33 {
34 "node": {
35 "id": "place/atdw:product:56b250842661405945694454",
36 "__typename": "PlaceSearchNode"
37 },
38 "main": {
39 "label": "Sanguine Estate",
40 "matches": []
41 },
42 "secondary": {
43 "label": "77 Shurans Lane, Heathcote",
44 "matches": [
45 {
46 "offset": 17,
47 "length": 9
48 }
49 ]
50 }
51 },
52 {
53 "node": {
54 "id": "place/atdw:product:56b250aeb042386245d58980",
55 "__typename": "PlaceSearchNode"
56 },
57 "main": {
58 "label": "Heathcote",
59 "matches": [
60 {
61 "offset": 0,
62 "length": 9
63 }
64 ]
65 },
66 "secondary": {
67 "label": "VIC, Australia",
68 "matches": []
69 }
70 },
71 {
72 "node": {
73 "id": "place/atdw:product:56b25647b042386245d5d30f",
74 "__typename": "PlaceSearchNode"
75 },
76 "main": {
77 "label": "Domaine Asmara",
78 "matches": []
79 },
80 "secondary": {
81 "label": "61 Gibb Road, Toolleen, VIC",
82 "matches": []
83 }
84 },
85 {
86 "node": {
87 "id": "place/atdw:product:56b24d2b2661405945690da5",
88 "__typename": "PlaceSearchNode"
89 },
90 "main": {
91 "label": "Munari Wines",
92 "matches": []
93 },
94 "secondary": {
95 "label": "1129 Northern Hwy, Heathcote",
96 "matches": [
97 {
98 "offset": 19,
99 "length": 9
100 }
101 ]
102 }
103 }
104 ]
105 }
106 }
107}
If you are creating an itinerary (or list of saved places), you can supply the reference to the product when creating the itinerary location.
You can see further examples of how to work with itineraries by visiting our sections about Itineraries.
1# Add a location to our itinerary, associating the place to Mavis The Grocer
2# using the ATDW Product identifier. Once the location is added to the
3# itinerary, we query back the create items on the itinerary.
4
5mutation CreateItineraryLocationWithAtdwPlace {
6 # Use the createItineraryLocation mutation operation
7 createItineraryLocation(
8 # Supply our Itinerary to add the item to
9 itineraryId: "itinerary/ABC123"
10 # Describe the location
11 location: {
12 # Provide some optional content to personalise the itinerary
13 title: "Grab a coffee"
14 synopsis: "Nearby, we can find Mavis the Grocer open most days"
15 # Link the location to a known place
16 place: {
17 # Referencing the place from ATDW
18 id: "place/atdw:product:5cae80be57a096cd7084b6ab"
19 # Providing the position lon/lat
20 position: { lon: 144.9970825017, lat: -37.8030584810 }
21 }
22 }
23 ) {
24 # Select what we need from the itinerary or the result of the operation
25 cascaded {
26 created {
27 # Access the itinerary location ID as needed
28 __typename
29 id
30 }
31 }
32 }
33}
Sandbox: Configure | Try Operation
If you are creating a collection containing ATDW products, you can supply the place id to collection locations.
1# Creates a Collection Location within a collection
2
3mutation CreateCollectionLocation {
4 # use createCollectionLocation for this operation
5 createCollectionLocation(
6 # Supply the collection to place the collection location within
7 collectionId: "collection/ABC123"
8 # Supply the data for the location model
9 location: {
10 # Provide content for the collection item
11 # Synopsis, tags, description, media, website etc.
12 title: "Mavis the Grocer"
13 # Supply tags (we can later query on this)
14 tags: ["cafe"]
15 # Note: See external refs/source if you want to store your own identifiers
16 # Provide a reference to the place/position for the place location
17 place: {
18 id: "place/atdw:product:5cae80be57a096cd7084b6ab"
19 position: { lon: 144.9970825017, lat: -37.803058481 }
20 }
21 }
22 ) {
23 location {
24 # Returns with the collection location just created
25 id
26 __typename
27 }
28 }
29}
Sandbox: Configure | Try Operation
Australian Tourism Data Warehouse
Alpaca Travel offers a vector tile hosting service that includes a regularly updated database of ATDW products across Australia. This can be used by users with ATDW Distributor agreements direct with ATDW in order to display a map of all the ATDW products
Adding Photos
Itineraries as well as Itinerary Locations can contain a number of media elements, including Photos.
Integration
The alpaca platform is accessible through creating `Access Tokens` to profiles. There are predominantly 2-levels of access tokens available, such as using a `public` or `secret` access token.
Copyright © 2024 - Made with love ❤️ in Australia.