Skip to main content
GET
/
expenses
Get expenses for a company
curl --request GET \
  --url https://openapi.pleo.io/v1/expenses \
  --header 'Authorization: Bearer <token>'
{
  "expenses": [
    {
      "id": "<string>",
      "performedAt": "2023-11-07T05:31:56Z",
      "amountOriginal": {
        "value": 123,
        "currency": "<string>"
      },
      "type": "CARD",
      "lines": [
        {
          "amountSettled": {
            "value": 123,
            "currency": "<string>"
          },
          "accountId": "<string>",
          "taxCodeId": "<string>",
          "tagIds": [
            {
              "id": "<string>",
              "tagGroupId": "<string>"
            }
          ]
        }
      ],
      "status": "NOT_EXPORTED",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "employeeId": "<string>",
      "employeeCode": "<string>",
      "departmentId": "<string>",
      "amountSettled": {
        "value": 123,
        "currency": "<string>"
      },
      "note": "<string>",
      "cardTransaction": {
        "state": "AUTHORIZATION",
        "merchant": {
          "name": "<string>",
          "id": "<string>"
        },
        "authorizedAt": "2023-11-07T05:31:56Z",
        "settledAt": "2023-11-07T05:31:56Z",
        "reversedAt": "2023-11-07T05:31:56Z"
      },
      "accountId": "<string>",
      "taxCodeId": "<string>",
      "tagIds": [
        {
          "id": "<string>",
          "tagGroupId": "<string>"
        }
      ],
      "receiptIds": [
        "<string>"
      ],
      "settledExpenseIds": [
        "<string>"
      ],
      "supplier": {
        "CIF": "<string>",
        "documentNumber": "<string>"
      },
      "deletedAt": "2023-11-07T05:31:56Z"
    }
  ],
  "metadata": {
    "pageInfo": {
      "pageSize": 123,
      "totalCount": 123,
      "nextPageOffset": 123
    }
  }
}

Authorizations

Authorization
string
header
required

Open API Bearer token

Query Parameters

pageOffset
number

This is the pagination offset value. The record number you would like to start from. This offset value starts at 0.

Example:

"150"

pageSize
number

The number of expenses to return for each page.

Example:

"10"

dateFrom
string<date-time>

Date and time to start the expense search from. Format is: YYYY-MM-DDTHH:mi:ss.SSSZ

Example:

"2021-02-10T14:00:00.000Z"

dateTo
string<date-time>

Date and time to start the expense search from. Format is: YYYY-MM-DDTHH:mi:ss.SSSZ

Example:

"2021-02-10T19:00:00.000Z"

types
enum<string>[]

An array of the expense types to filter on.

Available options:
CARD,
PERSONAL_TRANSFER,
BILL_INVOICE,
LOAD,
MANUAL,
MANUAL_TRANSFER,
PLEO_INVOICE,
EMPLOYEE_BANK_TRANSFER,
CASHBACK
Example:

"[\"CARD\", \"MANUAL_TRANSFER\"]"

accountId
string

Unique UUID of the expense category account to filter the expenses by.

Example:

"0f0e000-000d-0d00-000b-00db0d000fae"

tagId
string

Unique UUID of the tag the expense belongs to, to filter the expenses by.

Example:

"0f0e000-000d-0d00-000b-00db0d000fae"

transactionStates
enum<string>[]

An array of transaction states to filter the expenses by.

Available options:
AUTHORIZATION,
AUTHORIZATION_REVERSAL,
CHARGE_BACK,
CHARGE_BACK_REVERSAL,
PRESENTMENT,
SECOND_PRESENTMENT,
REFUND,
LOAD,
UNLOAD,
FAILED
Example:

"[\"AUTHORIZATION\", \"PRESENTMENT\"]"

status
enum<string>[]

An array of the export status to filter on.

Available options:
NOT_EXPORTED,
QUEUED,
EXPORTING,
EXPORTED
Example:

"[\"NOT_EXPORTED\", \"EXPORTED\"]"

Response

Expenses have been returned

expenses
object[]
required

A list of expenses fetched for the requested page

metadata
object
required

Additional metadata including pagination information