Get order history
POST/api/branchs/history/orders
Returns the merchant's orders with their current status, courier and recipient, plus the period's totals (orders, in route, completed and cancelled).
Each order includes its public tracking URL in tracking.URLtracking.
The body is required (without a body it returns 500), but all its fields are optional: with {} it returns the first page (20 orders), from the most recent to the oldest.
With export: 1 it also generates an Excel file with all the results and returns its URL in export.URLDataExcel.
Request
Responses
- 200
- 400
- 401
- 500
Order history retrieved. The orders are in data.data and the pagination in data.pagination.
Invalid filter, sorting or pagination. Only the first error found is reported, with the format Error en campo "<campo>": <motivo> (error in field "filters. prefix.
Possible reasons (in Spanish): debe ser 0 o 1 (must be 0 or 1; export), debe ser formato YYYY-MM-DD válido (must be a valid YYYY-MM-DD date), dateFrom no puede ser mayor a dateTo (dateFrom cannot be later than dateTo; field dateRange), debe ser un UUID válido (must be a valid UUID), debe ser 0, 1, true o false (must be 0, 1, true or false), decimal inválido (máx 2 decimales) (invalid decimal, max 2 decimals), texto inválido (invalid text; comprobante, nomDestinatario), valor inválido (invalid value; pagination.page, pagination.limit), campo inválido (invalid field; order.by) and debe ser ASC o DESC (must be ASC or DESC; order.direction).
The token is missing, expired (it lasts 15 minutes) or invalid. Log in again to get a new one.
Internal error