This API call is used to cancel an insurance order that you previously sent.
This API call is made through the DELETE protocol with the sending of a single argument. Authentication is required and works with the rules of HTTP basic access authentication.
This API call requires sending a single argument sended in url:
Entry | Data type | Description |
---|---|---|
parcel_id | String | Required Your registered parcel insurance identifier. |
The response data contains these informations :
Entry | Data type | Description |
---|---|---|
type | String | Object type called by the API request. |
id | String | Registered parcel insurance identifier. |
first_name | String | Customer first name. |
last_name | String | Customer last name. |
String | Customer email address. | |
company | String | Customer company name. |
full_address | String | Customer full address. |
parcel_value | Integer | Total value of the order in currency cents. |
price | Integer | Amount of insurance fees in currency cents. |
currency | String | Currency code used for the insurance. |
parcel_value_eur | Integer | Converted total value of the order in euro cents. |
price_eur | Integer | Converted amount of insurance fees in euro cents. |
cart_data | Json | Cart details that you have insured. |
invoice_id | String | Returns the related invoice number of the parcel. If isn't exist return null. |
mode | String | Returns if registered parcel is in test mode or in production mode. |
creation | Datetime | Creation date of the insurance order. |
curl https://developer.secursus.com/api/parcels/:id/delete \
-u your_apiKey:your_secretKey
{
"response": {
"success": true,
"status": "200",
"title": "OK",
"detail": "Your insurance order has been canceled successfully."
},
"data": {
"type": "parcel",
"id": "201905-XXXXXXXX",
"attributes": {
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@domain.com",
"company": "John Doe Inc.",
"full_address": "10 test road, SW1A 1AA London, UK",
"parcel_value": 8000,
"price": 500,
"currency": "gbp",
"parcel_value_eur": 9391,
"price_eur": 587,
"cart_data": {json_object},
"invoice_id": null,
"mode": "production",
"creation": "2019-05-25 17:51:51"
}
}
}