Skip to main content
POST
/
v1
/
accounting-entries:search
Fetch accounting entries based on filters.
curl --request POST \
  --url https://external.pleo.io/v1/accounting-entries:search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json;charset=UTF-8' \
  --data '
{
  "includeDeleted": false,
  "accountIds": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "bookkeepingDateEnd": "2023-11-07T05:31:56Z",
  "bookkeepingDateStart": "2023-11-07T05:31:56Z",
  "employeeIds": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "exportStatus": [],
  "families": [],
  "foreignExtensionIds": [
    "<string>"
  ],
  "hasAccount": true,
  "hasBookkeepingDate": true,
  "hasNote": true,
  "performedAtEnd": "2023-11-07T05:31:56Z",
  "performedAtStart": "2023-11-07T05:31:56Z",
  "reviewStatus": [],
  "settled": true,
  "settledAtEnd": "2023-11-07T05:31:56Z",
  "settledAtStart": "2023-11-07T05:31:56Z",
  "status": [],
  "subFamilies": [],
  "tagGroupIdsUnset": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "tagRowIds": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "taxCodeIds": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "teamIds": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "transactionValueCurrencies": [
    "<string>"
  ]
}
'
{
  "data": [
    {
      "attendees": [
        {
          "attendableId": "<string>",
          "attendableType": "CONTACT",
          "id": "<string>"
        }
      ],
      "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "createdAt": "2023-11-07T05:31:56Z",
      "exportStatus": "CREATED",
      "family": "BALANCE_AMENDMENT",
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "performedAt": "2023-11-07T05:31:56Z",
      "receiptIds": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ],
      "reviewStatus": "NOT_OK",
      "splitItems": [
        {
          "createdAt": "2023-11-07T05:31:56Z",
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "tags": [
            {
              "tagGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "tagId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
            }
          ],
          "updatedAt": "2023-11-07T05:31:56Z",
          "accountCode": "<string>",
          "accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "taxCodeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "totalBillValue": {
            "currency": "EUR",
            "minors": 10
          },
          "transactionValue": {
            "currency": "EUR",
            "minors": 10
          }
        }
      ],
      "status": "DRAFT",
      "tags": [
        {
          "tagGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "tagId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
        }
      ],
      "transactionValue": {
        "currency": "EUR",
        "minors": 10
      },
      "updatedAt": "2023-11-07T05:31:56Z",
      "accountCode": "<string>",
      "accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "bookkeepingDate": "2023-11-07T05:31:56Z",
      "deletedAt": "2023-11-07T05:31:56Z",
      "employeeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "foreignExtensionId": "<string>",
      "note": "<string>",
      "settledAt": "2023-11-07T05:31:56Z",
      "subFamily": "ATM",
      "supplier": {
        "cif": "<string>",
        "documentNumber": "<string>",
        "documentType": "FACTURA",
        "externalAccountNumber": "<string>",
        "externalSupplierId": "<string>"
      },
      "taxCodeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "teamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "totalBillValue": {
        "currency": "EUR",
        "minors": 10
      }
    }
  ],
  "pagination": {
    "currentRequestPagination": {
      "parameters": {},
      "after": "<string>",
      "before": "<string>",
      "limit": 123,
      "offset": 123,
      "sortingKeys": [
        "<string>"
      ],
      "sortingOrder": []
    },
    "hasNextPage": true,
    "hasPreviousPage": true,
    "endCursor": "<string>",
    "startCursor": "<string>",
    "total": 123
  }
}

Authorizations

Authorization
string
header
required

JWT Bearer token authentication. Include the token in the Authorization header as: Bearer <token>

Query Parameters

company_id
string<uuid>

Only return accounting entries that have the specific company ID. Required if partner_id or organization_id is not provided.

organization_id
string<uuid>

Only return accounting entries that belong to the companies associated. to the given Organization Id. Required if company_id or partner_id is not provided.

before
string

Lower bound of the page of data to return (cannot be used together with [after])

after
string

Upper bound of the page of data to return (cannot be used together with [before])

limit
integer<int32>
default:20

The maximum amount of items to return. Never returns more than 100 items

Required range: 1 <= x <= 100
sorting_order
enum<string>[]

The order to sort the results by. Must be the same length as [sortingKeys]; one order per key.

Available options:
ASC,
ASC_NULLS_FIRST,
ASC_NULLS_LAST,
DESC,
DESC_NULLS_FIRST,
DESC_NULLS_LAST
sorting_keys
enum<string>[]

The keys to sort the results by

Available options:
settledAt,
performedAt,
id,
bookkeepingDate

Body

application/json;charset=UTF-8
includeDeleted
boolean
default:false
required

Include deleted accounting entries

accountIds
string<uuid>[]

Only return accounting entries that match with the given account IDs.

Maximum array length: 100
bookkeepingDateEnd
string<date-time>

Return accounting entries that have been recorded prior to the specific bookkeeping date. This value cannot be used with other date search criteria.

bookkeepingDateStart
string<date-time>

Return accounting entries that have been recorded after the specific bookkeeping date. This value cannot be used with any other date search criteria.

employeeIds
string<uuid>[]

Only return accounting entries that match with the specific Employee ID.

Maximum array length: 100
exportStatus
enum<string>[]

Only return accounting entries that match with the specific export status.

CREATED: The accounting entry has been created. EXPORTED: The accounting entry has been exported. EXPORTING: The accounting entry is in the process of being exported. QUEUED: The accounting entry is in the queue to be exported.

Available options:
CREATED,
EXPORTED,
EXPORTING,
NOT_CREATED,
NOT_EXPORTED,
QUEUED
families
enum<string>[]

Only return accounting entries that belong to the specific accounting entry families

BALANCE_AMENDMENT: Represents manual wallet balance adjustments, often through human intervention. BILL_INVOICE: Represents an invoice issued to the company. If payment of the invoice is made via Pleo, the payment is recorded separately, using the BILL_INVOICE_PAYMENT family. CARD_PURCHASE: Represents a purchase made using a physical or virtual Pleo card. CASHBACK: An amount of money that is returned to the company through Pleo cashback. CREDIT_NOTE: Represents a credit note issued to the company, stored only in the accounting entry metadata table. MILEAGE: Represents a Mileage expense incurred by an employee. The amount is owed to the employee. OUT_OF_POCKET: Represents an amount that is spent by an employee out of their own pocket. The amount is owed to the employee. OVERDRAFT: Represents either the monthly subscription fee for using Pleo Overdraft, or a the interest incurred on an existing overdraft. PER_DIEM: Represents a daily allowance given to an employee during travel - the amount is owed to the employee. PLEO_INVOICE: Represents the SaaS invoice from Pleo to the company. REIMBURSEMENT: Represents a reimbursement from the company to the employee or vice-versa. WALLET: Represents a top up or withdrawal on the Pleo wallet BILL_INVOICE_PAYMENT: Represents a payment of an invoice from the company wallet.

Available options:
BALANCE_AMENDMENT,
BILL_INVOICE,
CARD_PURCHASE,
CASHBACK,
CREDIT_NOTE,
MILEAGE,
OUT_OF_POCKET,
OVERDRAFT,
PER_DIEM,
PLEO_INVOICE,
REIMBURSEMENT,
WALLET,
BILL_INVOICE_PAYMENT
foreignExtensionIds
string[]

Only return accounting entries with the given foreignExtensionId. This is an auto-generated ID that populates when the Accounting Entries API endpoints interact with other Pleo APIs.'

Maximum array length: 100
hasAccount
boolean

Only return accounting entries with an Account ID assigned

hasBookkeepingDate
boolean

Only return Accounting Entries that have bookkeeping date set

hasNote
boolean

Return accounting entries that have a note

performedAtEnd
string<date-time>

Only return accounting entries performed before this date. Cannot be used with any other date filters

performedAtStart
string<date-time>

Only return accounting entries performed after this date. Cannot be used with any other date filters

reviewStatus
enum<string>[]

Only return accounting entries that match with the specific review status.

NOT_OK: The accounting entry has been reviewed as Not OK. NOT_REQUIRED: The accounting entry does not require review. NOT_SET: The accounting entry has not been reviewed yet. OK: The accounting entry has been reviewed as OK. WAITING_FOR_EXPENSE_OWNER: The accounting entry is waiting for more details from the Expense Owner. WAITING_FOR_REVIEWER: The accounting entry is waiting for review by a reviewer. WAITING_FOR_COMPANY_REVIEWER: The accounting entry is waiting for review by a company reviewer. WAITING_FOR_TEAM_REVIEWER: The accounting entry is waiting for review by a team reviewer. WAITING_FOR_TAG_REVIEWER: The accounting entry is waiting for review by a tag reviewer.

Available options:
NOT_OK,
NOT_REQUIRED,
NOT_SET,
OK,
WAITING_FOR_EXPENSE_OWNER,
WAITING_FOR_REVIEWER,
WAITING_FOR_COMPANY_REVIEWER,
WAITING_FOR_TEAM_REVIEWER,
WAITING_FOR_TAG_REVIEWER
settled
boolean

Only return accounting entries that have a settled status.

settledAtEnd
string<date-time>

Only return accounting entries settled before this date. Cannot be used with any other date filters

settledAtStart
string<date-time>

Only return accounting entries settled after this date. Cannot be used with any other date filters

status
enum<string>[]

Only return accounting entries that match with the specific accounting entry status.

DRAFT: The accounting entry is still in a work-in-progress stage; the details might change. PENDING: Payment is in progress. The transaction amount in the specific currency is final, yet the funds have not yet been settled.> ⚠️ Note: The customer can no longer cancel this expense.

amount/currency is fixed, funds have been reserved but not yet settled, and expense can no longer be canceled by user COMPLETED: The transaction is complete, implying the funds have been settled for the final bill amount. COMPLETED_EXTERNALLY: Payment has completed outside of Pleo. Hence, it does not impact the Pleo wallet CANCELLED: Canceled by user, Pleo, or an external party REJECTED: Rejected by user, Pleo or an external party ERROR: An error prevented the accounting entry from being settled

Available options:
DRAFT,
PENDING,
COMPLETED,
COMPLETED_EXTERNALLY,
CANCELLED,
REJECTED,
ERROR
subFamilies
enum<string>[]

Only return accounting entries that belong to the specific sub family.

ATM: A CARD_PURCHASE that was performed at an ATM. IN_STORE: A CARD_PURCHASE that was performed at a physical store. ONLINE: A CARD_PURCHASE that was performed online. PLEO_INVOICE: A PLEO_INVOICE that was paid. PLEO_INVOICE_REFUND: A PLEO_INVOICE that was refunded. REIMBURSEMENT_TO_COMPANY: A REIMBURSEMENT was made to the company. REIMBURSEMENT_TO_EMPLOYEE: A REIMBURSEMENT was made to the employee. REIMBURSEMENT_TO_EMPLOYEE_REFUND: A REIMBURSEMENT to the employee was refunded. LOAD: Either a WALLET or a BALANCE_AMENDMENTload.UNLOAD: Either a WALLET or a BALANCE_AMENDMENT unload - Money leaves the Pleo wallet. WITHDRAWAL: A WALLET withdrawal. FEE: A monthly fee paid for using overdraft. INTEREST: Interest paid for the amount over drafted. BILL_INVOICE_PAYMENT_RETURNED: A BILL_INVOICE_PAYMENT that was returned. BILL_INVOICE_PAYMENT_RECEIVED: A BILL_INVOICE_PAYMENT that was received.

Available options:
ATM,
IN_STORE,
ONLINE,
PLEO_INVOICE,
PLEO_INVOICE_REFUND,
REIMBURSEMENT_TO_COMPANY,
REIMBURSEMENT_TO_EMPLOYEE,
REIMBURSEMENT_TO_EMPLOYEE_REFUND,
LOAD,
UNLOAD,
WITHDRAWAL,
FEE,
INTEREST,
BILL_INVOICE_PAYMENT_RETURNED,
BILL_INVOICE_PAYMENT_RECEIVED
tagGroupIdsUnset
string<uuid>[]

Only return accounting entries where the given Tag Group IDs do not have a tag value set.

Maximum array length: 100
tagRowIds
string<uuid>[]

Only return accounting entries with the given Tag ID.

Maximum array length: 100
taxCodeIds
string<uuid>[]

Only return accounting entries that match with the specific tax code IDs

Maximum array length: 100
teamIds
string<uuid>[]

Only return accounting entries with the given Team ID. The Team ID is not the one allocated to an employee, It is allocated to a team of a company. For example, an accounting entry contains the team ID of Design team as the specific entry is associated with the Design team

Maximum array length: 100
transactionValueCurrencies
string[]

Only return accounting entries with the given transaction currency codes (ISO 4217). Filters on the original transaction currency of the expense.

Maximum array length: 100

Response

A paginated list of accounting entries matching the search criteria.

data
object[]
required
pagination
object
required