/v1/sendingautomatic emails an invoice by itself once its check is filed, when it is made for a customer delivered by email (deliveryPlan.delivery.channel is email) and its verdict is one of verdicts. A rejected invoice is never sent. duplicates says what happens to a likely duplicate: hold (the default) keeps it until a person keeps or dismisses it, and send lets it go, its warning kept on the invoice. The same applies to an invoice mailed to the send address. A customer’s own delivery.sending overrides mode for that customer. The setting is copied into each invoice’s plan when it is filed, so a change applies from the next invoice and never to one already filed. A signed-in person or an API key may save it.
Request body
application/json, required
- modestringRequiredOne of
by-hand,automatic. - verdictsarray
Which verdicts go out by themselves. Default
["clean"]. - duplicatesstring
What happens to a likely duplicate. Default
hold.One ofhold,send.
Response
A 200 answer carries these fields.
- modestringRequiredOne of
by-hand,automatic. - verdictsarray of stringRequired
- duplicatesstringRequired
holdkeeps a likely duplicate for a person;sendlets it go with its warning.One ofhold,send. - versionintegerRequired
0 when nobody chose.
Status codes
| Status | Meaning |
|---|---|
200 |
The saved version. |
400 |
An unknown mode or duplicates choice, verdicts other than the two choices, or another key (invalid_sending). Nothing was saved. |
401 |
No usable credential was sent (invalid_credentials). |
503 |
No database is configured (store_unavailable). |
/v1/sendingcurl -X PUT https://api.certinvo.com/v1/sending \
-H "Authorization: Bearer $CERTINVO_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @body.jsonimport { readFile } from 'node:fs/promises'
const response = await fetch(`https://api.certinvo.com/v1/sending`, {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.CERTINVO_API_KEY}`,
'Content-Type': 'application/json',
},
body: await readFile('body.json'),
})
console.log(response.status, await response.json())import os
import requests
response = requests.put(
"https://api.certinvo.com/v1/sending",
headers={"Authorization": f"Bearer {os.environ['CERTINVO_API_KEY']}", "Content-Type": "application/json"},
data=open("body.json", "rb"),
)
print(response.status_code, response.text){
"mode": "by-hand",
"verdicts": [
"clean"
],
"duplicates": "hold",
"version": 0
}