Supplier Reconciliation Match And Bol Overview Ep
POST/v1/supplier_reconciliation/match_and_bol/overview
Supplier Reconciliation Match and BOL Overview
Retrieves supplier reconciliation matches plus unmatched BOLs for a given date range, with first-class ERP and order-state filtering for efficient order-scoped queries.
Designed for accrual workflows that want a fast, order-centric view of pending SR activity.
Request
from_date: datetime
Start of the query window. UTC-aware (Z-suffixed) or naive values are treated as UTC. Offset-tagged datetimes are converted to UTC via astimezone.
to_date: datetime
End of the query window. Same timezone handling as from_date.
timezone: str = "UTC"
Legacy field. Applied only to naive datetimes; offset-aware datetimes ignore this field.
statuses: list[SRInvoiceStatus] | None = None
Optional match status filter. Returns matches whose status is in the given list. Valid values: "approved", "unapproved", "unmatched", "void", "hold".
supplier_name: str | None = None
Optional supplier name filter.
invoice_number: str | None = None
Optional invoice number filter.
bol_number: str | None = None
Optional BOL number filter.
include_unmatched_invoices: bool = True
Gates the fast order-first path. When False and both erp_statuses and order_states are provided, the fast path engages — invoice-only matches (no associated BOL) are excluded as a side effect of the order-scoped query. Otherwise the request falls back to the slow path, which does not enforce this flag and will return invoice-only matches regardless.
include_unmatched_bols: bool = True
Orthogonal to include_unmatched_invoices. When True, adds rows for BOLs that exist in the date range but are not linked to any supplier invoice match.
erp_statuses: list[ERPStatus] | None = None
ERP status filter applied to returned rows. Pass ["pending", "errors", "staged"] for typical accrual use. Works on both fast and slow paths.
order_states: list[OrderState] | None = None
Order state filter. Only takes effect on the fast path (requires include_unmatched_invoices=False plus both erp_statuses and order_states). Ignored on the slow path. Pass ["complete"] to restrict accrual to completed orders.
Response
Returns rows (match + unmatched-BOL), unmapped_supplier_names, unmapped_invoice_count, and params.
Responses
- 200
- 422
Successful Response
- application/json
- Example (from schema)
{
"rows": [
{
"timezone_data": {},
"id": "string",
"supplier_id": "string",
"supplier_name": "string",
"status": "approved",
"bol_date": "2026-05-11T19:25:52.558Z",
"bol_numbers": [
{
"number": "string",
"id": "string"
}
],
"invoice_numbers": [
{
"number": "string",
"id": "string"
}
],
"invoice_due_date": "2026-05-11T19:25:52.558Z",
"invoice_date": "2026-05-11T19:25:52.558Z",
"invoice_received_date": "2026-05-11T19:25:52.558Z",
"invoice_bol_date": "2026-05-11T19:25:52.558Z",
"order_numbers": [
{
"number": "string",
"id": "string"
}
],
"invoice_total": 0,
"bol_total": 0,
"suppliers": [
"string"
],
"has_multiple_suppliers": false,
"terminals": [
"string"
],
"terminal_states": [
"string"
],
"destinations": [
{
"site_name": "string",
"site_number": "string"
}
],
"destination_states": [
"string"
],
"products": [
"string"
],
"bol_carrier": "string",
"source_name": "string",
"assignee": {
"username": "string",
"name": "string"
},
"details": [
{
"invoice_id": "string",
"invoice_number": "string",
"invoice_due_date": "2026-05-11T19:25:52.559Z",
"invoice_date": "2026-05-11T19:25:52.559Z",
"creation_date": "2026-05-11T19:25:52.559Z",
"supplier": {
"source_name": "string",
"internal_id": "string",
"internal_name": "string",
"alternate_matches": [
{
"internal_id": "string",
"internal_name": "string"
}
]
},
"terminal": {
"source_name": "string",
"internal_id": "string",
"internal_name": "string",
"alternate_matches": [
{
"internal_id": "string",
"internal_name": "string"
}
]
},
"products": [
{
"source_name": "string",
"internal_id": "string",
"internal_name": "string",
"alternate_matches": [
{
"internal_id": "string",
"internal_name": "string"
}
]
}
],
"bol_numbers": [
{
"number": "string",
"id": "string"
}
],
"bol_date": "2026-05-11T19:25:52.559Z",
"order_numbers": [
{
"number": "string",
"id": "string"
}
],
"bol_total": 0,
"invoice_total": 0
}
],
"warnings": [
{
"type": "supplier_mismatch",
"threshold": 0,
"variance": 0,
"extra_date": {}
}
],
"po_numbers": [
"string"
],
"hold_reason": "string",
"hold_date": "2026-05-11T19:25:52.559Z",
"hold_by": "string",
"export_status": "sent"
}
],
"unmapped_supplier_names": [
"string"
],
"unmapped_invoice_count": 0,
"params": [
{
"title": "string",
"datatype": "string",
"filter_column": "string",
"options": [
null
]
}
]
}
Validation Error
- application/json
- Example (from schema)
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}