Confirm and create transactions from reviewed suggestions
const url = 'http://localhost:8000/api/v1/import/confirm';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"session_id":1,"accepted":[{"index":1,"wallet_id":1,"party_id":1,"category_id":1,"amount":1,"type":"income","description":"example","date":"2026-04-15"}],"auto_create_wallets":false,"auto_create_parties":false,"auto_create_categories":false}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8000/api/v1/import/confirm \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "session_id": 1, "accepted": [ { "index": 1, "wallet_id": 1, "party_id": 1, "category_id": 1, "amount": 1, "type": "income", "description": "example", "date": "2026-04-15" } ], "auto_create_wallets": false, "auto_create_parties": false, "auto_create_categories": false }'Each accepted item should reference existing wallet/party/category rows by ID. When an ID is omitted and the matching auto_create_* flag is true, the analyzer’s suggested name is used to create the resource (wallets additionally need a currency).
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”object
object
Zero-based position of the suggestion in the session.
Existing wallet owned by the caller. Required unless auto_create_wallets is true and the suggestion has a wallet name and currency.
Existing party owned by the caller.
Existing category owned by the caller.
Override the suggested amount.
Create a wallet from the suggestion when wallet_id is omitted.
Create a party from the suggestion when party_id is omitted.
Create a category from the suggestion when category_id is omitted.
Responses
Section titled “ Responses ”Transactions created
Some suggestions failed (see errors)
Session not found
Validation error