
Jorge Olguin (super carnicerias hernandez sa de cv) asked a question.
I have this definition
and send this in postman's body with text type, and headers Content-type and Accept both as "application/json", to the address: xxxxx.mx:9030/rest/s1/v06Ticket/11
- {"prodsTicket": {
- "ttTicket": [
- {
- "Ticket": 35863,
- "FormaDePago": "M",
- "Sucursal": 50,
- "Almacen": 50,
- "Cliente": "VM",
- "Vendedor": 1350,
- "Monto": 113.00,
- "Fecha": "2026-07-14",
- "Caja": 51,
- "StatusDoc": "P",
- "Serie": "A",
- "Impuesto1": 0.00,
- "Impuesto2": 0.00,
- "Hora": "15:59:24",
- "Factura": 0,
- "Saldo": 0.00,
- "EnviadoFecha": null,
- "EnviadoHora": "",
- "EnviadoRepartidor": 0,
- "StatusDevolucion": false,
- "EnviarNombre": "",
- "EnviarDireccion": "",
- "NumImpresion": 1,
- "Efectivo": 200.00,
- "ConDevCan": 0,
- "ContraRecibo": 0,
- "Descuento": 0.00,
- "FechaFactura": null,
- "VentaTicket": 35873,
- "EnviarRuta": 0,
- "Precio": 0,
- "Corte": 0,
- "Observaciones": "",
- "SaldoXFacturar": 0.00,
- "FacturadoAMostrador": true,
- "HoraI": 57564,
- "PV": 1,
- "GuiaEmbarque": "",
- "Transporte": "",
- "FechaEmbarque": null,
- "Articulos": 1.36,
- "Promocion": 0,
- "ClienteEsNuevo": false,
- "Procesos": 0.00
- }
- ],
- "ttTicketD": [
- {
- "Sucursal": 50,
- "Almacen": 50,
- "Serie": "A",
- "Ticket": 35863,
- "Fecha": "2026-07-14",
- "NumPartida": 1,
- "Articulo": "MILANESA CERDO",
- "Linea": "Cer",
- "Sublinea": "Cer",
- "Empaque": "KG",
- "Cantidad": 0.710,
- "Precio": 86.00,
- "Impuesto1": 0.00,
- "Impuesto2": 0.00,
- "StatusTicketD": "P",
- "StatusDevolucion": false,
- "Costo": 72.00000000,
- "Observaciones": "",
- "Comision": 0.00,
- "NumSeries": "",
- "SubTotal": 61.00,
- "Cliente": "VM",
- "PesoBruto": 0.70,
- "Etiqueta": "MILANHERSA",
- "Control#": 0.00000,
- "PV": 1
- },
- {
- "Sucursal": 50,
- "Almacen": 50,
- "Serie": "A",
- "Ticket": 35863,
- "Fecha": "2026-07-14",
- "NumPartida": 2,
- "Articulo": "ESPECIALTRIPA",
- "Linea": "PRO",
- "Sublinea": "PRO",
- "Empaque": "KG",
- "Cantidad": 0.650,
- "Precio": 80.00,
- "Impuesto1": 0.00,
- "Impuesto2": 0.00,
- "StatusTicketD": "P",
- "StatusDevolucion": false,
- "Costo": 70.00000000,
- "Observaciones": "",
- "Comision": 0.00,
- "NumSeries": "",
- "SubTotal": 52.00,
- "Cliente": "VM",
- "PesoBruto": 0.65,
- "Etiqueta": "CHORIZO ESPECIAL TRIPA",
- "Control#": 0.00000,
- "PV": 1
- }
- ],
- "ttTicketPago": [
- {
- "Fecha": "2026-07-14",
- "Ticket": 35863,
- "Monto": 113.00,
- "FormaDePago": "M",
- "Cliente": "VM",
- "Documento": "EFE",
- "Caja": 51,
- "Nomina": 1350,
- "Sucursal": 50,
- "Serie": "A",
- "Factura": 0,
- "TipoPago": "EFE",
- "Corte": 0,
- "Hora": 57595
- }
- ]
- }}
on response, I got:
{
"_errors": [
{
"_errorMsg": "ERROR condition: Missing one or more required arguments to READ-JSON (15340) (7211)",
"_errorNum": 15340
}
]
}
And inside the method, I do:
- METHOD PUBLIC VOID RegistraTicket(
- INPUT xFlag AS INTEGER,
- INPUT xpayload AS LONGCHAR,
- OUTPUT TABLE ttResponse // RESPUESTA
- ):
-
- OUTPUT STREAM salida TO value("C:\t\tickets.txt").
- PUT STREAM salida UNFORMATTED "----------Inicio del payload del ticket: " NOW SKIP.
- EXPORT STREAM salida xPayLoad.
- PUT STREAM salida UNFORMATTED "----------Fin del payload del ticket (bytes:" LENGTH(xPayLoad) ")" SKIP.
-
- PUT STREAM salida SKIP(2) "Param: Flag:" xFlag SKIP.
-
- EMPTY TEMP-TABLE ttResponse.
-
-
- DATASET prodsTicket:READ-JSON("LONGCHAR", xPayload, "EMPTY").
-
- more handling....
on the file created, I got:
----------Inicio del payload del ticket: 14/07/2026 16:52:19.342-06:00
----------Fin del payload del ticket (bytes:?)
Param: Flag: 11
Fin Ticket
the 11 value on flag parameter assures that endpoint is reached, and path parameter is delivered... the problem is the Body definition, I assume...
Any clue?
Thanks
I had to move the body link on the left side, from var xpayload, to BODY row