Quotes/Requests to Your External System

This use case aims to help businesses selling flights manage a high volume of quote requests from platforms like Avinode. By integrating Schedaero with a sales tool you can identify the most valuable sales leads and avoid missing out on potential sales.

Overview

When selling flights, managing a large volume of quote requests from platforms like Avinode can be challenging, particularly given the varying quality of these requests. The primary objective is to maximize sales opportunities, but this is often easier said than done. The purpose of this use case is to tackle this challenge by building an integration between Schedaero and an external sales tool. By doing so, you can more easily identify the most promising opportunities and focus on the most valuable sales leads, thereby increasing the likelihood of closing deals and avoiding missed sales opportunities.

Pre-requisites

Gaining an understanding of our APIs and fundamentals is essential to the success of your project. To do so, start by reading our introduction page, including the pages linked in the "Before you start developing" section.

Also read about our webhooks. Webhooks will be essential to have the most up-to-date quotes/requests.

The next step is to identify the data to be extracted from Schedaero and make sure that it is accessible via the API. This can be done by comparing your objectives to the data available via the swagger documentation.

📘

Helpful hint

We recommend creating a checklist of the specific data points that you need. This will help you identify the specific points in the system that you would like to extract and, if needed, enable our API team to help match up specific permissions.

Permissions Gathering

As a part of the project, you will collaborate with our API team to tailor your permissions based on your specific data requirements. The information you require will dictate the appropriate level of permissions that need to be granted to your API account. It is worth noting that certain endpoints of our API have the capability to write data to our system. Therefore, providing clear specifications on the intended actions can aid in streamlining the permission-gathering process.

🚧

Please note

Ensuring that the specific data points you require are actually utilized in Schedaero is critical, particularly in projects where a third party is involved in the development process. Understanding the data that the specific Schedaero client is working with and what data will be available will contribute to a smoother development process.

Knowing what you want out of the system is a good first step. Having your technical leads take a look at our swagger documentation will help our team understand what permissions would be needed at the beginning of the project.

Should the need arise, additional permissions are usually granted on request. Permissions can always be updated/adjusted as your needs change during development, as well as after you go live in our production environment.

Once the permissions are defined, next steps would be to grant access to the sandbox environment.

Implementation and API Examples

Gather All Existing Quotes

To begin, it's important to gather all existing quotes in your system. The following steps explain how to accomplish this.

📘

Schedaero Trip and Quote

A "Trip" is a container that can contain many specific quotes, while a Scheduled Trip is a quote that has been converted to an expected flight

The following API request will retrieve the default batch size of trips, each of which may contain multiple quote options:

https://sandbox-schedaero.avinode.com/api/trips/quoted

After making the API request, a list of all trips currently in the system will be returned.

{
    "data": [
        {
            "id": "schedaero-trip-11111111",
            "href": "https://sandbox-schedaero.avinode.com/api/trips/schedaero-trip-11111111",
            "type": "schedaero-trip",
            "links": {
   ... snip .... 
                }
            }
        },
        {
            "id": "schedaero-trip-22222222",
            "href": "https://sandbox-schedaero.avinode.com/api/trips/schedaero-trip-22222222",
            "type": "schedaero-trip",
            "links": {
   ... snip .... /schedaero-trip-22222222/quotes"
                }
            }
        },
        {
            "id": "schedaero-trip-33333333",
            "href": "https://sandbox-schedaero.avinode.com/api/trips/schedaero-trip-33333333",
            "type": "schedaero-trip",
            "links": {
    ... snip .... 
                }
 
    "meta": {
        "copyright": "Copyright © 2001-2023 Avinode AB",

        "pagination": {
            "totalCount": 2010,
            "pageNumber": 0,
            "batchSize": 100
        }
    }
}

A large number of trips can be present in the system, and the response at the end of the call usually displays the count of all the trips present. An example of such a count can be seen at the end of the above call, or here:

"meta": {
        "copyright": "Copyright © 2001-2023 Avinode AB",

        "pagination": {
            "totalCount": 2010,
            "pageNumber": 0,
            "batchSize": 100
        }
    }
}

We know there are 2,010 trips and this particular batch was 100.

To retrieve the next batch of trips and possibly increase the batch size, you need to specify the page number. It's common to make larger calls when initially populating your system but it's recommended to use webhooks once your system is fully populated. Read more about this in the webhooks section.

This example demonstrates how to pull the second batch of 250 trips:

https://sandbox-schedaero.avinode.com/api/trips/quoted?page[number]=2&page[size]=250

Specific Quote Information

After retrieving the data, you can proceed to extract specific information about quotes in the system. For instance, you can obtain the pricing for a particular trip.

Below is an example of how to retrieve the quoted line items on a specific trip:

https://sandbox-schedaero.avinode.com/api/trips/schedaero-trip-12345678/quotes

The above returns specific quotes on a trip. In this example, there are two quotes available: one for $29,561.06 and another for $26,828.00. See the response below:

{
    "data": [
        {
            "name": "JERFORCE1 (Gulfstream G-VI)",
            "price": {
                "currency": "USD",
                "amount": 29561.0600
            },
            "id": "schedaero-quote-11111111",
            "href": "https://sandbox-schedaero.avinode.com/api/quotes/schedaero-quote-11111111",
            "type": "schedaero-quote",
            "links": {
                "trip": {
                    "href": "https://sandbox-schedaero.avinode.com/api/trips/schedaero-trip-12345678"
                },
                "itinerary": {
                    "href": "https://sandbox-schedaero.avinode.com/api/quotes/schedaero-quote-11111111/itinerary"
                },
                "lineItems": {
                    "href": "https://sandbox-schedaero.avinode.com/api/quotes/schedaero-quote-11111111/lineitems"
                },
                "generate-pdf": {
                    "href": "https://sandbox-schedaero.avinode.com/api/streams/quotes/schedaero-quote-11111111"
                }
            }
        },
        {
            "name": "DEMO9 (Gulfstream G550)",
            "price": {
                "currency": "USD",
                "amount": 26828.0000
            },
            "id": "schedaero-quote-22222222",
            "href": "https://sandbox-schedaero.avinode.com/api/quotes/schedaero-quote-22222222",
            "type": "schedaero-quote",
            "links": {
                "trip": {
                    "href": "https://sandbox-schedaero.avinode.com/api/trips/schedaero-trip-12345678"
                },
                "itinerary": {
                    "href": "https://sandbox-schedaero.avinode.com/api/quotes/schedaero-quote-22222222/itinerary"
                },
                "lineItems": {
                    "href": "https://sandbox-schedaero.avinode.com/api/quotes/schedaero-quote-22222222/lineitems"
                },
                "generate-pdf": {
                    "href": "https://sandbox-schedaero.avinode.com/api/streams/quotes/schedaero-quote-22222222"
                }
            }
        }
    ],
    "links": {
        "first": {
            "href": "https://sandbox-schedaero.avinode.com/api/trips/schedaero-trip-12345678/quotes?page%5bnumber%5d=0&page%5bsize%5d=100"
        }
    },
    "meta": {
        "copyright": "Copyright © 2001-2023 Avinode AB",
        "pagination": {
            "totalCount": 2,
            "pageNumber": 0,
            "batchSize": 100
        }
    }
}

After obtaining the Schedaero quote id, such as "schedaero-quote-11111111" in the above example, you can retrieve more detailed information about that specific quote:

{
    "data": [
        {
            "sortOrder": 0,
            "description": "Per trip day fee",
            "cost": {
                "currency": "USD",
                "amount": 2500.0000
            },
            "type": "schedaero-lineitem",

	.... snip .... 

        {
            "sortOrder": 1,
            "description": "Operator Price",
            "cost": {
                "currency": "USD",
                "amount": 25000.0000
            },
            "type": "schedaero-lineitem",

	.... snip .... 

        {
            "sortOrder": 2,
            "description": "Round up",
            "cost": {
                "currency": "USD",
                "amount": -19.2000
            },
            "type": "schedaero-lineitem",

	.... snip .... 

        {
            "sortOrder": 3,
            "description": "US Domestic Segment Fee",
            "cost": {
                "currency": "USD",
                "amount": 19.2000
            },
            "type": "schedaero-lineitem",

	.... snip .... 

        {
            "sortOrder": 4,
            "description": "US Federal Excise Tax",
            "cost": {
                "currency": "USD",
                "amount": 2061.0600
            },

	.... snip .... 

}

You now have the selling price and line items that can be compared to your costs in your external system.

Webhooks

Setting up webhooks is the most efficient way to stay updated on the specific information you're interested in. For instance, a webhook configured for Scheduled Trips will send notifications to your endpoint whenever there is an update to an existing trip or a new trip is created.

Posting to the endpoint below:

https://sandbox.avinode.com/api/webhook/settings

With the following:

{
    "targetURI": "https://myapplication.com/notifications",
    "displayName": "Schedaero Scheduled Trip Changes",
    "active": true,
    "clientIdentifier": "myapplication",
    "clientSecret": "secret",
    "clientAuthenticationType": "BASIC",
    "eventTypes": [
        "SchedAeroQuotes"
    ]
}

This will trigger an alert whenever an existing trip is updated or a new trip is created.

{"id":"schedaero-quote-12345678",
"href":"https://schedaero.avinode.com/api/quotes/schedaero-quote-32090445",
  "type":"schedaero-quote"}

🚧

Please note

The webhook only provides notification of changes made but not the actual changes. Therefore, it's necessary to use the IDs sent in the webhook to retrieve the updated information.

More information can be found on the Schedaero Webhooks page.

Go Live!

Before going live with your project, it's essential to ensure that certain key points have been checked off. This will help to minimize the risk of errors or other issues that could impact the performance of your system.

👍

Implementation Checklist

Here's a checklist of important points to consider before going live:

  • All necessary webhook notifications are correctly set up and utilized in order to avoid an overabundance of requests to the endpoints.
  • Token(s) are kept secure. They grant access to sensitive information, and should only be utilized by the team/project originally granted permission.