Working with Deep Links

Introduction

Some resources in Avinode and Schedaero APIs may include URIs to a corresponding page in the Avinode/Schedaero application, often known as a “deep link”. If a deep link is available, it will be returned in the resource’s links collection.

If a user clicks the deep link on a web page, the following will happen:

  • If not already authenticated, the user will be prompted to authenticate with Avinode/Schedaero
  • If the user has permissions to view the page, they will be redirected to the application page to view/edit the resource.

Deep Link Example in Avinode

Compare in Avinode Deep Link

In this specific example the GET request on an existing RFQ, will contain the deep link searchInAvinode within the API response body. Calling the URI of this action will run a search with the parameters (itinerary, date, pax, category) of the original RFQ and open up the Avinode web UI displaying the search results.

GET https://sandbox.avinode.com/api/rfqs/arfq-68998748
{
    "meta": {
        "errors": [],
        "warnings": [],
        "infos": []
    },
    "data": {
        "id": "arfq-68998748",
        "href": "https://sandbox.avinode.com/api/rfqs/arfq-68998748",
        "type": "rfqs",
        "links": {
            "tripmsgs": [
                {
                    "id": "abuyermsg-69421520",
                    "href": "https://sandbox.avinode.com/api/tripmsgs/abuyermsg-69421520",
                    "type": "tripmsgs"
                }
            ]
        },
        "actions": {
            "searchInAvinode": {
                "type": "searchInAvinode",
                "description": "Compare in Avinode",
                "httpMethod": "GET",
                "href": "https://sandbox.avinode.com/marketplace/mvc/search/load/arfq-68998748?source=api&origin=api_action"
            },
            "viewInSchedAero": {
                "type": "viewInSchedAero",
                "description": "View in SchedAero",
                "httpMethod": "GET",
                "href": "https://sandbox-schedaero.avinode.com/mvc/trip/fromimportedavinoderfq/arfq-68998748?source=api"
            },
            "book": {
                "type": "book",
                "description": "Book the trip",
                "httpMethod": "POST",
                "href": "https://sandbox.avinode.com/api/tripmsgs/arfq-68998748/book"
            },
            "submitQuote": {
                "type": "submitQuote",
                "description": "Submit a quote",
                "httpMethod": "POST",
                "href": "https://sandbox.avinode.com/api/tripmsgs/arfq-68998748/submitQuote"
            },
            "decline": {
                "type": "decline",
                "description": "Decline",
                "httpMethod": "POST",
                "href": "https://sandbox.avinode.com/api/tripmsgs/arfq-68998748/decline"
            },
            "viewInAvinode": {
                "type": "viewInAvinode",
                "description": "View in Avinode",
                "httpMethod": "GET",
                "href": "https://sandbox.avinode.com/marketplace/mvc/trips/selling/rfq?source=api&rfq=arfq-68998748"
            }
        }
    }
}

Deep Link Example in Schedaero

Trip Deep Link

Trip resources contain the deep link “schedaero-interactive-edit” in their links collection. The user will be taken to the correct interactive page for the current state of the trip – either Edit Quote for a quoted trip or Overview for a scheduled trip.

GET https://sandbox-schedaero.avinode.com/api/trips/schedaero-trip-123456789
{
    "data": {
        "id": "schedaero-trip-123456789",
        "href": "https://sandbox-schedaero.avinode.com/api/trips/schedaero-trip-123456789",
        "type": "schedaero-trip",
        "links": {
            "schedaero-interactive-edit": {
                "href": "https://sandbox-schedaero.avinode.com/mvc/trip/fromApi/schedaero-trip-123456789"
            }
        }
    },
    "meta": {}
}