Restofy Docs
Secuencias de facturación POST

Listar secuencias de facturación

POST /api/invoice-sequences/list-invoice-sequences

Descripción

Devuelve las secuencias de facturación activas del restaurante.

Detalles

Retorna las secuencias activas con su caja, tipo de documento, numeración, consecutivo vigente, vigencia y secuencia de reemplazo. Admite búsqueda por nombre o prefijo y filtro por tipo de documento. Las secuencias pausadas se consultan por separado.

Permisos requeridos

admin.module

Request

Nombre Tipo Requerido Reglas
search string No
max:100
documentTypeId int No
min_value:1

Paginación

defaultLimit 50
maxLimit 100
allowedSorts name
defaultSort name
defaultDir asc
withTotal true

Ejemplo de request

curl -X POST https://restofy.pro/api/invoice-sequences/list-invoice-sequences \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <accessToken>" \
  -H "X-Tenant-Key: <tenantKey>"

Los valores son demo: reemplázalos por datos reales del negocio.

Ejemplo de respuesta

Actualizado: 2026-09-08T16:35:34Z
HTTP 200

Request

[]

Response

{
    "success": true,
    "message": "Operación realizada correctamente",
    "data": {
        "invoiceSequences": [
            {
                "invoiceSequenceId": 2,
                "name": "Secuencia Nota Crédito",
                "cashRegisterId": 1,
                "cashRegisterName": "Caja Principal",
                "documentTypeId": 5,
                "documentTypeName": "Nota crédito POS",
                "documentKind": "credit_note",
                "isElectronic": 0,
                "prefix": "NC",
                "suffix": null,
                "paddingLength": 4,
                "startValue": 1,
                "currentValue": 0,
                "maxValue": 99999,
                "validTo": null,
                "replacedBySequenceId": null,
                "replacedBySequenceName": null,
                "isReplacement": 0,
                "isCreditNoteRef": 1,
                "isRoutingTarget": 0,
                "status": "active",
                "isActive": 1,
                "isAvailable": 1
            },
            {
                "invoiceSequenceId": 1,
                "name": "Secuencia POS",
                "cashRegisterId": 1,
                "cashRegisterName": "Caja Principal",
                "documentTypeId": 1,
                "documentTypeName": "Factura POS",
                "documentKind": "invoice",
                "isElectronic": 0,
                "prefix": "F",
                "suffix": null,
                "paddingLength": 4,
                "startValue": 1,
                "currentValue": 1,
                "maxValue": 99999,
                "validTo": null,
                "replacedBySequenceId": null,
                "replacedBySequenceName": null,
                "isReplacement": 0,
                "isCreditNoteRef": 0,
                "isRoutingTarget": 0,
                "status": "active",
                "isActive": 1,
                "isAvailable": 1
            }
        ],
        "pagination": {
            "page": 1,
            "limit": 50,
            "total": 2,
            "totalPages": 1,
            "hasNext": false,
            "hasPrev": false
        }
    }
}