curl --request PATCH \
--url https://api.finsync.ar/api/mesas/{id}/periods/{periodId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"opening_quote": 47000,
"opening_fx": 1540
}
'const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({opening_quote: 47000, opening_fx: 1540})
};
fetch('https://api.finsync.ar/api/mesas/{id}/periods/{periodId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({opening_quote: 47000, opening_fx: 1540})
};
fetch('https://api.finsync.ar/api/mesas/{id}/periods/{periodId}', 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}"
payload = {
"opening_quote": 47000,
"opening_fx": 1540
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(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": "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"
}
}{
"error": "Mesas module not enabled for this company",
"code": "MESAS_DISABLED"
}Edit opening stock or correct closed_at
On an open period: updates opening_quote / opening_fx (quote desks) or opening_local (local desks). Recalculates live WAC, remanente, and spray from the new opening plus current lines. Does not rewrite other periods or touch treasury. 409 PERIOD_CLOSED if you send opening fields on a closed day — reopen first. On an already-closed period: optional closed_at late-close correction (does not rewrite the frozen snapshot). Must be >= opened_at and must not overlap another period. After correction, the next period may open at exactly this closed_at.
curl --request PATCH \
--url https://api.finsync.ar/api/mesas/{id}/periods/{periodId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"opening_quote": 47000,
"opening_fx": 1540
}
'const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({opening_quote: 47000, opening_fx: 1540})
};
fetch('https://api.finsync.ar/api/mesas/{id}/periods/{periodId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({opening_quote: 47000, opening_fx: 1540})
};
fetch('https://api.finsync.ar/api/mesas/{id}/periods/{periodId}', 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}"
payload = {
"opening_quote": 47000,
"opening_fx": 1540
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(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": "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"
}
}{
"error": "Mesas module not enabled for this company",
"code": "MESAS_DISABLED"
}Authorizations
API Key for authentication
Body
Signed quote inventory carry. Negative = net long quote leftover.
-7016
Required when opening stock is not zero (local per 1 quote)
1540
Late-close correction on a closed period. Same overlap rules as POST close.
Response
Updated open 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"
}