Skip to main content
This page describes how integrations must implement accounting period assignment when exporting expenses from Pleo. Accounting periods must be assigned after Export Items are validated and before entries are posted to the Accounting System.

Implementation

See the corresponding how-to article for API usage and step-by-step instructions:

Implementation Requirements

1. Determine Expense Date (source date)

Use the expense transaction date provided in the Export Item as the source date:
  • Expense date = date of the Export Item
This is the baseline date the expense relates to, as provided by Pleo via Export API.

2. Determine posting date (date sent to the Accounting System)

The posting date is the date your integration will send to the Accounting System when creating the corresponding entry:
  • Posting date = the date you post with (often starts as date)
In most cases:
postingDate = exportItem.date

3. Closed period handling (integration configuration)

The Export API does not provide a closed-period adjustment setting. If your integration needs to support posting expenses that fall into closed periods, you must implement this as an integration configuration. Behaviour:
  1. Attempt to post using: postingDate = exportItem.date
  2. If the Accounting System rejects the posting because the period is closed, apply the configured strategy.
  • If Closed period date adjustment is enabled in the integration:
    • When the Accounting System rejects the posting date due to a closed period, apply the configured adjustment strategy. Common strategies include:
      • Set postingDate = exportDate (i.e., “today”)
      • Move postingDate to the next open period (per Accounting System rules)
  • If Closed period date adjustment is disabled:
    • Attempt to post using the original Export Item transaction date (postingDate = exportItem.date)
    • If the Accounting System rejects closed periods, mark the Export Item as failed with a clear error (e.g., “Closed accounting period”)

4. Assign accounting period (Accounting System responsibility)

The integration must:
  • map the posting date to the correct Accounting System period
  • rely on Accounting System logic when periods are custom or fiscal-based
period = accountingSystem.resolvePeriod(postingDate)

5. Custom accounting periods (non-calendar fiscal structures)

If the Accounting System uses non-calendar periods:
  • use Accounting System APIs and/or configuration to resolve the correct period for postingDate
  • ensure exported entries align with the system’s fiscal structure (do not assume Jan–Dec)

6. Optional: Service period (for accrual/amortisation)

If exportItem.servicePeriod is present, it indicates the time range the cost relates to (common for invoices). It can be used by the Accounting System to allocate costs across periods (accruals), but it does not change closed-period handling by itself.
"servicePeriod": {
"from": "YYYY-MM-DD",
"to": "YYYY-MM-DD"
}

Processing Order

Accounting period assignment occurs within the export workflow:

Upstream Dependencies

  • Export Job has been claimed (status = in_progress)
  • Fetch Export Item Data (data layer)
  • Bookkeeping method resolved
  • Accounts Mapping – determines which GL accounts are debited and credited
  • Data Mapping – ensures amounts, dates, dimensions, identifiers, and VAT/tax information are recorded correctly
  • Attachment Handling – links receipts and supporting documentation

Downstream Dependencies

  • Posting Behaviour – determines whether entries are created as drafts or finalised
  • Export Item status update – updates outcome of Export Item (successful or failed)
  • Export Job status update – updates outcome of Export Job (completed, completed_with_errors or failed)

What Comes Next?