> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dojah.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Buy Internet Data

> Purchase Internet Data from Nigerian mobile networks

<Note>
  You can find out the available data plans you can pick from when trying to buy internet data.
</Note>

### Request

```http [POST] theme={null}
{{baseUrl}}/api/v1/purchase/data
```

### Body parameter

| Parameters     | Type    | Description                      |
| -------------- | ------- | -------------------------------- |
| plan \*        | string  | Plan type e.g \*9MOBILE\_1.5GB\* |
| destination \* | integer | mobile number to receive data    |

### Sample response

```json Response theme={null}
{
    "entity": {
        "phone_number": "2348012345678",
        "amount": 200,
        "network": "MTN 200 MB DATA BUNDLE",
        "reference_id": "dj_e076726b-b136-4e18-b63d-3eabc77d56c1"
    }
}
```

### Response Fields

| Field                | Type   | Description                             |
| -------------------- | ------ | --------------------------------------- |
| entity               | object | Contains the response data              |
| entity.phone\_number | string | Mobile number that received the data    |
| entity.amount        | number | Cost of the data plan in NGN            |
| entity.network       | string | Network and data plan description       |
| entity.reference\_id | string | Unique reference ID for the transaction |

## Data plans

Fetch list of data plans available

### Request

```http [GET] theme={null}
{{baseUrl}}api/v1/purchase/data/plans

```

### Sample response

```json Response theme={null}
{
    "entity": [
        {
            "amount": 1000,
            "description": "9MOBILE 1.5GB data bundle",
            "plan": "9MOBILE_1.5GB"
        },
        {
            "amount": 2000,
            "description": "9MOBILE 4.5GB data bundle",
            "plan": "9MOBILE_4.5GB"
        },...
  ]
}
```

### Response Fields

| Field                 | Type   | Description                                 |
| --------------------- | ------ | ------------------------------------------- |
| entity                | array  | List of available data plans                |
| entity\[].amount      | number | Cost of the data plan in NGN                |
| entity\[].description | string | Human-readable description of the data plan |
| entity\[].plan        | string | Plan identifier to use when purchasing data |
