I am currently working with Postman and have managed to successfully use the POST function to return the correct data.
I would like to program this same function as a VBA macro but have had real trouble with the examples I have found on the web mainly because the POST involves a body of search and not just parameters.
My API address is : api.wego.com/flights/api/k/2/searches?api_key=2fb2e750a9da3c674bc3&ts_code=9881b
You have all the keys...
The body of my API search is this:
{
"trips": [
{
"departure_code":"LHR",
"arrival_code": "FRA",
"outbound_date": "2014-05-10",
"inbound_date": "2014-05-13"
}
],
"adults_count":1,
"user_country_code":"GB",
"country_site_code":"GB"
}
and the API returns:
{
id: "nteYgzufT8Od8u0_kxJzAA"
key: "[LHR:FRA:2014-05-10:2014-05-13]~1~0~GB~GB"
-trips: [
-{
id: "LHR:FRA:2014-05-10:2014-05-13"
departure_code: "LHR"
departure_name: "London Heathrow Apt"
departure_country_code: "GB"
departure_country_name: "United Kingdom"
arrival_code: "FRA"
arrival_name: "Frankfurt"
arrival_country_code: "DE"
arrival_country_name: "Germany"
outbound_date: "2014-05-10"
inbound_date: "2014-05-13"
trip_type: "standard"
}
]
cabin: "economy"
adults_count: 1
country_site_code: "GB"
user_country_code: "GB"
created_at: "2014-04-08T18:36:46.485+08:00"
}
postman.png
I have attached the screenshot from my Postman
Bookmarks