# Weel API

The Weel API empowers businesses with seamless expense management and real-time insights. Our platform makes it easy to integrate and automate expense workflows, manage receipts, and keep track of spending across your organization.


Version: v1

## Servers

```
https://public.letsweel.com
```

## Security

### BearerAuth

Type: http
Scheme: bearer

## Download OpenAPI description

[Weel API](https://developer.letsweel.com/_bundle/openapi.yaml)

## Users

This group of endpoints allows you to retrieve and manage user data, including listing users and fetching individual user details.

### List users

 - [GET /v1/businesses/{client_id}/users](https://developer.letsweel.com/openapi/users/listusers.md): This endpoint allows you to retrieve a list of users for a given business.

### Get user

 - [GET /v1/businesses/{client_id}/users/{user_id}](https://developer.letsweel.com/openapi/users/getuser.md): This endpoint allows you to retrieve a user by their ID.

### List budget members by user ID

 - [GET /v1/businesses/{client_id}/users/{user_id}/budget-members](https://developer.letsweel.com/openapi/users/listbudgetmembers.md): This endpoint allows you to retrieve budget members by their user ID.

## Transactions

This group of endpoints allows you to retrieve and manage transaction data, including listing transactions with various filters and fetching individual transaction details.

### List transactions

 - [GET /v2/businesses/{client_id}/transactions](https://developer.letsweel.com/openapi/transactions/listtransactions.md): This endpoint allows you to retrieve a list of transactions for a given business. You can filter the transactions by date range, status, and expense completion status.

### Get transaction

 - [GET /v2/businesses/{client_id}/transactions/{transaction_id}](https://developer.letsweel.com/openapi/transactions/gettransaction.md)

## Budgets

This group of endpoints allows you to retrieve and manage budget data, including listing budgets and fetching individual budget details.

Budgets are organised in a hierarchy where a budget can have multiple members. Each member is associated with a user. Funds can be allocated at the budget level or at the member level, using the flag `has_member_limits`.

![Budget Hierachy](assets/budget-hierarchy.png)


### List budgets

 - [GET /v1/businesses/{client_id}/budgets](https://developer.letsweel.com/openapi/budgets/listbudgets.md)

### Get budget

 - [GET /v1/businesses/{client_id}/budgets/{budget_id}](https://developer.letsweel.com/openapi/budgets/getbudget.md)

## Budget Members

This group of endpoints allows you to retrieve and manage budget member data, including listing budget members and fetching individual budget member details.

### List budget members

 - [GET /v1/businesses/{client_id}/budgets/{budget_id}/members](https://developer.letsweel.com/openapi/budget-members/listbudgetmembers.md): A budget member is a user who has been invited to a budget.

### Get budget member

 - [GET /v1/businesses/{client_id}/budgets/{budget_id}/members/{budget_member_id}](https://developer.letsweel.com/openapi/budget-members/getbudgetmember.md)

## Budget Topups

This group of endpoints allows you to retrieve and create budget topups. Topups are used to increase or decrease the available amount of a budget or budget member.

Topups will be automatically approved, unless a Workflow or Policy has been configured in Weel for that requires approval for budget topups.

There are two types of topups:
  - Budget topups are used to increase or decrease the available amount of a budget. This is only permitted when `has_member_limits` is `false` for the budget.
  - Budget member topups are used to increase or decrease the available amount of a budget member. This is only permitted when `has_member_limits` is `true` for the budget.

`has_member_limits` is set to `true` when this toggle is enabled in the budget creation form.
  ![Has Member Limits is true](assets/has-member-limits-true.png)


### List budget topups

 - [GET /v1/businesses/{client_id}/budgets/{budget_id}/topups](https://developer.letsweel.com/openapi/budget-topups/listbudgettopups.md): List the topups for a budget.

### Create budget topup

 - [POST /v1/businesses/{client_id}/budgets/{budget_id}/topups](https://developer.letsweel.com/openapi/budget-topups/createbudgettopup.md): Increase or decrease the available amount of a budget. Only permitted when has_member_limits is false for the budget.

### List budget member topups

 - [GET /v1/businesses/{client_id}/budgets/{budget_id}/members/{budget_member_id}/topups](https://developer.letsweel.com/openapi/budget-topups/listbudgetmembertopups.md): List the topups for a budget member.

### Create budget member topup

 - [POST /v1/businesses/{client_id}/budgets/{budget_id}/members/{budget_member_id}/topups](https://developer.letsweel.com/openapi/budget-topups/createbudgetmembertopup.md): Increase or decrease the available amount of a budget member. Only permitted when has_member_limits is true for the budget.

## Statements

This group of endpoints allows you to retrieve a list of balances for the required period for a given business.

### List statements

 - [GET /v1/businesses/{client_id}/statements](https://developer.letsweel.com/openapi/statements/liststatements.md): This endpoint allows you to retrieve a list of balances for the required period for a given business.

### Get account balances

 - [GET /v1/businesses/{client_id}/balance](https://developer.letsweel.com/openapi/statements/listbalances.md): Retrieve real-time account balances for all currencies associated with your business. This endpoint returns the current balance for each currency wallet associated with your business account.

