/v1/samplesEvery file Certinvo reads or writes, in one list: the invoices to send, the company’s lists, and the files Certinvo makes. Each says what it is for, whether it goes in, comes out or both, its formats, its columns in order, and the path of its sample per format. A list’s sample takes ?format=; a template and an output’s sample are named with their extension. A list Certinvo makes from records it keeps (the archive, a webhook’s deliveries, the team, the recurring invoices, the establishments) has no sample: download it from its own route. No sample holds anybody’s data: each is made from invoices the validator accepted.
Response
A 200 answer carries these fields.
- filesarray of objectRequired
Show 8 child fields
- idstringRequired
The file, such as
buyersordatev-extf. - groupstringRequired
Invoices to send, one of the company's lists, or a file Certinvo makes.
One ofinvoices,lists,outputs. - directionstringRequired
Whether the file goes in, comes out, or both.
One ofin,out,both. - liststring
The list in
/v1/data-files/{list}, when the file is one. - purposestringRequired
What the file is for.
- formatsarray of stringRequired
- columnsarray of stringRequired
The file's columns, in order.
- samplesobjectRequired
The path of the sample, per format. Empty when the file has none.
Show 3 child fields
- csvstring
- xlsxstring
- jsonstring
Status codes
| Status | Meaning |
|---|---|
200 |
Every data file. |
401 |
No usable credential was sent (invalid_credentials). |
/v1/samplescurl https://api.certinvo.com/v1/samples \
-H "Authorization: Bearer $CERTINVO_API_KEY"const response = await fetch(`https://api.certinvo.com/v1/samples`, {
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/samples",
headers={"Authorization": f"Bearer {os.environ['CERTINVO_API_KEY']}"},
)
print(response.status_code, response.text){
"files": [
{
"id": "string",
"group": "invoices",
"direction": "in",
"list": "string",
"purpose": "string",
"formats": [
"csv"
],
"columns": [
"string"
],
"samples": {
"csv": "string",
"xlsx": "string",
"json": "string"
}
}
]
}