create_cost
Record an expense with amount, category, and start date, optionally tied to an order. Returns confirmation and the new cost ID.
Instructions
Create an expense record, optionally attributed to an order. Returns {success, id}.
Input Schema
TableJSON 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) |