# Purchase Insurance

## /insurance/purchase

<mark style="color:green;">`POST`</mark> `https://api.terminal.africa/v1/insurance/purchase`

This endpoint allows you to purchase insurance coverage for a shipment.

#### Headers

| Name                                            | Type   | Description                      |
| ----------------------------------------------- | ------ | -------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Set value to `Bearer SECRET_KEY` |
| Content-Type                                    | String | Set value to `application/json`  |

#### Request Body

| Name                                       | Type   | Description                                                                                  |
| ------------------------------------------ | ------ | -------------------------------------------------------------------------------------------- |
| shipment<mark style="color:red;">\*</mark> | String | Unique ***shipment\_id*** reference. Insurance can only be purchased for confirmed shipment. |

{% tabs %}
{% tab title="200: OK Insurance purchased successfully." %}

```javascript
{
    "status": true,
    "message": "Insurance purchased successfully.",
    "data": {
        "amount": 600,
        "claim": "",
        "currency": "NGN",
        "metadata": {
            "platform": "octamile",
            "reference": "tqjiz9ch2khd3jwi02zn4ffw79t8v8su"
        },
        "parcel": "PC-09857312356",
        "partner_charge": 500,
        "shipment": "SH-18651243607",
        "status": "pending",
        "user": "USER-27450202164",
        "value": 100000,
        "_id": "637c36f314560407e635a861",
        "insurance_id": "IN-96948763342",
        "created_at": "2022-11-22T02:41:55.584Z",
        "updated_at": "2022-11-22T02:41:55.584Z",
        "__v": 0,
        "id": "637c36f314560407e635a861"
    }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.terminal.africa/tship/insurance/purchase-insurance.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
