Choose which of a month's statements answers it (ANALYST+, dashboard user)
PUT
/statements/close/selection
const url = 'https://api.invogi.com/v1/statements/close/selection';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"expectationId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","month":"example","statementId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.invogi.com/v1/statements/close/selection \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "expectationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "month": "example", "statementId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'A person’s choice of a corrected replacement. statementId null returns to the latest usable statement. Recorded as an audit event. A failed statement cannot be chosen.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”X-Invogi-Organization
string format: uuid
For a Clerk session, selects a workspace in which the user has an active membership. If omitted, the remembered accessible workspace is used. API keys remain bound to their own workspace and cannot select another tenant.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
expectationId
required
string format: uuid
month
required
string
statementId
required
string | null format: uuid
Example generated
{ "expectationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "month": "example", "statementId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Responses
Section titled “Responses”The month’s summary after the change
Media typeapplication/json
object
summary
required
object
expected
required
number
byState
required
object
FAILED
required
number
PROCESSING
required
number
NEEDS_REVIEW
required
number
RECONCILED
required
number
MISSING
required
number
withDiscrepancies
required
number
requested
required
number
unassignedStatements
required
number
Example generated
{ "summary": { "expected": 1, "byState": { "FAILED": 1, "PROCESSING": 1, "NEEDS_REVIEW": 1, "RECONCILED": 1, "MISSING": 1 }, "withDiscrepancies": 1, "requested": 1, "unassignedStatements": 1 }}Invalid request
Media typeapplication/json
API key lacks required scope/role
Media typeapplication/json
Resource not found
Media typeapplication/json
Conflicting idempotency key or resource processing state
Media typeapplication/json