Skip to content

Choose which of a month's statements answers it (ANALYST+, dashboard user)

PUT
/statements/close/selection
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.

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.

Media typeapplication/json
object
expectationId
required
string format: uuid
month
required
string
/^[0-9]{4}-(0[1-9]|1[0-2])$/
statementId
required
string | null format: uuid

Example generated

{
"expectationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"month": "example",
"statementId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

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
object
error
required
object
code
required
string
Allowed values: NOT_FOUND UNAUTHORIZED FORBIDDEN INVALID_REQUEST CONFLICT RATE_LIMITED USAGE_LIMIT_EXCEEDED PROCESSING_FAILED
message
required
string
request_id
required
string
details

Optional stable, content-free context, e.g. {reason, resets_at, preparation_id}.

object
key
additional properties
One of:
string

Example

{
"error": {
"code": "NOT_FOUND"
}
}

API key lacks required scope/role

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: NOT_FOUND UNAUTHORIZED FORBIDDEN INVALID_REQUEST CONFLICT RATE_LIMITED USAGE_LIMIT_EXCEEDED PROCESSING_FAILED
message
required
string
request_id
required
string
details

Optional stable, content-free context, e.g. {reason, resets_at, preparation_id}.

object
key
additional properties
One of:
string

Example

{
"error": {
"code": "NOT_FOUND"
}
}

Resource not found

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: NOT_FOUND UNAUTHORIZED FORBIDDEN INVALID_REQUEST CONFLICT RATE_LIMITED USAGE_LIMIT_EXCEEDED PROCESSING_FAILED
message
required
string
request_id
required
string
details

Optional stable, content-free context, e.g. {reason, resets_at, preparation_id}.

object
key
additional properties
One of:
string

Example

{
"error": {
"code": "NOT_FOUND"
}
}

Conflicting idempotency key or resource processing state

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: NOT_FOUND UNAUTHORIZED FORBIDDEN INVALID_REQUEST CONFLICT RATE_LIMITED USAGE_LIMIT_EXCEEDED PROCESSING_FAILED
message
required
string
request_id
required
string
details

Optional stable, content-free context, e.g. {reason, resets_at, preparation_id}.

object
key
additional properties
One of:
string

Example

{
"error": {
"code": "NOT_FOUND"
}
}