Get Unexported Orders
POST/v1/order/unexported
Get Unexported Orders
Retrieves a list of orders that have not been exported to the ERP system yet. Limited to orders completed in the 30 days prior to the as_of date.
Request
as_of: datetime | None = None
The reference date to calculate the 30-day window backwards from. If not provided, defaults to the current date/time. Orders completed between (as_of - 30 days) and as_of will be included.
Response
Returns a list of unexported orders with the following information:
order_id: str
The unique identifier of the order.
order_number: str
The order number.
completed_date: datetime | None
The date when the order was completed.
erp_status: ERPStatus
The current ERP export status of the order (pending, staged, or errors).
error_message: str | None
If the status is 'errors', contains the error message from the last export attempt.
Responses
- 200
- 422
Successful Response
Validation Error
- application/json
- Example (from schema)
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}