curl --request POST \
--url https://api.finsync.ar/api/operation-types \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>'})
};
fetch('https://api.finsync.ar/api/operation-types', 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({name: '<string>'})
};
fetch('https://api.finsync.ar/api/operation-types', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.finsync.ar/api/operation-types"
payload = { "name": "<string>" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": 123,
"name": "<string>",
"type": "up",
"company_id": 123,
"operation_form_config": {
"kind": "up_down",
"version": 123,
"fixedConfig": {},
"fieldModes": {}
},
"default_completed": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Create a company operation type
Creates a CompanyOperationTypes row for the API-key company. Use type=budget and name Centros de resultados (company seed default) when the company has no budget type yet. Optional operation_form_config is validated with parseOperationFormConfig (kind up_down / exchange / other) and persisted. Omit it for today’s null/default. Optional default_completed (boolean, default true) sets whether create forms mark this type completed for approvers. Does not invent new type enum values. company_id is taken from the API key.
curl --request POST \
--url https://api.finsync.ar/api/operation-types \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>'})
};
fetch('https://api.finsync.ar/api/operation-types', 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({name: '<string>'})
};
fetch('https://api.finsync.ar/api/operation-types', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.finsync.ar/api/operation-types"
payload = { "name": "<string>" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": 123,
"name": "<string>",
"type": "up",
"company_id": 123,
"operation_form_config": {
"kind": "up_down",
"version": 123,
"fixedConfig": {},
"fieldModes": {}
},
"default_completed": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Authorizations
API Key for authentication
Body
Display name, e.g. Centros de resultados
100Existing operation_type enum. budget is required for POST /api/operations budget creates.
up, down, exchange, other, budget, interest Company operation-type form config (dashboard operation_form_config). Validated with parseOperationFormConfig. kind is up_down (type=up or down), exchange, or other.
Show child attributes
Show child attributes
Default create-op completed checkbox for this type. Omit for true.
Response
Operation type created
Operation type ID
Operation type name
Operation category
up, down, exchange, other, budget, interest Company ID
Company operation-type form config (dashboard operation_form_config). Validated with parseOperationFormConfig. kind is up_down (type=up or down), exchange, or other.
Show child attributes
Show child attributes
When true, create-operation forms default the completed checkbox on for approvers for this type. False starts them pending. Users without approve permission always create pending. Defaults to true.
Creation timestamp
Last update timestamp