Consider a trip from Germany to the Dominican Republic with a USA passport. If you search for the requirements of this trip in sherpa's website, you can notice a procedure that reads "Mandatory travel declaration form before arrival" with two call-to-action options, one linking to the government website & one powered by Sherpa. We call these "actions"
In this tutorial, we will learn how to display these actions in our application.
For this tutorial, you can make a POST request to the v3/trips endpoint
with the following body:
You will receive a large response back from the API. The summary of it will be as follows:
Similar to visual representation, under the "Passport and Documents" Information grouping (type == "DOCUMENTS_AND_FORMS")
, there is a procedure with ID d5e5cafa-3b9f-475b-9b37-5233e857e4f9
. This is the procedure that we are interested in.
Under the included option, there is a procedure object with the same ID:
This procedure has two associated actions. The first one is a link to the official government website that can be used to fulfil this requirement. The alternative is the second action. Because for this action provider == sherpa
, The integration can be done in two different formats.
This method is similar to the actions provided by government. All that needs to be happen is opening the url passed, in this case "https://sherpa-widget.joinsherpa.io/applications/products/DOM_ETICKET?affiliateId=sherpa"
for the user.