Accounts Payable API duplicate invoice detection fails for multi-line invoices

We’re submitting invoices via the accounts payable API and the duplicate detection logic is rejecting valid invoices when they have multiple line items. Single-line invoices process fine, but multi-line invoices from the same vendor get flagged as duplicates even though invoice numbers are different.

This is blocking our automated AP processing for about 200 invoices daily. The error message mentions vendor ID inclusion but doesn’t specify what’s wrong.


POST /accounts-payable/invoices
{"invoice_number": "INV-2025-0847", "vendor": "V-12345"}
Error: "Duplicate invoice detected - matches existing record"

We verified in the UI that INV-2025-0847 doesn’t exist. Is there a known issue with how the API handles invoice deduplication logic for multi-line entries?

Check your invoice line item descriptions. If they’re generic or empty, Workday’s duplicate detection becomes overly aggressive. We had this exact issue and resolved it by ensuring each line has a unique description that includes the invoice number or line sequence. This helps the deduplication logic distinguish between similar line items across different invoices.

I think the issue is with how you’re passing the vendor ID. Workday expects the internal Vendor_Reference_ID, not your external vendor code. If you’re using V-12345 as a string, the API might be matching it against multiple vendor records or failing to resolve it properly.

Try using the GET /vendors endpoint first to retrieve the proper Workday vendor reference, then use that in your invoice submission. The vendor ID inclusion requirement is strict for duplicate detection to work correctly.

The duplicate detection in Workday AP API checks more than just invoice number. It creates a hash based on vendor ID, invoice number, total amount, and invoice date. If any existing invoice has the same combination, it triggers the duplicate flag regardless of line item count.

Multi-line invoices have a known quirk with duplicate detection. The API calculates a separate hash for each line item when checking duplicates, not just the header. If any line item matches an existing invoice line (same GL account, amount, description), it can trigger a false positive.

This is especially problematic if you have standard line items like shipping charges or tax lines that appear across multiple invoices with the same amounts. The deduplication logic treats them as potential duplicates.

After working through this scenario multiple times, here’s the complete solution for multi-line invoice duplicate detection:

Invoice Deduplication Logic: Workday’s AP API uses a composite key for duplicate detection that includes:

  • Vendor Reference ID (internal Workday ID, not external code)
  • Invoice Number
  • Invoice Date
  • Total Amount (sum of all line items)
  • Line Item Hash (MD5 of concatenated line descriptions, GL codes, and amounts)

The line item hash is where multi-line invoices fail. If you submit an invoice with generic line descriptions (“Service Fee”, “Materials”, etc.) that match patterns in existing invoices, the API flags it as a duplicate even if the invoice number is unique.

Vendor ID Inclusion Requirements: You must pass the vendor reference in the correct format. The API expects:


{
  "vendor": {
    "id": "abc123def456",
    "type": "Vendor_Reference_ID"
  },
  "invoice_number": "INV-2025-0847"
}

Not just "vendor": "V-12345". The nested object structure with explicit type declaration is mandatory for proper duplicate detection. Without it, the API can’t reliably match vendor records and falls back to fuzzy matching, which causes false positives.

Automated AP Processing Fix: To resolve your 200 daily invoice blockage:

  1. Vendor ID Resolution: Pre-process invoices to fetch proper Workday vendor references:

    • Call GET /vendors?external_id=V-12345
    • Extract the Vendor_Reference_ID from response
    • Cache vendor mappings to reduce API calls
  2. Line Item Uniqueness: Enhance line descriptions to ensure uniqueness:

    • Append invoice number: “Service Fee - INV-2025-0847”
    • Include line sequence: “Materials (Line 2)”
    • Add date reference: “Consulting - May 2025”
  3. Deduplication Override: For legitimate duplicate scenarios (revised invoices, corrections), use the force_create parameter:


POST /accounts-payable/invoices?force_create=true

This bypasses duplicate detection but should only be used when you’ve verified the invoice is genuinely new.

  1. Pre-submission Validation: Before API submission, query existing invoices:

GET /accounts-payable/invoices?vendor_id={id}&invoice_number={num}&date_range=30days

If results return empty, proceed with submission. If matches found, compare line items to determine if it’s a true duplicate or false positive.

The root cause in your case is likely the vendor ID format issue combined with generic line descriptions. Multi-line invoices with standard line items (shipping, tax, materials) trigger the deduplication algorithm more aggressively because the line item hash matches patterns across multiple invoices.

Implement the vendor reference object structure first - that alone should resolve 60-70% of your false positives. Then enhance line descriptions for the remaining cases. We went from 15% rejection rate to under 1% after making these changes to our automated AP processing workflow.

I pulled the vendor reference from the API and we’re using the correct Workday ID format. Still getting duplicates flagged. Could this be related to how line items are structured in the payload? We’re sending all lines in a single array.