Import calculations from JSON
POST/api/v1/workspaces/:workspaceId/calculations/import/json
Required API-key permission: CALCULATIONS_CREATE — Create cost calculations
Three-phase import (validate → prepare-mapping → execute) of an export dump produced by POST /calculations/export/json. The response shape depends on the phase and is returned verbatim (not wrapped in a data envelope). The execute phase is all-or-nothing: every decision and referenced id is validated first; any invalid item or foreign/unknown id writes nothing and returns 400 with per-item issues. All writes run in one transaction. Not available to the instance master key (calculations record the updating user).
Request
Responses
- 200
- 400
- 401
- 403
- 409
Import calculations from JSON
Invalid phase, missing decisions, invalid items or references (nothing was imported).
Missing or invalid credentials
Master API key cannot write calculations.
Conflict with a concurrent change (nothing was imported).