Skip to content

Prepare statement requests (ANALYST+, dashboard user)

POST
/statement-requests
curl --request POST \
--url https://api.invogi.com/v1/statement-requests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "supplierIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "templateId": "example", "replyInDays": 14 }'

Records one request per supplier and returns its letter, addressed to the supplier’s primary contact (or, when that one has no email, another contact who has one) and asking for the statement to be sent to the workspace’s statements address. Invogi does not send it: send it from your own mailbox, then mark it sent. A supplier with a request already open is skipped. The supplier’s next statement closes the request.

Media typeapplication/json
object
supplierIds
required
Array<string>
>= 1 items <= 500 items
templateId

Builtin:STATEMENT_REQUEST (default) or a workspace STATEMENT_REQUEST template id

string
replyInDays
integer
default: 14 >= 3 <= 60

The prepared letters

Media typeapplication/json
object
created
integer
skipped
integer
letters
Array<object>
object
requestId
required
string format: uuid
supplier
required
object
id
string format: uuid
name
string
to

The contact’s email

string | null
contactName
string | null
subject
required
string
body
required
string

Example generated

{
"created": 1,
"skipped": 1,
"letters": [
{
"requestId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"supplier": {
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"name": "example"
},
"to": "example",
"contactName": "example",
"subject": "example",
"body": "example"
}
]
}

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

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

Example

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