Skip to main content

Export Bills

GET 

/api/bills/list/export

Export landed cost bills as XLSX or CSV. The response is a binary file download, not JSON.

Required scope: purchase-orders:read

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Authentication: Requires Bearer token. Scope: purchase-orders (read/write).

Parameters

  • formatxlsx (default) or csv
  • content_modesummary (one row per bill, default) or line_items (one row per bill line; bill columns repeat per line, line-item columns are appended)
  • scope — which bills to export:
    • all — every bill, ignoring active filters
    • filtered — bills matching the current filter[...] / filter_groups params (default)
    • current_page — only the current page (honors page / per_page / sort)
    • selected — only the bills in ids
  • columns — comma-separated bill column keys to include (preserves order). Omit for all columns. Available keys: id, invoice_number, invoice_date, supplier_name, link_type, link_reference, proration_strategy, currency_code, currency_rate, line_count, subtotal, tax_total, grand_total, allocated_amount, unallocated_amount, allocation_status, cost_categories, has_accounting_transaction, source, settlement_reference_count, created_at, updated_at
  • ids — comma-separated bill IDs (required when scope=selected)

All filter[...], filter_groups, and sort params from the List Bills endpoint also apply when scope=filtered.

In line_items mode these line columns are always appended: Line Description, Line Cost Category, Line Qty, Line Amount, Line Extended, Line Tax Rate.

Response

Binary file download:

  • XLSX: Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
  • CSV: Content-Type: text/csv
  • Filename: landed-cost-bills-{timestamp}.{ext} (summary) or landed-cost-bills-detail-{timestamp}.{ext} (line_items)

Request

Responses

OK

Response Headers
    Content-Type
    Content-Disposition