Registrar movimiento
curl --request POST \
--url https://api.filexpress.app/api/external/cash-registers/{id}/movements \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"type": "expense",
"amount": 20,
"description": "Compra de hielo",
"reference": "REC-12"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'expense',
amount: 20,
description: 'Compra de hielo',
reference: 'REC-12'
})
};
fetch('https://api.filexpress.app/api/external/cash-registers/{id}/movements', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.filexpress.app/api/external/cash-registers/{id}/movements"
payload = {
"type": "expense",
"amount": 20,
"description": "Compra de hielo",
"reference": "REC-12"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.filexpress.app/api/external/cash-registers/{id}/movements",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'expense',
'amount' => 20,
'description' => 'Compra de hielo',
'reference' => 'REC-12'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"status": true,
"data": {
"id": "3b8e2f10-7c4d-4a9e-b1f2-5d6c7e8f9a01",
"type": "expense",
"amount": 20,
"description": "Compra de hielo",
"reference": "REC-12",
"summary": {
"total_sales": 410,
"total_cash": 215,
"total_card": 180,
"total_other": 15,
"total_expenses": 20,
"more_income": 0,
"sales_count": 37,
"cash_movements": 1,
"expected_cash": 295
}
}
}Registrar movimiento
Ingreso (income) o gasto (expense) de efectivo en una caja abierta. Devuelve el resumen actualizado.
Permiso requerido: cash_register.operate
POST
/
cash-registers
/
{id}
/
movements
Registrar movimiento
curl --request POST \
--url https://api.filexpress.app/api/external/cash-registers/{id}/movements \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"type": "expense",
"amount": 20,
"description": "Compra de hielo",
"reference": "REC-12"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'expense',
amount: 20,
description: 'Compra de hielo',
reference: 'REC-12'
})
};
fetch('https://api.filexpress.app/api/external/cash-registers/{id}/movements', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.filexpress.app/api/external/cash-registers/{id}/movements"
payload = {
"type": "expense",
"amount": 20,
"description": "Compra de hielo",
"reference": "REC-12"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.filexpress.app/api/external/cash-registers/{id}/movements",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'expense',
'amount' => 20,
'description' => 'Compra de hielo',
'reference' => 'REC-12'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"status": true,
"data": {
"id": "3b8e2f10-7c4d-4a9e-b1f2-5d6c7e8f9a01",
"type": "expense",
"amount": 20,
"description": "Compra de hielo",
"reference": "REC-12",
"summary": {
"total_sales": 410,
"total_cash": 215,
"total_card": 180,
"total_other": 15,
"total_expenses": 20,
"more_income": 0,
"sales_count": 37,
"cash_movements": 1,
"expected_cash": 295
}
}
}Authorizations
API Key de la integración (Integraciones → Nueva Integración).
Headers
Opcional. Llave única por operación (máx. 100 caracteres, vale 24 h por integración). Un reintento con la misma llave y el mismo cuerpo devuelve la respuesta original (header Idempotent-Replayed: true) sin repetir la operación; con otro cuerpo, o mientras la primera sigue en proceso, responde 409.
Maximum string length:
100Path Parameters
ID de la caja
Body
application/json