curl --request POST \
--url https://api.finsync.ar/api/mesas/{id}/periods/{periodId}/close \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"count_quote": 47000,
"closed_at": "2026-04-02T03:00:00.000Z"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({count_quote: 47000, closed_at: '2026-04-02T03:00:00.000Z'})
};
fetch('https://api.finsync.ar/api/mesas/{id}/periods/{periodId}/close', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({count_quote: 47000, closed_at: '2026-04-02T03:00:00.000Z'})
};
fetch('https://api.finsync.ar/api/mesas/{id}/periods/{periodId}/close', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.finsync.ar/api/mesas/{id}/periods/{periodId}/close"
payload = {
"count_quote": 47000,
"closed_at": "2026-04-02T03:00:00.000Z"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"mesa": {
"id": 1,
"company_id": 42,
"name": "ARS/USD desk",
"local_currency": "ARS",
"quote_currency": "USD",
"costing_method": "fifo",
"account_ids": [
10,
11
],
"created_by": null,
"created_at": "2026-03-01T00:00:00.000Z",
"updated_at": "2026-03-01T00:00:00.000Z",
"deleted_at": null
},
"period": {
"id": 5,
"mesa_id": 1,
"status": "closed",
"opened_at": "2026-03-01T00:00:00.000Z",
"closed_at": "2026-03-10T18:00:00.000Z",
"opening_local": 1000000,
"opening_fx": 1200,
"closing_local": 250000,
"closing_avg_fx": 1210,
"pnl_local": 15000,
"pnl_quote": 12.4,
"closing_report": null,
"opened_by": null,
"closed_by": null,
"created_at": "2026-03-01T00:00:00.000Z",
"updated_at": "2026-03-01T00:00:00.000Z"
}
}{
"error": "Mesas module not enabled for this company",
"code": "MESAS_DISABLED"
}Close a mesa period
Freezes inventory, average cost, P&L, and the full report JSON. closed_by is null for API-key closes. Optional closed_at (ISO) defaults to 23:00 ART of the opened desk day (02:00Z the next UTC calendar day), not now; must be >= opened_at and must not overlap another period on the same mesa. Windows are [opened_at, closed_at): the next period may open at exactly this closed_at.
curl --request POST \
--url https://api.finsync.ar/api/mesas/{id}/periods/{periodId}/close \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"count_quote": 47000,
"closed_at": "2026-04-02T03:00:00.000Z"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({count_quote: 47000, closed_at: '2026-04-02T03:00:00.000Z'})
};
fetch('https://api.finsync.ar/api/mesas/{id}/periods/{periodId}/close', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({count_quote: 47000, closed_at: '2026-04-02T03:00:00.000Z'})
};
fetch('https://api.finsync.ar/api/mesas/{id}/periods/{periodId}/close', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.finsync.ar/api/mesas/{id}/periods/{periodId}/close"
payload = {
"count_quote": 47000,
"closed_at": "2026-04-02T03:00:00.000Z"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"mesa": {
"id": 1,
"company_id": 42,
"name": "ARS/USD desk",
"local_currency": "ARS",
"quote_currency": "USD",
"costing_method": "fifo",
"account_ids": [
10,
11
],
"created_by": null,
"created_at": "2026-03-01T00:00:00.000Z",
"updated_at": "2026-03-01T00:00:00.000Z",
"deleted_at": null
},
"period": {
"id": 5,
"mesa_id": 1,
"status": "closed",
"opened_at": "2026-03-01T00:00:00.000Z",
"closed_at": "2026-03-10T18:00:00.000Z",
"opening_local": 1000000,
"opening_fx": 1200,
"closing_local": 250000,
"closing_avg_fx": 1210,
"pnl_local": 15000,
"pnl_quote": 12.4,
"closing_report": null,
"opened_by": null,
"closed_by": null,
"created_at": "2026-03-01T00:00:00.000Z",
"updated_at": "2026-03-01T00:00:00.000Z"
}
}{
"error": "Mesas module not enabled for this company",
"code": "MESAS_DISABLED"
}Authorizations
API Key for authentication
Body
Physical quote count (arqueo)
x >= 0Physical local count (arqueo)
x >= 0Optional close instant. Defaults to 23:00 ART of the opened ART day if omitted. Must be >= opened_at and must not overlap another period.
Response
Closed period
FX trading desk. created_by is null for x-api-key creates. account_ids are internal (Client.type=0) accounts unique to one mesa.
Show child attributes
Show child attributes
{
"id": 1,
"company_id": 42,
"name": "ARS/USD desk",
"local_currency": "ARS",
"quote_currency": "USD",
"costing_method": "fifo",
"account_ids": [10, 11],
"created_by": null,
"created_at": "2026-03-01T00:00:00.000Z",
"updated_at": "2026-03-01T00:00:00.000Z",
"deleted_at": null
}
Trading session. opened_by / closed_by are null for x-api-key callers.
Show child attributes
Show child attributes
{
"id": 5,
"mesa_id": 1,
"status": "open",
"opened_at": "2026-03-01T00:00:00.000Z",
"closed_at": null,
"opening_local": 1000000,
"opening_fx": 1200,
"closing_local": null,
"closing_avg_fx": null,
"pnl_local": null,
"pnl_quote": null,
"closing_report": null,
"opened_by": null,
"closed_by": null,
"created_at": "2026-03-01T00:00:00.000Z",
"updated_at": "2026-03-01T00:00:00.000Z"
}