GET
/v1/insights/qualityHow often invoices pass their first check, which rules reject them, how many were corrected, and how sending went, over 7, 30 or 90 days. Days are counted in the company’s time zone. The numbers are cipher’s, the insights add-on’s, and the API passes cipher’s status and body on unchanged. Cipher’s own refusals have the shape {detail: {code, message}}.
Query parameters
- daysstring
The window, in days. Default 30.
One of7,30,90. - directionstring
Only the invoices received (
in) or sent (out), their checks and their deliveries. Left out, both.One ofin,out.
Status codes
| Status | Meaning |
|---|---|
200 |
{firstPass, rejectedNow, unvalidated, corrections, rules, days, channels, delivery}. |
400 |
Cipher’s answer: the window is not 7, 30 or 90 days (bad_window), or the direction is not in or out (bad_direction). |
401 |
No usable credential was sent (invalid_credentials). |
403 |
Cipher’s answer: the company has not switched the insights add-on on (addon_off). |
503 |
Cipher or its database could not answer (insights_unavailable). Invoicing is not affected. |
GET
/v1/insights/qualityExample
curl https://api.certinvo.com/v1/insights/quality \
-H "Authorization: Bearer $CERTINVO_API_KEY"const response = await fetch(`https://api.certinvo.com/v1/insights/quality`, {
headers: {
Authorization: `Bearer ${process.env.CERTINVO_API_KEY}`,
},
})
console.log(response.status, await response.json())import os
import requests
response = requests.get(
"https://api.certinvo.com/v1/insights/quality",
headers={"Authorization": f"Bearer {os.environ['CERTINVO_API_KEY']}"},
)
print(response.status_code, response.text)200
No response body.
Success response