Get benefit history
POST/api/branchs/history/benefits
Returns the benefits the merchant received, with their order, courier and the balance movement they generated. For example, the shipping cashback (CBE): a percentage of the shipping cost returned to the balance when the order is delivered, according to the merchant's subscription tier.
Includes the period's totals: number and amount of benefits, current and previous month amount, reversed amount and a breakdown by type.
Every body field is optional: without a body it returns the first page (20 benefits), 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
Benefits retrieved
Invalid filter, sorting or pagination. Only the first error found is reported, with the format Error en campo "<campo>": <motivo> (error in field "debe ser 0 o 1 (must be 0 or 1; export, as a number), debe ser un código de texto válido (máx 20 caracteres) (must be a valid text code, max 20 characters; filters.movementCode), debe ser un UUID válido (must be a valid UUID), texto inválido (máx N caracteres) (invalid text, max N characters; filters.comprobante, filters.status), debe ser una fecha válida (YYYY-MM-DD) (must be a valid date), dateFrom no puede ser mayor a dateTo (dateFrom cannot be later than dateTo), debe ser un entero mayor a 0 (must be an integer greater than 0; pagination.page), debe ser un entero entre 1 y 50 (must be an integer between 1 and 50; pagination.limit) 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