Consume the owner's preview and publish its files through calternal-fs. A request from another User must not consume or modify the preview; expiry is checked only after ownership is established (#462, DESIGN §48).
POST
/api/v1/money/imports/{import_id}/confirm
const url = 'https://example.com/api/v1/money/imports/example/confirm';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"confirm_inferred_opening_balances":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/money/imports/example/confirm \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "confirm_inferred_opening_balances": true }'Route: /api/v1/money/imports/{import_id}/confirm. Inputs: import_id. Do not automatically replay this operation after an uncertain result.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”import_id
required
string
Owner-bound import preview token
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
Explicit acknowledgement for the inferred Account rows shown in preview.
object
confirm_inferred_opening_balances
required
boolean
Examplegenerated
{ "confirm_inferred_opening_balances": true}Responses
Section titled “Responses”New Budget created after the User confirmed its preview
Media typeapplication/json
Result after the generated files have been atomically published as a Budget.
object
budget_id
required
string
title
required
string
Examplegenerated
{ "budget_id": "example", "title": "example"}Preview is missing, expired, or belongs to another User
Media typeapplication/json
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}The target Budget folder already exists
Media typeapplication/json
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}