Skip to main content
POST
/
v1
/
invoices
Create new invoice
curl --request POST \
  --url https://api.example.com/v1/invoices \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "status": "draft",
  "party_type": "receiver",
  "due_date": "2024-04-01T00:00:00Z",
  "currency": "CHF",
  "iban": "CH93 0076 2011 6238 5295 7",
  "customer_id": "550e8400-e29b-41d4-a716-446655440000",
  "description": "Monthly services",
  "name_from": "Sender Company AG",
  "address_from": "Bahnhofstrasse 1",
  "zip_from": "8001",
  "city_from": "Zürich",
  "country_from": "Switzerland",
  "name_to": "Receiver GmbH",
  "address_to": "Hauptstrasse 10",
  "zip_to": "3000",
  "city_to": "Bern",
  "country_to": "Switzerland",
  "shipping": 10,
  "discount": 5,
  "vat": 7.7,
  "items": [
    {
      "title": "<string>",
      "quantity": 123,
      "unit_price": 123,
      "description": "<string>"
    }
  ],
  "active": true,
  "metadata": {
    "department": "IT",
    "project_code": "P123"
  }
}
'
{
  "invoice": "<unknown>",
  "items": [
    "<unknown>"
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
status
enum<string>
required
Available options:
draft,
pending,
paid,
sent,
overdue
Example:

"draft"

party_type
enum<string>
required
Available options:
receiver,
sender
Example:

"receiver"

due_date
string<date-time>
required
Example:

"2024-04-01T00:00:00Z"

currency
string
required
Required string length: 3
Example:

"CHF"

iban
string
required
Example:

"CH93 0076 2011 6238 5295 7"

customer_id
string<uuid>
required
Example:

"550e8400-e29b-41d4-a716-446655440000"

description
string
Example:

"Monthly services"

name_from
string
Example:

"Sender Company AG"

address_from
string
Example:

"Bahnhofstrasse 1"

zip_from
string
Example:

"8001"

city_from
string
Example:

"Zürich"

country_from
string
Example:

"Switzerland"

name_to
string
Example:

"Receiver GmbH"

address_to
string
Example:

"Hauptstrasse 10"

zip_to
string
Example:

"3000"

city_to
string
Example:

"Bern"

country_to
string
Example:

"Switzerland"

shipping
number
Example:

10

discount
number
Required range: 0 <= x <= 100
Example:

5

vat
number
Required range: 0 <= x <= 100
Example:

7.7

items
object[]
active
boolean
default:true
metadata
object
Example:
{
"department": "IT",
"project_code": "P123"
}

Response

Invoice created successfully

invoice
any
items
any[]