General: Levels and design
Which level to build, deployment decisions, user-facing settings and non-functional requirements.
General: Sync schedules and limits
How often each sync runs, request targets and the sync limits that apply to Levels 2 to 4.
Level 1: Export workflow
Building, sequencing and updating the export workflow, from detecting a job to completing it.
Level 1: Troubleshooting
Why expenses stay queued, what MISSING_CONTRA_ACCOUNTS means and why bookkeeping is null.
Level 1: Mapping, posting and attachments
Bookkeeping methods, accounts and data mapping, posting, accounting periods and attachments.
Level 2: Tags Sync
Dimension selection, Tag Groups and Tags, and how matching works.
Level 3: Chart of Accounts Sync
Matching, creating, archiving and deleting Accounts, batch requests and high-volume charts.
Level 3: Tax Sync
Tax Code matching, data mapping, archiving and deleting.
Level 4: Vendor Sync
Fetching, matching, creating, updating, archiving and unarchiving Vendors from the Accounting System.
Level 4: Vendor Creation
Detecting draft Vendors, creating them in the Accounting System and activating them in Pleo.
General: Levels and design
Which integration levels exist, and which one do I need?
There are four levels, and each one adds to the one before. Level 1 exports expenses and attachments (Export API). Level 2 adds Tags Sync (Tags API) and is the recommended minimum. Level 3 adds Chart of Accounts Sync and Tax Code Sync (Accounts API and Tax Code API). Level 4 adds bi-directional Vendor Sync (Vendors API). Choose the level that matches how much your users need to classify and sync. See AS/ERP Integration: Overview.
Where must I test an Accounting Integration before it goes live?
Test in Staging before you promote the integration to Production. This applies to both deployment types. Also store and refresh OAuth 2.0 tokens securely and follow the API rate limits. See Accounting Integration Deployment Decisions.
When do I use toggles and when drop-downs for Dimension selection?
Use a toggle for each Dimension if the Accounting System has five or fewer static Dimensions. Use up to five drop-downs if the Dimensions are custom or there are more than five static Dimensions. See User-Facing Configurations.
How long must the integration keep its logs?
Keep each log for 30 days. Delete any log that is older than 30 days automatically. This applies to every log, including the export log that users can download as a file. See Non-Functional Requirements.
What must I do first if another accounting integration is connected?
Disconnect the existing accounting integration before you continue. The option to disconnect is in the settings of the current integration. See How to Connect Pleo to a Custom API Integration.
General: Sync schedules and limits
How often should each sync run, and how many requests can I make?
Run an initial sync as soon as the integration is connected and authorised, then repeat: Chart of Accounts every 24 hours, Tags every 60 minutes (or every 12 to 24 hours if the accounting system’s rate limit is a risk), Tax Codes every 15 minutes, and Vendors every hour or less often. Also offer a user-triggered sync if you can. Vendor Sync runs must never overlap. Target at most 500 requests per minute, because the Pleo limit is 600 per minute per credential. The Vendors API limit of 600 per minute is shared with Vendor Creation. See Chart of Accounts Sync Periodicity and Scheduling.
What limits apply to Tags Sync and Chart of Accounts Sync?
For Tags Sync you can select up to 5 Dimensions at a time. If a selected Dimension becomes inactive in the accounting system, it is deselected and its Tag Group is archived in Pleo. For Chart of Accounts Sync, Pleo caps a company at 11,000 active Accounts. If your chart may exceed that, filter the accounts and archive what you do not need before you sync. See How to Handle a High-Volume Chart of Accounts.
Level 1: Export workflow
What’s the minimal integration I can build that just pulls approved expense data out of Pleo, without any tag or category mapping yet?
The minimal Level 1 Export workflow is the smallest integration you can build: detect an Export Job, pull the approved expense data, and report results back to Pleo. No tag, category, or vendor mapping is required at this level. See the Export Integration Workflow Guide for the full seven-step sequence.
How do I book or record the Export Item in my Accounting System (AS/ERP)?
That’s Step 5 (Process & Record Export Items) of the Export workflow, and it happens inside your Accounting System or ERP, not via Pleo’s Export API. This page only covers the handoff into that step. The detailed sub-steps, bookkeeping method resolution, accounts mapping, data mapping, attachment transfer, period assignment, and posting behaviour are covered in the AS/ERP Processing Workflow Guide.
Does the Export Integration Workflow Guide support webhook detection, polling, or both?
Both. Step 1 (Detect & Start Export Jobs) can detect a new Export Job via a webhook notification (
v1.export-job.created, preferred, since Pleo triggers the integration immediately) or via scheduled polling. Either mechanism leads to the same next step: selecting the oldest pending job and starting it. See the Detect & Start Export Jobs integration design doc for the detection mechanisms in detail, and the How to Detect and Start Export Jobs how-to for the exact implementation steps.What happens if my integration crashes or loses its connection mid-job in the Level 1 Export Integration Workflow?
Recovery is built into the workflow at two points. On restart after a connection loss, Step 1 detects an
in_progress job it previously started, skips the started event, and resumes from where it left off. Step 3 re-fetches the job’s items, filters for those still pending, and resumes without reprocessing completed items. Items already in_progress at the time of the crash are deliberately excluded from retry, since retrying them risks creating duplicate accounting entries. For the exact recovery logic and code, see the How to Detect and Start Export Jobs and How to Retrieve Export Job Items how-tos. For the design rules behind each recovery strategy, see the Detect & Start Export Jobs and Retrieve Export Job Items integration design docs.Is tag or category mapping covered in the Export Integration Workflow Guide?
No. This guide covers only the Level 1 export workflow: pulling approved expense data out of Pleo with no tag or category mapping. If your integration needs to sync tags, see the Tags Sync Workflow Guide instead. Category mapping, mapping Pleo’s bookkeeping categories to GL accounts in your Accounting System, is handled by the Accounts Mapping step in the AS/ERP Processing Workflow Guide, with the configuration and resolution logic covered in detail in Accounts Mapping. That step assumes the GL accounts already exist in Pleo. If you instead need to sync the GL accounts themselves from your Accounting System into Pleo, that’s a separate, higher integration level covered by the Chart of Accounts Sync Workflow Guide.
Do I need to implement the 7 steps of the Export Integration Workflow Guide in strict sequence?
Yes. Each step’s output is the next step’s required input, so the 7 steps must run in order for a given Export Job: detection and starting a job establishes exclusivity, and Export Jobs themselves must be processed one at a time and in order to prevent duplicate or inconsistent accounting entries. This applies even though Step 5 (Process & Record Export Items) happens inside your Accounting System or ERP rather than via Pleo’s Export API: it is still a sequential dependency between Step 4 and Step 6. The last two steps close out this chain by reporting results back to Pleo: Step 6 (Update Export Items) reports the success or failure outcome of each individual Export Item processed in Step 5, and Step 7 (Update & Complete Export Job) must run after Step 6 to report the aggregated outcome of the Export Job itself, since it cannot be triggered until every item has a recorded status.
How is an Export Job created, and which expenses are in it?
A user with the Admin or Bookkeeper role queues expenses in the Pleo Web App (Exports, then Add to Export Queue), opens the Export Queue tab and clicks Export. That creates an Export Job with status
pending, and the selected expenses become Export Items. Only approved and complete expenses can be exported. See How to Queue Export Items in Pleo’s Web App.Which Export Job should I process first, and can I process jobs in parallel?
Always process the oldest eligible job first, and never process jobs in parallel. Use a single export worker so jobs run one after another. Detect jobs with the
v1.export-job.created webhook (recommended) or by polling GET /v3/export-jobs for status pending. When recovering after an interruption, also request in_progress to find a job you started earlier. See How to Detect and Start Export Jobs for Processing.In what order do I call the API and what statuses does an Export Job go through?
Follow four steps in order. (1) Send the
started event to POST /v3/export-job-events, and the job becomes in_progress. (2) Mark every item in_progress with PUT /v3/export-jobs/{jobId}/items. (3) Report each item as successful or failed with the same endpoint. (4) Finish the job with completed (all items succeeded), completed_with_errors (some failed) or failed (all failed). Send step 4 only after Pleo has acknowledged every item update. See Export Integration Workflow Guide.What limits apply when I update Export Items?
Send at most 100 items per
PUT /v3/export-jobs/{jobId}/items request, so split larger jobs into batches. Each item must include its accountingEntryId and one final status, successful or failed. For a successful item, add externalId, externalUrl and exportedAt when you have them. For a failed item, add failureReasonType and failureReason. See How to Update Export Items.Which failureReasonType should I send when an item or a job fails?
For a failed item, use
missing_configuration (a journal or account is missing from your configuration), invalid_configuration (a tax code, GL account or tag does not exist in the accounting system), vendor_unknown, receipt_file_size_limit_exceeded, receipt_download_failure, receipt_upload_failure, accounting_system_rate_limit or accounting_system_authentication_failure. For any other failure use accounting_system_validation_failure and pass the accounting system’s message as failureReason. For a failed job, add failureReason and failureReasonType only when the event is failed. The default type is accounting_system_validation_failure. Use accounting_system_unreachable when the accounting system cannot be reached. See Integration Design: Update Export Items.What is the difference between an Export Job and an Export Item?
An Export Job is a batch of expenses selected for export, with its own processing scope, execution order and overall status. An Export Item is one expense in that job, with its own result. See Exports Overview.
Why validate before processing Export Items?
It prevents jobs from becoming stuck in progress. Exports start only when processing can succeed, and failures are reported early with clear reasons. See Perform Pre-Export Validation.
What must be true before Export Items are updated, and what follows?
The Export Job must be started with status
in_progress, and the entries must be recorded in the AS. Afterwards the Export Job status update sets the job outcome to completed, completed_with_errors or failed. See Update Export Items.When may the Export Job be completed, and how often?
Only after all Export Items have been updated and processing is fully complete. Send the Export Job Event once. Do not complete jobs prematurely. See Update & Complete Export Job.
Can I edit an expense after I click Export?
No. Once you click Export, an Export Job is created and the selected expenses become Export Items. These items are locked. Export Items cannot be modified after they are added to an Export Job. See How to Queue Export Items in Pleo’s Web App.
When does an Export Job expire, and what happens then?
A job expires after
expiresIn seconds (for example 3600) since the last state changing update, lastUpdatedAt. Its status moves to expired. The job must be resubmitted from Pleo’s Web App, and a new job with a new jobId is queued. See How to Detect and Start Export Jobs for Processing.How do I rerun a failed Export Job, and what changes?
Fix the issue, then click Export at the bottom of the screen in the Pleo Web App. Each click creates a new job in the export queue with a unique
jobId. See How to Perform Pre-Export Validation.How do I handle pagination when fetching Export Items?
Loop while
hasNextPage is true and pass the endCursor value to fetch the next page. Retrieve all pages before you start processing. This avoids partial exports. See How to Fetch Export Item Data for Processing.When can users see Export Item results in the Pleo Web App?
Results are recorded in Pleo but not fully shown to users until the Export Job is completed. After that, export status shows in the Export queue, and failed items and error details are available for review. See How to Update Export Items.
Can I change an Export Job after I complete it?
No. A completed Export Job is final and cannot be modified. No further Export Item updates can be made for that job. See How to Update & Complete the Export Job.
Level 1: Troubleshooting
Why do my exported expenses stay in the Queued tab even though every call succeeded?
The usual cause is skipping the
in_progress step. If you report items as successful without first marking each one in_progress, Pleo still accepts every call, but the expenses stay in the Queued tab. Exporting them again then creates a new pending Export Job with the same entries. Mark every item in_progress first, then report the results. See How to Resolve Export Items Stuck in the Export Queue.Why am I getting a MISSING_CONTRA_ACCOUNTS error?
You’re getting a
MISSING_CONTRA_ACCOUNTS error, because the Export API v3 requires a contra account to be configured for each entity’s default currency. If any entity’s default currency does not have a contra account mapped, calls to /v3/export-items will fail with this error.See How to Resolve MISSING_CONTRA_ACCOUNTS for steps to fix this.Why is the bookkeeping field returning null in my export items response?
You’re getting a
null value for the bookkeeping field, because it’s only populated when the Vendor Tagging feature is enabled and a bookkeeping method has been assigned to the expense before it was queued. Without Vendor Tagging enabled, bookkeeping will always be null. This is expected behaviour, not an error.When bookkeeping is null, use the supplier field on the export item for bookkeeping purposes instead.See How to Enable Vendor-Based Bookkeeping for steps to enable it.Level 1: Mapping, posting and attachments
Does Pleo decide whether entries are created as draft or finalised?
No. Pleo has no posting preference and the Export API does not expose one. Your integration decides whether entries are created as draft or finalised in the accounting system, and it keeps that choice as an integration configuration setting. See How to Apply Posting Behaviour.
Which accounting period does an expense belong to, and what if the period is closed?
Pleo provides only the expense’s transaction date. Your integration maps that date to an accounting period using the accounting system’s own rules and calendar, and handles closed periods. Typical approaches are to shift the date to the next open period, post to an adjustment period, or reject the export with an error. Pleo does not change transaction dates or check them against period rules. See How to Assign Accounting Periods.
Which attachment formats and sizes can an Export Item have?
Supported formats are
.doc, .docx, .pdf, .txt, .jpg, .jpeg, .png, .xls and .xlsx. The maximum size is 30 MB per attachment, and larger files may not be available for export. One expense can have several attachments, and the Export Item returns each file separately. Download URLs are time-limited, so fetch the files promptly. See Attachments.How is the credit line calculated for a split line journal entry?
The payload has no credit line. Add up all
lineAmount.inWalletCurrency.value values. The total must match amount.inWalletCurrency.value. For two split lines of £120 and £80, create two debit lines and one credit line of £200. See Journal Entry Handling.How do I record a split expense in Accounts Payable?
Treat the item as split when
accountingEntryLines.length > 1. Record each split line as a separate invoice line. Record one payment line for the total amount, then reconcile as usual. See Accounts Payable Handling.Where does the Pleo Contra Account come from?
It is not an integration setting. A bookkeeper or admin sets one for each currency in Pleo, in the Contra accounts settings. Pleo passes it on each Export Item in
data[].contraAccount. See Accounts Mapping.When should I send VAT amounts to the accounting system?
By default the Accounting System calculates VAT from line amounts and tax codes, so do not send a VAT amount. Send VAT from Pleo only if the system cannot calculate tax automatically or requires explicit VAT posting. See Data Mapping.
What if the AS accepts only one attachment?
Combine the files into a single document before upload. PDF merge is preferred and a ZIP archive is the fallback. If the AS supports multiple attachments, upload all files. See Attachment Handling.
When must accounting periods be assigned in the export flow?
Assign them after Export Items are validated and before entries are posted to the Accounting System. Posting Behaviour comes next. See Accounting Periods.
What happens when the bookkeeping.method is accounts_payable and no vendor account exists?
First try
resolveVendorAccount(vendor.code) to find a vendor account. If a vendor account exists, use it as the counter account. If not, use defaultAccountsPayableAccount as the counter account. See How to Apply Accounts Mapping for Export Items.In what order must you apply the data mappings?
Apply mandatory datapoints first, then invoice datapoints if they apply, then optional datapoints, and finally VAT handling. Apply them one after another so you do not overwrite required accounting data. See How to Apply Data Mapping.
Why must I not rely on the attachment URL as a unique identifier?
Attachment URLs may change across requests, so the URL alone cannot identify a file. Use a deterministic key instead, for example
accountingEntryId + file index, and store processed keys to prevent duplicate uploads during retries. See How to Transfer Attachments.Level 2: Tags Sync
What happens to the Tag Group when a user deselects a Dimension?
The Tag Group in Pleo is archived, and its Tags are no longer synchronised. Nothing is deleted. If the Dimension is selected again, the Tag Group is unarchived and sync resumes in the next sync cycle. See Dimension Selection.
Is matching of Tag Groups and Tags case sensitive?
No. Matching is case insensitive. Both Tag Groups and Tags are matched to their Accounting System counterparts, using the
code field on both ends of the sync. See Tags Sync Data Mapping.What happens when a selected Dimension becomes inactive in the Accounting System?
Your integration deselects it automatically during the next sync cycle. No manual action by the user is needed. In the example, Supplier becomes inactive and is deselected, so the final selection has four Dimensions. See How to Select Dimensions for Tags Sync.
Should an integration delete a Tag Group that has no selected Dimension?
No. Do not delete Tag Groups. Archive them instead, because archiving is non-destructive and reversible. Archiving a Tag Group does not archive its Tags. Those Tags stay in their current state. See How to Sync Tag Groups with Accounting Dimensions.
Should an integration delete a Tag when its Dimension Value disappears?
No. Archive the Tag with PUT
/v0/tags/{tagId} and set archived to true. Archiving is non-destructive and reversible, so the Tag can come back later. The same rule applies when the value is blocked, expired or deactivated. See How to Sync Tags with Dimension Values.Level 3: Chart of Accounts Sync
What result should a repeated sync run give?
Re running the same sync with unchanged data produces the same final state. Each run must be independent, repeatable and consistent, with no reliance on earlier runs. See Chart of Accounts Sync Overview.
Which Pleo Accounts must be archived, and are Accounts ever deleted?
Active Pleo Accounts with no matching active AS account must be archived. Accounts are never permanently deleted, so you can unarchive them later. See Sync Accounts.
Why is externalId reliable for matching accounts across sync runs?
It is a stable identifier assigned by the Accounting System. It does not change when an account name or code is updated, so matching still works across sync runs. See Chart of Accounts Sync Data Mapping.
What must a PUT request contain when you archive an Account?
A PUT action replaces the Account, so include the current values for all fields. Only
archived should change, and you set it to true. See How to Create, Update, and Archive Accounts.How many Accounts can one batch create request include?
A single request can include between 1 and 1000 Accounts. If you have more than 1000, split them across multiple requests. A request with 0 items or more than 1,000 returns
400. See How to Create Multiple Accounts in a Single Request.Does a 201 response mean all Accounts in the batch were created?
No. The API returns
201 even when some items fail. Always check both the created and failed arrays in the response, and log or retry the failures. See How to Create Multiple Accounts in a Single Request.In what order must archive, create and unarchive run for a high-volume chart?
Archive first, then create or unarchive. Pleo checks the limit on both create and unarchive requests. A request sent before the archive step can be rejected with an
HTTP 400 when the company is close to the limit. See How to Handle a High-Volume Chart of Accounts.Should I archive or delete Accounts in production?
Archive them. Archiving is reversible and leaves mappings and expenses unchanged. Deleting is permanent, clears Category mappings, and a recreated Account gets a new
id. Chart of Accounts Sync never deletes Accounts. See How to Delete an Account.Level 3: Tax Sync
Which Web App labels match the API tax types?
The Pleo Web App labels the types Standard and Reverse. The API uses
inclusive and reverse. inclusive corresponds to Standard, and there is no separate standard value. See Tax Sync Data Mapping.Which integration level is Tax Sync, and what must come before it?
Tax Sync is Integration Level 3. It builds on Chart of Accounts Sync, so bookkeepers can assign the right tax codes to expenses before export. Vendor Sync is the next step, at Level 4. See Tax Sync Workflow Guide.
Can I delete a Tax Code, and how do I undo an archive?
No. Do not delete Tax Codes. Archive them with
archived: true instead. Archiving is reversible, so you can unarchive a Tax Code later by sending a PUT with archived: false. See How to Create, Update, and Archive Tax Codes.Level 4: Vendor Sync
What is the difference between Vendor Creation and Vendor Sync?
They are two separate flows. Vendor Creation goes from Pleo to the accounting system: a bookkeeper adds a vendor in Pleo, the vendor starts as
DRAFT, and your integration creates it in the accounting system and activates it in Pleo (trigger: the v1.vendor.created webhook or a 5-minute poll). Vendor Sync goes from the accounting system to Pleo: a scheduled sync (hourly) keeps vendors ACTIVE or moves them to ARCHIVED. A vendor can go through both flows at different times. See Vendor Creation vs Vendor Sync.What happens when an archived Pleo Vendor matches an AS vendor?
Unarchive the Vendor and update its details if needed. If there is no matching Vendor in Pleo, create a new Vendor with
externalId, code, country, defaultCurrency, name, registrationNumber and taxRegistrationNumber. See Vendor Sync Implementation Overview.How do Vendor Sync and Vendor Creation avoid racing each other?
They must not run at the same time for one company. Use the same per company concurrency lock for both. Without it, Sync may duplicate a
DRAFT Vendor in flight or archive a Vendor that was just activated. See Sync Vendors.When can code and externalId be the same value?
Only when the AS account codes are themselves immutable. If the AS can renumber codes, use a separate AS internal record identifier as
externalId, because externalId must never change for a vendor. See Vendor Sync Data Mapping.When does Vendor Sync archive a Pleo Vendor?
Only when an active Pleo Vendor has no matching active AS vendor across at least two consecutive sync runs. Its
state then becomes ARCHIVED. The Vendor is archived, never deleted, so its history stays intact and it can be unarchived later. See Vendor Sync Workflow Guide.What should the integration do if one page fetch fails?
Abort the whole sync run and retry the full fetch on the next cycle. A partial result set can miss Vendors and cause them to be archived or recreated by mistake. See How to Fetch and Match Vendors.
How do I make a created Vendor ACTIVE instead of DRAFT?
Provide
externalId on creation. Pleo then sets state to ACTIVE automatically. If you omit it, the Vendor is DRAFT, which belongs to the Vendor Creation flow, not Vendor Sync. See How to Create Vendors.What should I do if the Vendor is already ACTIVE when I call the activate endpoint?
Treat the call as a no-op, not an error. This can happen if a previous sync run partially completed. The partial failure and unknown outcome handling from How to Create Vendors also applies here. See How to Unarchive Vendors.
Which values must a PUT update include for unchanged Vendor fields?
Include the current values for every field, including
externalId and state. Only the fields that changed get new values. In the example, state is sent as ACTIVE. See How to Update Vendors.How many sync runs must a Vendor be unmatched before it is archived?
At least two consecutive sync runs. A single fetch can look incomplete because of replica lag, concurrent edits or pagination drift. Do not archive a Vendor the first time it appears unmatched. See How to Archive Vendors.
Level 4: Vendor Creation
How does the integration report the AS identifiers back to Pleo?
It reports the
code and externalId back to Pleo with POST :activate. Then the vendor changes from DRAFT to ACTIVE. The integration finds new DRAFT vendors by webhook or scheduled polling. See Vendor Creation Overview.Why are webhooks preferred over polling for draft vendors?
Webhooks notify the integration immediately. Polling can add a delay of up to 5 minutes before a new draft vendor is seen. See Detect Draft Vendors.
Why must the integration activate a vendor after it creates the record in the AS?
Without activation, the vendor stays in
DRAFT in Pleo even though it now exists in the AS. Activation closes the loop and lets the blocked export succeed. See Vendor Creation Workflow Guide.How does a bookkeeper create a new Vendor in the Pleo Web App?
Open the Vendor drop-down on an expense in Accounting, Export. Click the create option, fill in the details and click Create. See How to Create Vendors in Pleo.
Which field tells me when to stop paginating the DRAFT Vendor search?
Check
hasNextPage. It is the only reliable signal. endCursor can still be a non-null string on the last page. While hasNextPage is true, pass endCursor as the after parameter on your next request. See How to Detect Draft Vendors.Why must a retry not match an existing AS vendor by name?
Two distinct vendors can share a name, which gives a false positive. The AS can also normalise the name on save, which gives a false negative. Store the Pleo
id in a custom reference or memo field instead. See How to Create a Vendor in the AS.What should I do if the activate call fails or times out?
Do not repeat the AS creation step, because the record already exists there and you would create a duplicate. Store
externalId and code when creation succeeds. On retry, call activate again with those values. See How to Activate a Vendor in Pleo.