Redpoint Pricing Engine REST API

Redpoint exposes its Pricing Engine via a series of Web Services. This page is the official reference for that functionality. The Redpoint Pricing Engine supports a RESTful interface, which means you can send an HTTP GET or POST to call exposed methods using JSON for input as described below.

The default values specified in this document are the generic defaults, but can be updated based on the agent_id parameter of the agent_login endpoint, allowing the API to be customized for specific partners.

New and Improved API Documentation can be found here.

Endpoints

Agent Login

ENDPOINT

https://api.redpointtravelprotection.com/api/agent/agent_login

EXAMPLE INPUT

{
    “agent_id":"example_account_id",
    "agent_username":"example@example_account.com",
    "agent_password":"example_password"
}

RETURN VALUE

{
    "result":true,
    "message":"Login successful",
    "api_token":"thisisatoken"
}

The api_token is required for subsequent REST calls.

PARAMETERS

agent_id
The id associated with the agency. Assigned by Redpoint.

agent_username
The username associated with a specific agent. Usually an email address. Assigned by Redpoint.

agent_password
The password associated with the agent. Assigned by Redpoint.

Get Price

ENDPOINT

https://api.redpointtravelprotection.com/api/agent/get_price

The get_price endpoint is designed to provide a simple way to generate a price for travel insurance coverage with many of the values required to generate an actual quote in the Redpoint system defaulted for simplicity’s sake. IMPORTANT: This is an estimated price only. The actual price is dependent on a number of factors such as length of trip, resident country, resident state and destination country. All of these parameters can be passed to the get_price endpoint to further refine the estimated price, but the minimum requirements are the traveler_dob and the traveler_trip_cost. The process of generating the quote (using the generate_quote endpoint) requires all the relevant information and will recalculate the price, optionally informing the caller of changes in pricing to enable a confirmation loop for the customer.

There are two sets of overlapping parameters for this endpoint, traveler_age/traveler_dob and trip_num_days/trip_start[end]_date. The traveler_age and trip_num_days parameters can be used for generating pricing, but when generating quotes, the traveler_dob and trip_start[end]_date parameters are required. When present, the traveler_age parameter will have precedence over traveler_dob and trip_num_days will have precedence over trip_start[end]_date.

EXAMPLE INPUT

{
    traveler_dob: [ '5/5/1987', 2/3/2002' ],
    traveler_trip_cost: [ '3456', '3423' ],
    trip_num_days: 5,
    api_token: 'thisisatoken'
}

OR

{
    traveler_age: [ '45', '18' ],
    traveler_trip_cost: [ '3456', '3423' ],
    trip_num_days: 5,
    api_token: 'thisisatoken'
}

RETURN VALUE

{
    result: true,
    message: 'Price generated successfully.',
    price: 471,
    price_breakdown: {
        traveler_1: { evac_cost: 25, ti_cost: 142, ah_cost: 0, total: 167 },
        traveler_2: { evac_cost: 25, ti_cost: 279, ah_cost: 0, total: 304 }
    }
}

In the event of an error (e.g. validation) the result member will be set to false and message will contain a message describing the issue (e.g. The Date of Birth for Traveler 1 must be set). On success, the result member will be set to true and the price member will contain the total price. There is an additional member, price_breakdown, which will breakdown the charges for each traveler for travel assistance, travel insurance and accident and health costs.

PARAMETERS

api_token
The api token returned by the agent_login endpoint.

traveler_trip_cost
Array containing the trip cost for each traveler.

traveler_age
Array containing the age of each traveler. This parameter has precedence over the traveler_dob parameter.

traveler_dob
Array containing Date of Birth for each traveler Accepted format: mm/dd/yyyy, e.g. 12/19/1969. This parameter will not be used if the traveler_age parameter is present.

trip_num_days
The number of days for the trip. This parameter has precedence over the trip_start[end]_date parameters.

trip_start_date
The Departing Date for the trip. Values in mm/dd/yyyy format. Example: 12/19/2017. This parameter will not be used if the trip_num_days parameter is present.

trip_end_date
The Returning Date for the trip. Values in mm/dd/yyyy format. Example: 12/19/2017. This parameter will not be used if the trip_num_days parameter is present.

program
The desired program for the quote. Accepted values:

  • ripcord (default)
  • cavalry
  • harbor

initial_deposit_date
The Initial Trip Deposit date. Values in mm/dd/yyyy format. Example: 12/19/2017.
Default value: the current date.

include_cfar
Indicates whether the Cancel For Any Reason coverage to be included in the policy quote price. Accepted values are:

  • true
  • false (default)

Default value: false.

travel_insurance_type
The type of travel insurance. Accepted values are:

  • 1 for Evacuation Only, No Travel Insurance
  • 2 for Comprehensive Travel Insurance (default)
  • 3 for Evacuation + medical expense coverage

evac_type
The evacuation type. This parameter is ignored when the program=Harbor. Accepted values are:

  • 1 for Medical Evacuation (default)
  • 2 for Medical and Security Evacuation
  • 3 for Travel Insurance Only

Default value: 2.

destination_countries
Destination countries. Array containing the travelers destinations. Accepted format is the 2 letter ISO code (e.g. US). The values can be found here: https://en.wikipedia.org/wiki/ISO_3166-2

Default value: US.

resident_state
Resident state for the Primary Traveler (US only). Accepted values are the 2 letter state code (e.g. CA).

resident_country
Resident country for the Primary Traveler. Accepted format is the 2 letter ISO code (e.g. US). The values can be found here: https://en.wikipedia.org/wiki/ISO_3166-2

Default value: US.

Generate Quote

ENDPOINT

https://api.redpointtravelprotection.com/api/quote/generate_quote

The generate_quote endpoint will generate the quote in the Redpoint system and as such, requires all the underlying details for the trip to be insured. IMPORTANT: The actual price of the quote may differ slightly from the price generated by the get_price endpoint depending on the specificity of the parameters passed to get_price. The quoted_price parameter can be used to create a confirmation loop for the customer. If the price generated by generate_quote differs from that passed in the quoted_price parameter, the call will return with an error_code of PRICE_CHANGED. Submitting with a blank quoted_price field will generate the quote. Use the send_email parameter to specify whether the system should email the traveler directly with the quote details. Note that the purchase_quote endpoint will generate a new set of documents for the user (without the “Quote Only” language) and potentially also send an email, so if you plan on immediately calling purchase_quote for this policy, it is recommended that you set send_email to “false”.

EXAMPLE INPUT

{
  resident_country: 'US',
  resident_state: 'CA',
  destination_countries: [‘UK’],
  travel_insurance_type: '2',
  evac_type: '2',
  allow_cfar: 'false',
  traveler_first_name: [ 'Jason', 'Billy' ],
  traveler_last_name: [ 'APITest', 'Boggs' ],
  traveler_dob: [ '12/12/1987', '2/2/1946' ],
  traveler_trip_cost: [ '3456', '3423' ],
  trip_start_date: '9/29/2021',
  trip_end_date: '10/9/2021',
  initial_deposit_date: '5/5/2021',
  program: 'harbor',
  quoted_price: '',
  street_address: '123 C Street',
  city: 'Santa Cruz',
  state: 'CA',
  zip: '95060',
  cell_phone: '4084274127',
  home_phone: '',
  email: 'test@test.com',
  send_email: 'true',
  api_token: 'thisisatoken'
}

RETURN VALUE

{
  result: true,
  message: 'Quote created successfully',
  redpoint_policy_number: 'UOI202150396',
  price: 720,
  currency_type: 'USD',
  price_breakdown: {
    traveler_1: { evac_cost: 125, ti_cost: 142, ah_cost: 15, total: 282 },
    traveler_2: { evac_cost: 125, ti_cost: 279, ah_cost: 34, total: 438 }
  }
}

The order_doc_links member will contain an array with links to the documents generated for the customer with the details of the quote. The policy_doc_links member will contain an array with links to the policy documents associated with the quote. The visa_letter_links will contain links to any visa letters generated for the travelers (based on destination countries). These documents will vary based on a number of factors, such as the resident state of the customer (for US based customers).

RETURN VALUE (ERROR)

{
  result: false,
  message: 'The previous quoted price, $333, does not match the current price quote, $720. Resubmit with a blank quoted_price field to generate a quote with the new price.',
  error_code: 'PRICE_CHANGED'
}

PARAMETERS

quoted_price
When set, the value will be compared to the newly generated price and if it has changed, the endpoint will return an error, allowing the caller to implement a confirmation loop with the customer to confirm the change in price. Leave blank to bypass.

send_email
When set, specifies whether the system should email the various documents related to the policy directly to the traveler, using the value of the email parameter. Default value is true.

destination_countries
Destination countries. Array containing the travelers destinations. Accepted format is the 2 letter ISO code (e.g. US). The values can be found here: https://en.wikipedia.org/wiki/ISO_3166-2

resident_state
Resident state for the Primary Traveler (US only). Accepted values are the 2 letter state code (e.g. CA).

resident_country
Resident country for the Primary Traveler. Accepted format is the 2 letter ISO code (e.g. US). The values can be found here: https://en.wikipedia.org/wiki/ISO_3166-2

api_token
The api token returned by the agent_login endpoint.

traveler_trip_cost
Array containing the trip cost for each traveler.

traveler_dob
Array containing Date of Birth for each traveler Accepted format: mm/dd/yyyy, e.g. 12/19/1969.

trip_start_date
The Departing Date for the trip. Values in mm/dd/yyyy format. Example: 12/19/2017

trip_end_date
The Returning Date for the trip. Values in mm/dd/yyyy format. Example: 12/19/2017

program
The desired program for the quote. Accepted values:

  • ripcord (default)
  • cavalry
  • harbor

The default value is ripcord.

inital_deposit_date
The Initial Trip Deposit date. Values in mm/dd/yyyy format. Example: 12/19/2017.
Default value: the current date.

include_cfar
Indicates whether the Cancel For Any Reason coverage to be included in the policy quote price. Accepted values are:

  • true
  • false (default)

Default value: false.

travel_insurance_type
The type of travel insurance. Accepted values are:

  • 1 for Evacuation Only, No Travel Insurance
  • 2 for Comprehensive Travel Insurance (default)
  • 3 for Evacuation + medical expense coverage

Default value 2.

evac_type
The evacuation type. This parameter is ignored when the program=Harbor. Accepted values are:

  • 1 for Medical Evacuation (default)
  • 2 for Medical and Security Evacuation
  • 3 for Travel Insurance Only

Default value: 2.

street_address
Street address of the primary traveler.

city
City of the primary traveler.

state
State of the primary traveler.

zip
Zip code of the primary traveler.

cell_phone
Cell phone number of the primary traveler.

home_phone
Home phone number of primary traveler.

email
Email address of the primary traveler.

booking_number
Optional parameter. Booking number associated with the policy. This parameter is not used by Redpoint directly, but is stored with the policy for the convenience of partners.

Purchase Quote

ENDPOINT

https://api.redpointtravelprotection.com/api/quote/purchase_quote

This endpoint will purchase the given policy number and regenerate all the associated order documents. The send_email parameter can be used to specify whether the system should email the traveler directly using the email associated with the policy.

EXAMPLE INPUT

{
  redpoint_policy_number: 'UOI202150378',
  api_token: 'thisisatoken'
}

RETURN VALUE

{
  result: true,
  message: 'Purchase successful.’,
  redpoint_policy_number: ‘UOI202150378’,
}

PARAMETERS

redpoint_policy_number
The policy number returned by the generate_quote endpoint.

send_email
When set, specifies whether the system should email the various documents related to the policy directly to the traveler, using the value of the email parameter. Default value is true.

Get Policy

ENDPOINT

https://api.redpointtravelprotection.com/api/policy/get_policy

Returns the policy information.

EXAMPLE INPUT

{
  redpoint_policy_number: 'UOI202150378',
  api_token: 'thisisatoken'
}

RETURN VALUE


PARAMETERS

redpoint_policy_number
The policy number returned by the generate_quote endpoint.

Get Policies

ENDPOINT

https://api.redpointtravelprotection.com/api/policy/get_policies

Returns a list policies created for the given timeframe. Optionally includes both quotes and purchases. The optional parameter booking_number can also be used to refine policy searches.

EXAMPLE INPUT

{
  timeframe: ‘LAST_WEEK',
  api_token: ‘thisisatoken’,
  policy_type: ‘purchase_only’,
}

RETURN VALUE

{
  result: true,
  message: 'Policies retrieved successfully.',
  num_policies: 2,
  policy_type: 'purchase_only',
  policies: ‘[
                  {
                   "policy_number":"UOI202150676",
                   “booking_number”:"12345678", 
                   "policy_holder_last_name":"Douglas",
                   "policy_holder_first_name":"Jason",
                   "purchase_date":"2021-07-06",
                   "policy_start_date":"2021-07-29",
                   "policy_end_date":"2021-07-31",
                   “policy_type”:”Purchase”,
	       “price_paid”:”$1,110”	
                  },
                  {
                   "policy_number":"UOI202150678",
                   "booking_number":12345678, 
                   "policy_holder_last_name":"Bonds",
                   "policy_holder_first_name":"Barry",
                   "purchase_date":"2021-07-06",
                   "policy_start_date":"2021-07-29",
                   "policy_end_date":"2021-07-31",
                   "policy_type":"Purchase"
                   “price_paid”:”$1,110”,
	      }
                ]'
}

PARAMETERS

timeframe
Time frame of interest. Possible values:

  • YESTERDAY
  • LAST_WEEK
  • LAST_MONTH (default value)

policy_type
The type of policy returned in the list.

  • quote_only
  • purchase_only (default)
  • all

booking_number
Optional parameter that can be used to refine the policy search. Note that the booking_number parameter is an optional parameter of the generate_quote endpoint and is provided as a convenience for partners. It is not generated or used internally by Redpoint for policy purposes.

Update Policy

ENDPOINT

https://api.redpointtravelprotection.com/api/policy/update_policy

Updates the trip costs and/or the trip dates for the given policy. Will regenerate the order documents and return links to them. The send_email parameter can be used to specify whether the system should email the traveler directly with the documents using the email associated with the policy. The trip cost changes can be either positive, negative or zero and will apply to the travelers associated with the policy in the order specified when the policy was created. Any values not specified will be assumed to be zero. For example, for a policy with 4 travelers, a trip_cost_updates with less than 4 values will result in the trip costs being updated from the top down with the remaining trip costs being unchanged. Note that all policy updates are subject to validation. As an alternative, the parameter traveler_trip_cost can be used to pass in the full trips costs for each traveler. When this parameter is used, the trips costs for all travelers must be specified.

In the event that both the trip_cost_updates and traveler_trip_cost parameters are passed, the trip_cost_updates parameter will supersede the traveler_trip_cost parameter.

The preview_price flag allows the price for the update to be generated without updating the policy.

EXAMPLE INPUT

{
  redpoint_policy_number: 'UOI202150378',
  trip_cost_updates: [ '500' ],
  api_token: 'thisisatoken'
}

RETURN VALUE

{
  result: true,
  price_change: 345,
  message: ‘Policy UOI202150378 updated successfully.’,
  redpoint_policy_number: ‘UOI202150378’,
}

PARAMETERS

redpoint_policy_number
The policy number returned by the generate_quote endpoint.

trip_cost_updates
Array containing the trip cost updates. Applied to the travelers in the order specified when the policy was a created. Unspecified values are assumed to be zero.

traveler_trip_cost
Array containing the trip cost for each traveler. If present, this array contains the entire trip costs for each traveler, including the changes.

update_deposit_date
Updated deposit date for use when validating policy updates that contain CFAR.

preview_price
When set to “true”, the price for the update is generated without updating the policy itself.

trip_start_date
New departure date for the covered trip in the format mm/dd/yyyy.

trip_end_date
New return date for the covered trip in the format mm/dd/yyyy.

Cancel Policy

ENDPOINT

https://api.redpointtravelprotection.com/api/policy/cancel_policy

Cancels the specified policy in the Redpoint system.

EXAMPLE INPUT

{
  redpoint_policy_number: 'UOI202150378',
  api_token: 'thisisatoken'
}

RETURN VALUE

{ 
   result: true, 
   message: 'Policy UOI202150378 cancelled.’,
   redpoint_policy_number: ‘UOI202150378’,
}

PARAMETERS

redpoint_policy_number
The policy number returned by the generate_quote endpoint.

Get Policy Docs

ENDPOINT

https://api.redpointtravelprotection.com/api/policy/get_policy_docs

Returns links to the documents related to the given policy. Includes the policy and order documents in addition to any visa letters required by the destinations.

EXAMPLE INPUT

{
  redpoint_policy_number: 'UOI202150378',
  api_token: 'thisisatoken'
}

RETURN VALUE

{
  "result":true,
  "message":"Policy Document Links Retrieved.",
  "policy_doc_links": [
		"https://api.redpointtravelprotection.com/pdf/state_national/RipcordTravelProtection_FL.pdf",
		"https://api.redpointtravelprotection.com/pdf/state_national/RipcordMemberServicesAgreementMedEx.pdf"
		],
  "order_doc_links": [
		"https://api.redpointtravelprotection.com/generated_pdfs/	RM1445977_Harbor_Quote.pdf",
		"https://api.redpointtravelprotection.com/generated_pdfs/RM1445977_Purchase.pdf",
		"https://api.redpointtravelprotection.com/generated_pdfs/RM1445977_Quote.pdf"
		],
"visa_letter_links":[]
} 

PARAMETERS

redpoint_policy_number
The policy number returned by the generate_quote endpoint.

More Information

Our partner integration program is available to any travel agent or agency looking to streamline travel insurance purchases for their client. Examples using the various endpoints are available in PHP or Javascript for download. To learn more or get started, please contact us.