Go directly to content

Chapka travel Insurance

Notify Rest API

Endpoints names, URLs & Http methods

Available endpoints are listed below:

Endpoint name Http method Parameters Signature Explanation
create POST or PUT Yes Yes Create a new insurance
delete DELETE or POST Yes Yes Delete an insurance (previously sent)
checkcontrat GET or POST Yes Yes Check if an insurance has been created
healthcheck GET or POST No No Check is API is alive

 

Endpoint name:

The endpoint name is needed to build the URL to make your request.

The URL has the following structure:

        https://api.chapka.fr/notify/?request=<endpoint name>

Http method:

Indicates which method is available for this endpoint.

Parameters:

Indicates if parameters are need for this endpoint (see below "Sending parameters").

When needed parameters are in JSON format and inserted into a parameter named "message".

Signature:

Indicates if a signature is needed (see below "Computing the signature").

The signature is some kind of SHA1 hash, using a private key, that ensures your authentication.

Sending parameters

Some endpoint requires that you provide some parameters.

The Http request will have a "application/x-www-form-urlencoded" content type.

The Http pay load will have a single parameter named "message".

This parameter value will be a JSON text with relevant parameters.

Parameters shall be a JSON structure, inserted into an Http parameter 

Example:

{
"emetteur"     : "AGENCE VN",    
"produit"      : "FOOBARLAND",   
"reference"    : "FB14Q",        
"prime"        : "123.45",       
"email"        : "joe@mail.com",
  ...
}

Computing the signature