create_cost
Record an expense with amount, category, and start date, and optionally link it to an order in RetailCRM.
Instructions
Create an expense record, optionally attributed to an order. Returns {success, id}.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"summ": "<summ>",
"cost_item": "<cost_item>",
"date_from": "<date_from>"
},
"name": "create_cost"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | No | Site (store) symbolic code. Required on create/edit when the API key is scoped to multiple sites (see list_sites). | |
| summ | Yes | Cost amount | |
| comment | No | Free-text comment | |
| date_to | No | Cost period end (YYYY-MM-DD) | |
| order_id | No | Attribute the cost to an order RetailCRM ID | |
| cost_item | Yes | Cost item code (expense category) | |
| date_from | Yes | Cost period start (YYYY-MM-DD) |