The API uses the JSON:API format and requires a token from the company for authentication. All requests are made using the POST method.
URL
POST https://api.riskline.com/ext/v1/trip-ready
Headers
When making a request, you need to specify the following headers:
- Authorization: For authentication, include the token in the Authorization header as a Bearer token.
- Content-Type: Specify the content type as application/vnd.api+json.
Body
The request body must be in JSON format. Below is the structure you need to follow when making a request with some example values.
{
"data": {
"attributes": {
"destination": "fr",
"origin": "us",
"language": "en",
"dates": {
"from": "2024-07-25",
"to": "2024-07-30"
}
},
"type": "trip-ready"
}
}
- destination: The ISO 3166 code representing the destination country or territory.
- origin: The ISO 3166 code representing the origin country or territory.
- from date: The date from which the information is requested. This must be set to the present or a future date.
- to date: The date until which the information is requested. This must be set to a future date.
- language: Language details will be provided by the company based on the access level.
Example
curl --location 'https://api.riskline.com/ext/v1/trip-ready' \
--header 'Content-Type: application/vnd.api+json' \
--header 'Authorization: Bearer 4gh7tyu2tq8n63axr1l9bv0okc2sew' \
--data '{
"data": {
"attributes": {
"destination": "fr",
"origin": "us",
"language": "en",
"dates": {
"from": "2024-07-25",
"to": "2024-07-30"
}
},
"type": "trip-ready"
}
}'