v1

latestOpenAPI 3.0.1Apache 2.02026-07-26131220353.8 KB
AccountingEntryEnrichmentV2

Enrich Accounting Entry V2

Enriches an existing Pleo card accounting entry by attaching one or more receipts and applying optional cost categorisation tags. Pleo identifies the matching entry using the transaction details provided as query parameters. Use this endpoint for all new implementations.

post/v2/accounting-entries:enrich

Query parameters

emailstring

Email address of the Pleo user who made the purchase. Used as an optional matching parameter.

Email address of the Pleo user who made the purchase. Used as an optional matching parameter.

performed_atstring

ISO 8601 timestamp of when the purchase was authorised (i.e. when the transaction happened). Either performed_at or settled_at must be provided.

ISO 8601 timestamp of when the purchase was authorised (i.e. when the transaction happened). Either performed_at or settled_at must be provided.

settled_atstring

ISO 8601 timestamp of when the purchase was settled (i.e. when the funds were transferred). Either performed_at or settled_at must be provided.

ISO 8601 timestamp of when the purchase was settled (i.e. when the funds were transferred). Either performed_at or settled_at must be provided.

amountinteger required

Transaction amount in minor units (e.g. 1500 represents €15.00).

Transaction amount in minor units (e.g. 1500 represents €15.00).

currencystring required

ISO 4217 currency code of the transaction (e.g. EUR, GBP, DKK).

ISO 4217 currency code of the transaction (e.g. EUR, GBP, DKK).

card_last_four_digitsstring required

Last four digits of the Pleo card used for the transaction. Used as a matching parameter to identify the correct accounting entry.

Last four digits of the Pleo card used for the transaction. Used as a matching parameter to identify the correct accounting entry.

merchant_namestring required

Name of the merchant as it appears on the transaction.

Name of the merchant as it appears on the transaction.

Request body

receiptsstring[] required

List of Base64 encoded ByteArray as string

tagsstring[]

List of Tags in UUID format

Example request

{
  "receipts": [
    "JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PAovVHlwZSAvQ2F0YWxvZwo+PgplbmRvYmoK",
    "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="
  ],
  "tags": [
    "ef6f10a1-e608-418b-99f1-08150a9ae129",
    "c111b173-d9da-4117-ab70-8f4b8acf496d"
  ]
}

Response

No matching accounting entry found. The receipt has been stored in the Receipt Inbox for manual resolution.

Example response

{
  "data": {
    "accountingEntryId": "00000000-0000-0000-0000-000000000000",
    "receiptStatus": "ADDED_TO_RECEIPT_INBOX",
    "tags": [
      "00000000-0000-0000-0000-000000000000"
    ]
  }
}