Was this helpful?
Alpaca Travel Itineraries leverage several attributes in order to provide classifications to created content.
Attribute ID | Description |
---|---|
itinerary/type | The type of Itinerary: list , trail , trip (string) |
itinerary/uses | The intended use of the Itinerary (string[]) |
itinerary/genres | The genre of the Itinerary (string[]) |
itinerary/styles | The styles of the Itinerary (string[]) |
itinerary/transports | The styles of the Itinerary (string[]) |
itinerary/audiences | The intended audiences for the Itinerary (string[]) |
itinerary/difficulies | Difficulties of the Itinerary (string[]) |
itinerary/fitness-type | Fitness type for the Itinerary (string) |
itinerary/environments | Environments for the Itinerary (string[]) |
itinerary/pricing-type | Pricing classification for the Itinerary (string[]) |
itinerary/route-type | The route type of the itinerary (string) |
itinerary/route-reference | The route reference for the itinerary (string) |
itinerary/is-route-reversible | Whether the route can be reversed (boolean) |
Specifying these values can be done during creation. Alpaca offers many
suggestions from a standard set to users using the application (which will have
a alpaca:
prefix to their value) but you can place your own values within the
set.
1# Create an itinerary with a classification
2
3mutation CreateItineraryWithClassifications {
4 # Create an itinerary with some classification assignment
5 createItinerary(
6 itinerary: {
7 title: "My example itinerary"
8 defaultLocale: "en"
9 attrs: [
10 { id: "itinerary/type", value: "trip" }
11 { id: "itinerary/genres", value: ["alpaca:genre:FOOD|CULINARY"] }
12 ]
13 }
14 ) {
15 itinerary {
16 id
17 }
18 }
19}
Sandbox: Configure | Try Operation
Once you then query this value, you can obtain the classifcations set
1# Get the genre for the itinerary
2
3query GetItineraryClassifications {
4 itinerary(id: "itinerary/ABC123") {
5 type: attrValue(id: "itinerary/type")
6 genres: attrValue(id: "itinerary/genres")
7 }
8}
Sandbox: Configure | Try Operation
If successful, the response will be similar to the following
1{
2 "data": {
3 "itinerary": {
4 "type": "trip",
5 "genres": ["alpaca:genre:FOOD|CULINARY"]
6 }
7 }
8}
Similarly to itineraries, itinerary locations offer some additional standard classifications.
Attribute ID | Description |
---|---|
itinerary/location/classifications | Any broad associated classifications for this location (string[]) |
itinerary/location/activities | Any activities at this location (string[]) |
itinerary/location/facilities | Any facilities at this location (string[]) |
Copyright © 2024 - Made with love ❤️ in Australia.