Fetch Applications

Troop Marketplace: Fetch Applications

Overview

There are currently two types of applications that fall in the category of Fetch Applications, below we will explain the expected payload and response structures.
Subtype
Description
Display Area
Place Events
These apps are used to retrieve events from a given URL that will display data on a city(destination) level given the meeting dates.
Displayed in the "About" section of a destination.
Local Transport Rentals
These apps are used to retrieve transport options from a given URL that will display transfer options between the selected hotel and the airport. You would need to select a specific hotel before these options are made available.
Displayed in the "Transfers" tab of an analyzed destination, once the accommodation is selected.


Fetch Application: Place Events
Payload Structure:
{
"The date from payload property"
dateFrom: String!
"The date to payload property"
dateTo: String!
"The radius from payload property"
radius: Int!
"The country name from payload property"
countryName: String!
"The city name from payload property"
cityName: String!
}
Payload Sample:
{
"dateFrom": "2023-08-17",
"dateTo": "2023-09-13",
"radius": 1000,
"countryName": "Spain",
"cityName": "Madrid"
}
Expected Response Structure:
{
api: string;
version: string;
result: {
statusCode: number;
data: {
all: {
control: {
page: number;
perpage: number;
totalpages: number;
totalrecords: number;
w: number;
title: string;
nearbycount: number;
datefrom: string;
dateto: string;
};
data: [EventDataResponse];
execution_time: number;
};
};
};
}
With EventDataResponse having the following structure:
{
away_team_caption: String
away_team_id: String
caption: String
city: String
cityid: String
country: String
countryid: String
date: String
dateTime_boundries: String
date_of_event: String
distance: Float
final_date: String
final_time: String
home_team_caption: String
home_team_id: String
hyperlink: String
id: String
is_group: String
sport: String
sportid: String
ticketdata: TicketData
time_of_event: String
tournament: String
tournament_vname: String
tournamentid: String
venue: String
venue_address: String
venue_img: String
venue_lat: String
venue_lon: String
venueid: String
vname: String
}
TicketData has the following structure:
{
USD: String
ItemID: String
Price: Float
PriceComments: String
Section: String
ServiceFee: Float
}


App Subtype: Local Transport Rentals
Payload Structure:
payload = {
origin: transfersPayloadOrigin!
destination: transfersPayloadDestination!
pickupDateTime: String!
adultPassengers: Int!
}
transfersPayloadOrigin = {
iataCode: String
}
transfersPayloadDestination = {
address: transfersPayloadAddress
}
transfersPayloadAddress = {
addressSearchPhrase: String
countryCode: String
}
transfersPayloadDestinationAddress= {
addressSearchPhrase: String
countryCode: String
}
Payload Sample:
{
"origin": {
"iataCode": "MAD"
},
"destination": {
"address": {
"addressSearchPhrase": "Paseo de la Castellana, 191, Tetuan, Madrid",
"countryCode": "ES"
}
},
"pickupDateTime": "2023-08-15T12:40:00",
"adultPassengers": 1
}
Expected Response Structure:
{
api: string;
version: string;
result: {
statusCode: string;
data: TransfersDataResponse;
};
}
With TransfersDataResponse having the following structure:
TransfersDataResponse {
origin: TransfersDataResponseAddress
destination: TransfersDataResponseAddress
quotes: TransfersDataResponseQuoteCategory
}
TransfersDataResponseAddress {
bookerEnteredAddress: String
resolvedAddress: String
fullResolvedAddress: FullResolvedAddress
latitude: Float
longitude: Float
hub: Boolean
iataCode: String
}
FullResolvedAddress {
streetName: String
streetNumber: String
city: String
postalCode: String
region: String
countryCode: String
establishment: String
}
TravelAddon {
id: String
type: String
price: Float
commission: Float
maxAllowed: Int
}
TransfersDataQuote {
id: String
vehicleCategory: String
vehicleImageUrl: String
passengerCapacity: Int
luggageCapacity: Int
price: Float
commission: Float
currencyCode: String
combinedBabyAndBoosterSeatsCapacity: Int
expires: String
availableTravelAddons: [TravelAddon]
includedWaitingTimeInMinutes: Int
freeCancellationUntil: String
pricePerPassenger: Boolean
}
TransfersDataResponseQuoteCategory {
outbound: [TransfersDataQuote]
inbound: [TransfersDataQuote]
}
Last modified 30d ago