PUT
/terminales
🔒 Requiere clave de API
Ejemplo
curl -X PUT "https://fenix.kalkulusapp.com/api/terminales" \
-H "X-API-KEY: TU_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"id": "2",
"sucursal_id": "1",
"nombre": "Caja 2 Renombrada"
}'
const cuerpo = {
"id": "2",
"sucursal_id": "1",
"nombre": "Caja 2 Renombrada"
};
const respuesta = await fetch("https://fenix.kalkulusapp.com/api/terminales", {
method: "PUT",
headers: {
"X-API-KEY": "TU_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify(cuerpo)
});
const datos = await respuesta.json();
import requests
import json
cuerpo = json.loads(r"""
{
"id": "2",
"sucursal_id": "1",
"nombre": "Caja 2 Renombrada"
}
""")
respuesta = requests.request(
"PUT",
"https://fenix.kalkulusapp.com/api/terminales",
headers={
"X-API-KEY": "TU_API_KEY",
"Content-Type": "application/json"
},
json=cuerpo,
)
print(respuesta.json())
<?php
$ch = curl_init("https://fenix.kalkulusapp.com/api/terminales");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"X-API-KEY: TU_API_KEY",
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"id": "2",
"sucursal_id": "1",
"nombre": "Caja 2 Renombrada"
}
JSON,
]);
$respuesta = json_decode(curl_exec($ch), true);
curl_close($ch);
Cuerpo de la solicitud application/json
| Campo | Tipo |
|---|---|
| id obligatorio | texto |
| sucursal_id obligatorio | texto |
| nombre obligatorio | texto |
| detalle | texto |
Actualizar terminal
{
"id": "2",
"sucursal_id": "1",
"nombre": "Caja 2 Renombrada"
}
Respuestas
200Terminal actualizada
401Unauthorized
403Ruta no disponible