Supplier Recon Invoice Create Many
POST/v1/supplier_reconciliation/invoice/create_many
Supplier Reconciliation Invoice Create Many
Creates multiple invoices from a supplier in a single request. Each invoice undergoes mapping application and automatic reconciliation to BOL before being inserted into the system.
Request
The request is a list of SupplierInvoiceV1 objects with the following properties:
invoice_number: str
Unique invoice number provided by the supplier.
source_name: str
Name of the source system or integration providing the invoice.
supplier: OnlyExternalObject
External object representing the supplier information.
terminal: OnlyExternalObject | None
Optional external object representing the terminal location.
due_date_utc: datetime | None
Optional due date for the invoice in UTC.
due_date_local: datetime | None
Optional due date for the invoice in local timezone.
invoice_date: datetime | None
Optional date the invoice is marked with in UTC. This will be used to match to the BOL if individual BOL times are not provided.
invoice_date_local: datetime | None
Optional date the invoice is marked with in local timezone of the terminal.
details: list[SupplierInvoiceV1Detail]
List of invoice detail line items containing:
- bol_number: str | None - Optional bill of lading number
- bol_date: datetime | None - Optional date of the bill of lading in UTC. Will be used to match the invoice to BOL if provided.
- bol_date_local: datetime | None - Optional date of the bill of lading in local timezone of the terminal.
- type: InvoiceDetailType | None - Optional invoice detail type classification
- product: OnlyExternalObject | None - Optional product information
- rate: float | None - Optional unit rate
- amount: float | None - Optional line amount before total calculation
- total: float - Required total amount for the line item
- uom: str | None - Optional unit of measure
- gross_volume: float | None - Optional gross volume quantity
- net_volume: float | None - Optional net volume quantity
Response
The endpoint processes each invoice through mapping and reconciliation, then inserts them into the system. Returns:
success_count: int
Number of invoices successfully created.
failed_count: int
Number of invoices that failed to create.
errors: list[dict]
List of errors encountered, each containing:
- invoice_number: str - Invoice number that failed
- error: str - Error message describing the failure
Responses
- 200
- 422
Successful Response
Validation Error
- application/json
- Example (from schema)
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}