> For the complete documentation index, see [llms.txt](https://apidocs.api19.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.api19.com/account/get-billing-data.md).

# Get Billing Data

## GET or POST Request

{% hint style="info" %}
<https://v1.api19.com/account/billing/data>
{% endhint %}

Get a JSON object of all billing data for a user id

## HTTP Post Variables Supported

<table data-header-hidden><thead><tr><th width="123.9090576171875"></th><th width="108.54547119140625"></th><th></th></tr></thead><tbody><tr><td>Argument</td><td>Required</td><td>Type</td></tr><tr><td>user_id</td><td>yes</td><td>5 digit user_id</td></tr><tr><td>start_date</td><td>yes</td><td>2025-05-03</td></tr><tr><td>end_date</td><td>yes</td><td>2025-05-05</td></tr><tr><td>key</td><td>yes</td><td>api key</td></tr></tbody></table>

{% tabs %}
{% tab title="Curl Post" %}

```php
curl https://v1.api19.com/account/billing/data \
 -d 'key=api_token' \
 -d 'user_id=20000' \
 -d 'start_date=2025-05-03' \
 -d 'end_date=2025-05-04'
```

{% endtab %}

{% tab title="JSON Response" %}

```json
{
  "status": "ok",
  "call_data": [
    {
      "call_type": "did_usa",
      "minutes": "7.6000000",
      "cost": "0.0380000"
    },
    {
      "call_type": "usa_term",
      "minutes": "0.3000000",
      "cost": "0.0030000"
    }
  ],
  "msg_data": [
    {
      "msg_type": "sms",
      "direction": "in",
      "service_type": "longcode",
      "count": "22",
      "cost": "0.0550000"
    },
    {
      "msg_type": "sms",
      "direction": "in",
      "service_type": "tollfree",
      "count": "3",
      "cost": "0.0075000"
    }
  ],
  "service_data": [
    {
      "type": "local_number",
      "model_type": "mrc",
      "count": "101",
      "amount": "-101.000000"
    },
    {
      "type": "local_number",
      "model_type": "nrc",
      "count": "5",
      "amount": "-5.000000"
    },
    {
      "type": "tollfree_number",
      "model_type": "mrc",
      "count": "3",
      "amount": "-3.000000"
    },
    {
      "type": "registered_agent",
      "model_type": "one-time",
      "count": "7",
      "amount": "-315.000000"
    }
  ]
}
```

{% endtab %}
{% endtabs %}
