API Google / QPX Express Flight

One PRO-User needs to connect to the QPX Express API.
The plugin can do this by:

  • using Curl-Post for http: method=curlpost
  • Sending the Content-Type JSON with the header: header=’Content-Type:application/json’
  • Sending JSON in the Post-Header: Mind the ‘ and “, the #BRO# and #BRC#-Placeholders and the POSTGET_-Parameters for a dynamic JSON in the header:
    postpayload='{ “request”: { “passengers”: { “adultCount”: 1, “childCount”: 0 }, “slice”: #BRO# { “origin”: “POSTGET_origin”, “destination”: “POSTGET_destination”, “date”: “POSTGET_date”, “maxStops”: 0 } #BRC#, “solutions”: 1 }}’

Shortcode:

[jsoncontentimporterpro url=https://www.googleapis.com/qpxExpress/v1/trips/search?key=REPLACE_WITH_API_KEY parser=twig id=23 method=curlpost header='Content-Type:application/json' postpayload='{ "request": {  "passengers": {   "adultCount": 1,   "childCount": 0  },  "slice": #BRO#   {    "origin": "POSTGET_origin",    "destination": "POSTGET_destination",    "date": "POSTGET_date",    "maxStops": 0   }  #BRC#,  "solutions": 1 }}']

Template-Manager:

Origin: {{trips.data.airport[0].name}} 
Destination: {{trips.data.airport[1].name}}  
Aircraft: {{trips.data.aircraft[0].name}}
Carrier: {{trips.data.carrier[0].name}}
Taxes: {% for t in trips.data.tax %}
{{t.name}}, 
{% endfor %}

In action:

Date:
Origin:
Destination: