> For the complete documentation index, see [llms.txt](https://developer.pesatime.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.pesatime.com/example-requests.md).

# Example requests

## Headers

1. **Content Type:** Set content type to `application/x-www-form-urlencoded`

## Requests

### 1. GET Request

```
curl -i \
    -H "x-rest-api-key: XXXXXXXX-XXX" \
    -H "x-rest-user: XXXXXXXXXXXXXX" \
    -X GET \
    https://api.pesatime.com/v1/expenses?date_from=2019-01-01
```

### 2. POST request

```
curl -i \
    -H "x-rest-api-key: XXXXXXXX-XXX" \
    -H "x-rest-user: XXXXXXXXXXXXXX" \
    -X POST -d 'name=Category name' \
    https://api.pesatime.com/v1/expense_categories
```

### 3. PUT request

```
curl -i \
    -H "x-rest-api-key: XXXXXXXX-XXX" \
    -H "x-rest-user: XXXXXXXXXXXXXX" \
    -X PUT -d 'name=Category name 2' \
    https://api.pesatime.com/v1/expense_categories/5dce9cea07f72fd690252d74
```

### 4. DELETE request

```
curl -i \
    -H "x-rest-api-key: XXXXXXXX-XXX" \
    -H "x-rest-user: XXXXXXXXXXXXXX" \
    -X DELETE \
    https://api.pesatime.com/v1/expense_categories/5dce9cea07f72fd690252d74
```
