Which suppliers have sent a recent statement, by spend (any role)
GET
/statements/coverage
const url = 'https://api.invogi.com/v1/statements/coverage';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.invogi.com/v1/statements/coverage \ --header 'Authorization: Bearer <token>'Every supplier invoiced in the last year or with a statement on file,
most spend first. A supplier is covered when its latest statement that
was read (READY or NEEDS_REVIEW) is dated in the last coverageDays
days; a statement with no date counts from when it arrived. Spend is
last year’s gross in the workspace’s base currency.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Coverage
Media typeapplication/json
object
coverageDays
integer
summary
object
suppliers
required
Suppliers invoiced in the last year or with a statement on file
integer
covered
required
Of those
integer
coveredSpendPercent
Whole percent (rounded down) of last year’s spend
integer | null
items
Array<object>
object
supplier
required
object
id
string format: uuid
name
string
spendBase
string | null
invoices
required
integer
covered
required
boolean
lastStatement
object
id
string format: uuid
status
string
statementDate
string format: date
currency
string | null
closingBalance
string | null
statements
required
Statements on file that were read
integer
openFindings
required
Open findings raised by this supplier’s statements
integer
openRequest
object
id
string format: uuid
status
string
replyBy
string format: date
overdue
boolean
Example
{ "items": [ { "lastStatement": { "status": "READY" }, "openRequest": { "status": "PREPARED" } } ]}