Environments Upsert Rate
environments_upsert_rateDestructive
Adds a rate and leaves every price you already hold open, so you can keep more than one on file — a second subcontractor's quote for the same operation, for instance. Which of them a part is costed at is decided per order.
This one adds. To state the single price this environment should use — closing the price it replaces — use the PUT for the thing itself: .../rates/subcontract/{operation_kind} for bought-in work, .../rates/material/{grade_id} for a material. A scrap price has only its own PUT .../rates/scrap/{material_category}/{scrap_class}.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | labour|overhead|material|fx|subcontract | |
| env_id | Yes | ||
| fields | No | Kind-specific columns (category, machine_ref, …). | |
| currency | No | ISO 4217 currency code for the rate; null to inherit. | |
| valid_to | No | Date after which the rate is no longer effective; null if open-ended (ISO 8601). | |
| valid_from | Yes | Date from which the rate is effective (ISO 8601). |