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

# Buy Internet Data

> Purchase Internet Data from Nigerian mobile networks

<Note>
  Call [Data plans](#data-plans) first to get the list of `plan` values you can buy. Plans and prices change, so fetch them rather than hardcoding a list.
</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"
    }
}
```

## 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"
        },...
  ]
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.