Decoding/Validating the Quote
Authenticating This RequestTo properly make this API call, the request needs to be authorized by generating a JWT Token sourced from the Authentication API Call using the relevant Client's Public and Secret Key.
The Quote Token Decode endpoint is used when you need to decode the token from the widget on your backend. This is an option and depends on your platform's use case.
| Field | Description |
|---|---|
token | The quote token that was returned by the widget with the customer's quote. |
Example Request:
curl -X GET \
https://api.sandbox.helloteak.com/api/v2/quote/decode?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c \
-H 'Authorization: JWT xxx.yyy.zzz'Example Response:
{
"reference_number": "top-level-reference-12345",
"currency": "USD",
"items": [
{
"cost": "250.00",
"premium": "21.25",
"reference_number": "item-level-reference-12345",
"event": {
"name": "Event Name",
"start_date": "2024-09-14",
"start_time": "12:30:00"
}
},
{
"cost": "100.00",
"premium": "8.50",
"reference_number": "item-level-reference-67890",
"event": {
"name": "Event Name",
"start_date": "2024-09-14",
"start_time": "12:30:00"
}
}
],
"subtotal": "29.75"
}Updated 7 months ago
