Prepare statement requests (ANALYST+, dashboard user)
POST
/statement-requests
const url = 'https://api.invogi.com/v1/statement-requests';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"supplierIds":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"],"templateId":"example","replyInDays":14}'};
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://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.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
supplierIds
required
Array<string>
templateId
Builtin:STATEMENT_REQUEST (default) or a workspace STATEMENT_REQUEST template id
string
replyInDays
integer
Responses
Section titled “Responses”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
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
message
required
string
request_id
required
string
Example
{ "error": { "code": "NOT_FOUND" }}