Tu sistema (ERP, nómina o báscula) envía cada día las Tn facturadas, las horas pagadas y la chatarra de cada unidad. Rebar Performance las guarda en el registro diario y calcula solo el rendimiento. Si el admin lo permite, tu sistema también lee los datos (punto 9).
1. Lo que necesitas
Dato
Valor
Dónde se obtiene
Dirección de envío
Igual para todos los clientes.
Dirección de lectura
Igual para todos los clientes (punto 9).
Clave pública (apikey)
Igual para todos los clientes.
Clave API de tu empresa (x-api-key)
rp_live_…
La genera el admin en Configuración › Integración API. Se ve completa una sola vez.
Código de cada unidad
p. ej. CD-01
El admin pone en Configuración › Integración API el mismo código que usa tu ERP.
2. Enviar datos
Un POST en JSON con una lista registros de hasta 500 filas:
La respuesta llega al momento con el resultado de cada fila (punto 5).
3. Campos de cada fila
Campo
Obligatorio
Regla
fecha
Sí
Día de producción en hora local de la planta, AAAA-MM-DD. No puede ser futura.
unidad
Sí
Código de la unidad, igual que en Configuración (no distingue mayúsculas).
tn
No
Tn facturadas del día, en toneladas métricas (1 Tn = 1,000 kg). 0 o más.
horas
No
Horas pagadas del día en esa unidad, con decimales (7.5). Mayor que 0.
chatarra
No
Tn de chatarra del día. 0 o más.
lb · chatarra_lb
No
Lo mismo en libras, en vez de tn y chatarra: la app los pasa a Tn (1 lb = 0.45359237 kg). En una fila, o tn o lb (y o chatarra o chatarra_lb). Ejemplo: {"fecha":"2026-11-04","unidad":"CB-01","lb":84500,"horas":40,"chatarra_lb":1360}.
Cada fila trae al menos uno de los tres datos. Los números van como número (52.4) o como texto ("52.4"), con punto decimal. Lo que no se envía no se toca.
Unidades medidas en unidades (U/H), por ejemplo el roscado
Una unidad configurada en Unidades · U/H recibe unidades por diámetro y horas, sin tn ni chatarra:
Unidades del día por diámetro: la clave es el diámetro como figura en la unidad en Configuración ("4" o "#4" para el #4 de ASTM, "12" para Ø12) y el valor, un número entero, 0 o más.
horas
No
Horas pagadas del día, como en las unidades en Tn.
Un diámetro que no se envía conserva sus unidades (para dejarlo en 0, envía 0). Lo que llega a medias espera como en Tn: «Faltan unidades» o «Faltan horas».
Con dos normas (por ejemplo ASTM y NMX): los diámetros de la primera norma van como siempre ("4"); los de la segunda, con su norma delante y una barra vertical: "nmx|4" (también vale "NMX|#4").
Las Tn, las horas y la chatarra pueden llegar en envíos distintos, por ejemplo las Tn del ERP a las 6:00 y las horas de la nómina a las 7:00:
{"registros":[{"fecha":"2026-10-14","unidad":"ML-01","tn":18.4}]} ← 6:00 · queda «pendiente»
{"registros":[{"fecha":"2026-10-14","unidad":"ML-01","horas":30}]} ← 7:00 · se crea el registro
El registro del día aparece en la app cuando ya tiene Tn y horas. Mientras tanto la app muestra «Faltan horas · Recibido por API: 18.40 Tn».
Se guardó lo recibido; faltan las Tn (o las unidades) o las horas (detalle dice cuál).
omitido
Ese día se cargó o se corrigió a mano en la app: la API ya no lo cambia (unidades con corrección manual «Permitida»; en las «Bloqueadas» manda la API).
error
La fila no se guardó; detalle dice por qué. Las demás filas sí se guardan.
6. Errores
Rechazan todo el envío (no se guarda nada):
HTTP
Motivo
401
Falta la clave API, o es inválida o fue revocada.
403
La integración API no está activa para tu empresa, o la suscripción venció.
400
JSON mal escrito, registros no es una lista o está vacía.
404
El cuerpo no trae registros (o trae un campo con otro nombre).
413
Más de 500 filas en un envío.
Afectan solo a una fila (estado: "error"): código de unidad desconocido, fecha mal escrita o futura, falta unidad, número negativo o no numérico, horas en 0, fila sin tn, horas ni chatarra.; en una unidad en unidades, tn o chatarra, un diámetro que la unidad no tiene o unidades con decimales; en una unidad en Tn, unidades; un día posterior al cierre de su planta / obra (cerrada o terminada en Configuración: PLANTA_CERRADA, con su último día).
7. Probar sin guardar
Añade "prueba": true al cuerpo: la app revisa todo y responde igual, pero no guarda nada. Úsalo en la puesta en marcha.
Envía una vez al día, después del cierre de turno, los datos de ayer.
Reenviar los últimos 7 días es seguro: un registro por unidad y día, sin duplicados.
Para cargar el histórico, envía por bloques de 500 filas.
Guarda la clave API solo en tu servidor, nunca en una página web ni en una app. Si se filtra, el admin genera otra en Configuración y la anterior deja de funcionar.
Si tu sistema no permite cabeceras personalizadas, envía la clave en el cuerpo: {"clave": "rp_live_…", "registros": [...]}.
9. Leer los datos
Con la misma clave, tu sistema también puede leer los datos de la app: los registros diarios y, con el Advanced Tracker, las planillas y las horas de cada empleado. La lectura viene apagada: el admin la activa en Configuración › Integración API › Lectura de datos.
Un POST a , con las mismas cabeceras, y el rango de fechas:
Campo
Obligatorio
Regla
desde · hasta
Sí
AAAA-MM-DD, los dos días incluidos. Hasta 93 días por consulta.
planta
No
Solo esa planta / obra, por su nombre (no distingue mayúsculas).
unidad
No
Solo esa unidad, por su código (el de Configuración) o su nombre.
codigo_obra
No
Solo ese código de obra.
peso
No
"tn" (por defecto) o "lb": los pesos en libras y el rendimiento en LB/H.
«planta» u «obra», y el código de obra de esa unidad (vacío si no tiene).
codigo_erp
El código de la unidad en Configuración › Integración API.
tn · horas · kg_h · chatarra
Tn facturadas, horas pagadas, el rendimiento (KG/H) y la chatarra del día (vacía si no se pesó). Con "peso": "lb": lb, lb_h y chatarra_lb.
"medida": "u"
Una unidad medida en unidades (roscado): unidades por diámetro, total_unidades y u_h, en vez de Tn y chatarra.
fuente
«manual», «api» (llegó por la API) o «api_corregido» (llegó por la API y se corrigió a mano).
planillas · empleados
Con el Advanced Tracker: las planillas del día (N° y Tn) y las horas de cada empleado, con su ID (el de tu sistema); sus sumas son las Tn y las horas del día. La lista empleados del final trae a todos, también los inactivos.
planillas en unidades
En una unidad medida en unidades (roscado), cada planilla trae sus unidades por diámetro y su total, en vez de Tn: {"numero": "P-1190", "unidades": {"4": 600, "8": 240}, "total_unidades": 840}. Sus sumas son las unidades del día.
Errores: 401 (falta la clave, o es inválida o revocada) · 403 (la integración API no está activa o la lectura no está permitida) · 400 (faltan las fechas, más de 93 días, una planta o unidad desconocida, peso distinto de «tn» y «lb») · 429 (más de 120 consultas en una hora).
Para mantener tu sistema al día: cada noche, lee los últimos 7 días y reemplaza lo que tengas de esos días. Un día corregido en la app trae sus datos nuevos; uno borrado deja de aparecer.
Para el histórico, lee por bloques de 93 días o menos.
API connection guide
Your system (ERP, payroll or scale) sends each unit’s invoiced tonnes, paid hours and scrap every day. Rebar Performance stores them in the daily log and works out the production rate on its own. If the admin allows it, your system can also read the data (section 9).
1. What you need
Item
Value
Where to get it
Endpoint
Same for every client.
Read endpoint
Same for every client (section 9).
Public key (apikey)
Same for every client.
Your company’s API key (x-api-key)
rp_live_…
Generated by the admin in Settings › API integration. Shown in full only once.
Each unit’s code
e.g. CD-01
The admin enters in Settings › API integration the same code your ERP uses.
2. Sending data
A JSON POST with a registros list of up to 500 rows:
The response comes back straight away with the result of each row (section 5).
3. Row fields
Field
Required
Rule
fecha
Yes
Production day in the plant’s local time, YYYY-MM-DD. Can’t be in the future.
unidad
Yes
Unit code, as in Settings (case-insensitive).
tn
No
Invoiced tonnes for the day, in metric tonnes (1 Tn = 1,000 kg). 0 or more.
horas
No
Paid hours for the day in that unit, with decimals (7.5). Greater than 0.
chatarra
No
Scrap tonnes for the day. 0 or more.
lb · chatarra_lb
No
The same in pounds, instead of tn and chatarra: the app converts them to tonnes (1 lb = 0.45359237 kg). In one row, either tn or lb (and either chatarra or chatarra_lb). Example: {"fecha":"2026-11-04","unidad":"CB-01","lb":84500,"horas":40,"chatarra_lb":1360}.
Each row carries at least one of the three values. Numbers go as numbers (52.4) or as text ("52.4"), with a decimal point. Whatever you don’t send is left as it is.
Units measured in units (U/H), e.g. threading
A unit set to Units · U/H in Settings receives unidades by diameter and horas, without tn or chatarra:
The day’s units by diameter: the key is the diameter as listed for the unit in Settings ("4" or "#4" for ASTM #4, "12" for Ø12) and the value a whole number, 0 or more.
horas
No
Paid hours for the day, as for units in tonnes.
A diameter you don’t send keeps its units (to set it to 0, send 0). Partial data waits as with tonnes: “Units missing” or “Hours missing”.
With two standards (e.g. ASTM and NMX): diameters of the first standard go as usual ("4"); those of the second carry the standard first and a vertical bar: "nmx|4" ("NMX|#4" also works).
Tonnes, hours and scrap can arrive in different calls, e.g. tonnes from the ERP at 6:00 and hours from payroll at 7:00:
{"registros":[{"fecha":"2026-10-14","unidad":"ML-01","tn":18.4}]} ← 6:00 · stays "pendiente"
{"registros":[{"fecha":"2026-10-14","unidad":"ML-01","horas":30}]} ← 7:00 · the entry is created
The day’s entry shows up in the app once it has both tonnes and hours. Until then the app shows “Hours missing · Received through the API: 18.40 Tn”.
Updated: the entry already existed and a value changed.
sin_cambios
No changes: the same values arrived.
pendiente
Pending: what arrived was saved; tonnes or hours are still missing (detalle says which: faltan horas = hours missing, faltan Tn = tonnes missing, faltan unidades = units missing).
omitido
Skipped: that day was entered or corrected by hand in the app, so the API no longer changes it (units with manual correction “Allowed”; on “Blocked” units the API always wins).
error
The row wasn’t saved; detalle says why (in Spanish, see section 6). The other rows are still saved.
6. Errors
Rejecting the whole call (nothing is saved):
HTTP
Reason
401
The API key is missing, invalid or revoked.
403
API integration isn’t active for your company, or the subscription has expired.
400
Malformed JSON, or registros isn’t a list or is empty.
404
The body has no registros (or a field with a different name).
413
More than 500 rows in one call.
Affecting one row only (estado: "error", detalle in Spanish):
detalle
Meaning
código de unidad desconocido: «X»
No unit has that code.
fecha mal escrita: use AAAA-MM-DD · fecha no válida · fecha futura
Date not in YYYY-MM-DD, not a real date, or in the future.
falta «unidad»
The row has no unit code.
«tn» debe ser un número · «tn» no puede ser negativo
Tonnes not numeric or negative (same for horas and chatarra).
«horas» debe ser mayor que 0
Hours must be greater than 0.
la fila no trae tn (o lb), horas ni chatarra
The row has none of the three values.
envíe «tn» o «lb», no los dos
The row brings tonnes and pounds: send one of them (the same for chatarra and chatarra_lb).
esta unidad se mide en unidades: envíe «unidades» por diámetro, sin «tn» ni «chatarra»
The unit is measured in units: send unidades by diameter, without tn or chatarra.
esta unidad se mide en Tn: envíe «tn», no «unidades»
The unit is measured in tonnes: send tn, not unidades.
diámetro desconocido para esta unidad: «X»
That diameter isn’t one of the unit’s diameters (see Settings).
las unidades de «X» deben ser un número entero entre 0 y 1000000 · «unidades» debe ser un objeto por diámetro
Units must be whole numbers from 0 to 1,000,000, sent as an object by diameter.
la fila no trae unidades ni horas
The row has neither units nor hours.
no se pudo guardar: PLANTA_CERRADA: «X» está cerrada desde el AAAA-MM-DD…
The unit’s plant / site was closed (finished) in Settings: days after its last day can’t be sent.
7. Testing without saving
Add "prueba": true to the body: the app checks everything and answers the same way, but saves nothing. Use it while setting up.
Send once a day, after the shift closes, with yesterday’s data.
Re-sending the last 7 days is safe: one entry per unit and day, no duplicates.
To load history, send it in batches of 500 rows.
Keep the API key on your server only, never in a web page or an app. If it leaks, the admin generates a new one in Settings and the old one stops working.
If your system can’t set custom headers, send the key in the body: {"clave": "rp_live_…", "registros": [...]}.
9. Reading data
With the same key, your system can also read the app’s data: the daily log and, with the Advanced Tracker, the control codes and each employee’s hours. Reading starts turned off: the admin turns it on in Settings › API integration › Data reading.
A POST to , with the same headers, and the date range:
Field
Required
Rule
desde · hasta
Yes
From and to, YYYY-MM-DD, both days included. Up to 93 days per call.
planta
No
Only that plant / site, by its name (case-insensitive).
unidad
No
Only that unit, by its code (the one in Settings) or its name.
codigo_obra
No
Only that job ID.
peso
No
"tn" (default) or "lb": weights in pounds and the rate in LB/H.
“planta” (plant) or “obra” (site), and that unit’s job ID (empty if none).
codigo_erp
The unit’s code in Settings › API integration.
tn · horas · kg_h · chatarra
Invoiced tonnes, paid hours, the production rate (KG/H) and the day’s scrap (empty if not weighed). With "peso": "lb": lb, lb_h and chatarra_lb.
"medida": "u"
A unit measured in units (threading): unidades per diameter, total_unidades and u_h, instead of tonnes and scrap.
fuente
“manual”, “api” (came through the API) or “api_corregido” (came through the API and was corrected by hand).
planillas · empleados
With the Advanced Tracker: the day’s control codes (number and tonnes) and each employee’s hours, with their ID (your system’s); their sums are the day’s tonnes and hours. The empleados list at the end has everyone, inactive employees included.
planillas in units
In a unit measured in units (threading), each control code comes with its units per diameter and their total, instead of tonnes: {"numero": "P-1190", "unidades": {"4": 600, "8": 240}, "total_unidades": 840}. Their sums are the day’s unidades.
Errors: 401 (missing, invalid or revoked key) · 403 (API integration not active, or reading not allowed) · 400 (missing dates, more than 93 days, an unknown plant or unit, peso other than “tn” or “lb”) · 429 (more than 120 calls in an hour).
To keep your system up to date: every night, read the last 7 days and replace what you have for those days. A day corrected in the app comes with its new data; a deleted one no longer appears.