...

Cargo Insure Online

API Catalogue

API Documentation

API Introduction

The Cargo Insurance API provides seamless integration for obtaining cargo insurance coverage online. With this API, users can efficiently manage and insure their shipments, ensuring peace of mind and financial protection against potential losses during transit. The API is accessed via a POST request to two base URLs, one for staging and another one for production which are given below,  and requires authentication through the headers api_key  and  api_sec , these will be provided by the admin to you. This streamlined approach allows for quick and secure insurance processing, tailored to the needs of modern logistics operations.

Base Url: https://cargoinsureonline.com/wp-json/api/v2

API Headers:
api_key: API_KEY 
api_sec: API_SEC

Get All Insurance Options

The Get All Insurance options API provides you with all options like countries, group-types, risk-types, transport-types and currencies which you need to select while buying a new insurance.

Endpoint: /get-cargo-insurance-options

API Method: GET

curl –location –request GET ‘https://cargoinsureonline.com/wp-json/api/v2/get-cargo-insurance-options’ \
–header ‘api_key: API_KEY ‘ \
–header ‘api_sec: API_SEC’

Get All Countries

The Get All countries options API provides you with list of countries, essential for international logistics and insurance processes. 

Endpoint: /get-cargo-insurance-options?type=countries

API Method: GET

 

curl –location –request GET ‘https://cargoinsureonline.com/wp-json/api/v2/get-cargo-insurance-options?type=countries’ \
–header ‘api_key: API_KEY ‘ \
–header ‘api_sec: API_SEC’

Get All Companies

The Get All companies API provides you with the list of all companies with their names and id. You can match these with rates fetched to select which one you want to buy.

Endpoint: /get-cargo-insurance-options?type=companies

API Method: GET

curl –location –request GET ‘https://cargoinsureonline.com/wp-json/api/v2/get-cargo-insurance-options?type=companies’ \
–header ‘api_key: API_KEY ‘ \
–header ‘api_sec: API_SEC’

Get All Group Types

The Get All Group Types API provides you with the list of all group types under which your cargo falls like E-commerce, Artworks, general cargo, etc.

Endpoint: /get-cargo-insurance-options?type=group_types

API Method: GET

curl –location –request GET ‘https://cargoinsureonline.com/wp-json/api/v2/get-cargo-insurance-options?type=group_types’ \

–header ‘api_key: API_KEY ‘ \
–header ‘api_sec: API_SEC’

Get All Risk Types

The Get All Risk Types API gives you a list of all risks which your cargo can be under according to you.

Endpoint: /get-cargo-insurance-options?type=risk_types

API Method: GET

curl –location –request GET ‘https://cargoinsureonline.com/wp-json/api/v2/get-cargo-insurance-options?type=risk_types’ \

–header ‘api_key: API_KEY ‘ \
–header ‘api_sec: API_SEC’

Get All Transport Types

The Get All Transport Types API gives you the list of all methods of transport you cargo can go through like AIR, SEA, ROAD, COURIER, etc.

Endpoint: /get-cargo-insurance-options?type=transport_types

API Method: GET

curl –location –request GET ‘https://cargoinsureonline.com/wp-json/api/v2/get-cargo-insurance-options?type=transport_types’ \

–header ‘api_key: API_KEY ‘ \
–header ‘api_sec: API_SEC’

Get All Currencies

The Get All Currencies API provides users with a detailed list of global currencies, essential for international trade and financial transactions.

Endpoint: /get-cargo-insurance-options?type=currencies

API Method: GET

curl –location –request GET ‘https://cargoinsureonline.com/wp-json/api/v2/get-cargo-insurance-options?type=currencies’ \

–header ‘api_key: API_KEY ‘ \
–header ‘api_sec: API_SEC’

Get All Carriers

The Get All Carriers API provides a list of all carriers used by most of the customers like Chronopost, DHL, FedEx, UPS, etc.

Endpoint: /get-cargo-insurance-options?type=carriers

API Method: GET

curl –location –request GET ‘https://cargoinsureonline.com/wp-json/api/v2/get-cargo-insurance-options?type=currencies’ \

–header ‘api_key: API_KEY ‘ \
–header ‘api_sec: API_SEC’

Buy Cargo Insurance (OLD AND NOT FOR USE)

The Buy Insurance API enables users to purchase cargo insurance for their shipments efficiently. By accessing the endpoint /buy-cargo-insurance, users can send a POST request with detailed shipment and client information to secure the necessary insurance coverage. This API streamlines the process of obtaining cargo insurance, ensuring timely and accurate protection for shipments.

When your transport type is “SEA”, please provide vessel name in shipment details.

Endpoint: /buy-cargo-insurance

API Method: POST
curl –location ‘https://cargoinsureonline.com/wp-json/api/v2/buy-cargo-insurance’ \
–header ‘api_key: API_KEY ‘ \
–header ‘api_sec: API_SEC’ \
–header ‘Content-Type: application/json’ \
–data-raw ‘{
“from_country”:”93″,
“to_country”:”12″, 
“group_type”:”3″, 
“product_description” : “A golden watch”,
“risk_type”:”All Risks”, 
“transport_type”:”AIR”, 
“currency”: “USD”, 
“product_price”:”1500″, 
“transport_price”:”50″, 
“valuation_surcharge”:”155″, 
“carrier_type”:”DPD”, 
“insured_client”: “John doe”, 
“shipment_details”: “34535345”, 
“etd”: “2024-12-12”, 
“cargo_description”: “Hello test”,
“payment_method”: “credit” // or “wallet”,

“insured_client_country”: “12”,

freight_forwarder”:”Xpert Group Sarl”, //Optional
“insured_client_city”:”cityname”, // Optional
“insured_client_email” : “test@mail.com”, // Optional
“insured_client_phone” : “+911234567890”, // Optional
“insured_client_address”: “ABC street”,  // Optional,
“insured_client_state”:”state name”,  //Optional
insured_client_zip_code”:”12345″,  // Optional
“insured_client_tax_id”: “94577403194”,  // Optional
“incoterms”: “DDP”  // Optional

}’

Buy Cargo Insurance Step 1 : Generate Policy number

In this step you need to provide all your information for insurance and it will generate the policy number for the cargo insurance and return you the policy number and insurance price. This API streamlines the process of obtaining cargo insurance, ensuring timely and accurate protection for shipments.

If your transport_type is “SEA”, please provide vessel name in shipment details.

If the company you have selected from rates requires any kind of document, you have to send the URL of that document with the request body here else leave that empty.

Endpoint: /generate-cargo-insurance-policy

API Method: POST
curl –location ‘https://cargoinsureonline.com/wp-json/api/v2/generate-cargo-insurance-policy’ \
–header ‘api_key: API_KEY ‘ \
–header ‘api_sec: API_SEC’ \
–header ‘Content-Type: application/json’ \
–data-raw ‘{
“company_id”: “11”,
“document_url”: “uploaded document link here” OR  “”,
“from_country”:”93″,
“to_country”:”12″, 
“group_type”:”3″, 
“risk_type”:”All Risks”, 
“transport_type”:”AIR”, 
“currency”: “USD”, 
“product_price”:”1500″, 
“transport_price”:”50″, 
“valuation_surcharge”:”155″, 
“carrier_type”:”DPD”, 
“insured_client”: “Asif Akram”, 
“shipment_details”: “34535345”, 
“etd”: “2024-12-12”, 
“cargo_description”: “Hello test”,

“insured_client_country”: “12”,

“freight_forwarder”:”Xpert Group Sarl”, //Optional
“insured_client_city”:”cityname”, // Optional
“insured_client_email” : “test@mail.com”, // Optional

“insured_client_phone” : “+911234567890”, // Optional

“insured_client_address”: “ABC street”,  // Optional,
“insured_client_state”:”state name”,  //Optional
insured_client_zip_code”:”12345″,  // Optional
“insured_client_tax_id”: “94577403194”,  // Optional
“incoterms”: “DDP”  // Optional
}’

Buy Cargo Insurance Step 2 : Complete payment for order

In this step you need to provide the policy_id which you will recieve from the Step 1 API response and along with that your method of payment which can be either “wallet” or “credit”. This will return you with your Order id and insurance certifcate URL.

Endpoint: /complete-cargo-insurance-payment

API Method: POST
curl –location ‘https://cargoinsureonline.com/wp-json/api/v2/complete-cargo-insurance-payment’ \
–header ‘api_key: API_KEY ‘ \
–header ‘api_sec: API_SEC’ \
–header ‘Content-Type: application/json’ \
–data-raw ‘{
“policy_id”:””,
“payment_method”: “credit” // or “wallet”,
}’

Get Cargo Insurance Rate

You can use this API to get the insurance rates without purchasing it. It accepts all the data same as buy-cargo-insurance and this returns all the eligible rates from various companies we offer.

Endpoint: /get-cargo-insurance-rates

API Method: POST
curl –location ‘https://cargoinsureonline.com/wp-json/api/v2/get-cargo-insurance-rates’ \
–header ‘api_key: API_KEY ‘ \
–header ‘api_sec: API_SEC’ \
–header ‘Content-Type: application/json’ \
–data-raw ‘{
“from_country”:”93″,
“to_country”:”12″, 
“group_type”:”3″, 
“product_description” : “A golden watch”,
“risk_type”:”All Risks”, 
“transport_type”:”AIR”, 
“currency”: “USD”, 
“product_price”:”1500″, 
“transport_price”:”50″, 
“valuation_surcharge”:”155″,
}’

Get Claims Information for any User

The Get all claims information API will return all details, claim value, documents, etc. It will be based on the API key and API secret headers used in API call.

Endpoint: /get-claims-by-user-id

API Method: GET

Sample Response:

[{
“id”: “1”,
“user_id”: “101”,
“policy_number”: “A123”,
“company_name”: “Example Insurance Co.”,
“contact_name”: “John Doe”,
“email”: “johndoe@example.com”,
“phone”: “1234567890”,
“claim_value”: “500.00”,
“date_of_loss”: “2024-01-01”,
“description”: “Sample claim description”,
“documents”: “a:2:{i:0;s:94:\”https://example.com/files/sample-image1.png\”;i:1;s:88:\”https://example.com/files/sample-document1.pdf\”;}”,
“status”: “Under Review”,
“remarks”: “Verification in progress”,
“claim_date”: “2024-01-02 10:00:00”
}]

curl –location –request GET ‘https://cargoinsureonline.com/wp-json/api/v2/get-claims-by-user-id’ \
–header ‘api_key: API_KEY ‘ \
–header ‘api_sec: API_SEC’

Scroll to Top
Seraphinite AcceleratorOptimized by Seraphinite Accelerator
Turns on site high speed to be attractive for people and search engines.