Skip to content

API reference

Report one event for many invoices

Invoicing API

POST/v1/invoice-events

Writes one code into the history of each named invoice, such as api:paid to mark a selection paid. The codes are the ones POST /v1/invoices/{id}/events takes. An invoice whose history already holds the code is answered in already and gets no second entry. An id this company has no invoice for is answered in unknown.

Request body

application/json, required

  • codestringRequired
  • invoiceIdsarray of stringRequired
  • notestring

Response

A 201 answer carries these fields.

  • recordedarray of objectRequired
    Show 2 child fields
    • invoiceIdstring (uuid)Required
    • eventIdstringRequired
  • alreadyarray of stringRequired
  • unknownarray of stringRequired

Status codes

Status Meaning
201 What was written.
400
401
501
POST/v1/invoice-events
Example
curl -X POST https://api.certinvo.com/v1/invoice-events \
  -H "Authorization: Bearer $CERTINVO_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @body.json
import { readFile } from 'node:fs/promises'

const response = await fetch(`https://api.certinvo.com/v1/invoice-events`, {
  method: 'POST',
  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.post(
    "https://api.certinvo.com/v1/invoice-events",
    headers={"Authorization": f"Bearer {os.environ['CERTINVO_API_KEY']}", "Content-Type": "application/json"},
    data=open("body.json", "rb"),
)
print(response.status_code, response.text)
201
application/json
{
  "recorded": [
    {
      "invoiceId": "3f0c2a5e-8d1b-4c7a-9e2f-6b5d4a3c2b1a",
      "eventId": "string"
    }
  ],
  "already": [
    "string"
  ],
  "unknown": [
    "string"
  ]
}
Success response
POST
/v1/invoice-events
Report one event for many invoices
All
›AuthenticationRequiredBearerAuth

Provide your API key in the Authorization: Bearer <key> header. Keys are stored locally in your browser.

›Headers2
›Bodyapplication/json
›Code Snippet
curl -X POST "https://api.certinvo.com/v1/invoice-events" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "code": "api:paid",
  "invoiceIds": [
    "string"
  ],
  "note": "string"
}...'
Response

No request sent yet

Configure parameters and click Send to view the response.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close