Invoices
Customer invoices. This is the original and primary OBAPI use case.
List invoices
- Method:
GET /obapi/v1/invoices - Headers:
Authorization: Bearer {apikey}
| Parameter | Type | Required | Description |
|---|---|---|---|
page |
integer | no | Page number (default: 1) |
per_page |
integer | no | Items per page (default: 50, max: 200) |
date_start |
string | no | From invoice date (YYYY-MM-DD) |
date_end |
string | no | To invoice date (YYYY-MM-DD) |
status |
string | no | draft, validated, paid, abandoned |
sort |
string | no | date_asc, date_desc (default), ref_asc, ref_desc |
Get a single invoice
- Method:
GET /obapi/v1/invoices/{id}
Status values
| Value | Description |
|---|---|
draft |
Draft invoice |
validated |
Validated, not yet paid |
paid |
Fully paid |
abandoned |
Abandoned / written off |
Response (list)
{
"items": [
{
"id": "850",
"ref": "FA2209-0646",
"customer_ref": "",
"date_invoice": "2022-09-09",
"date_due": "2022-10-09",
"status": "paid",
"total_excl_tax": "1527.00",
"total_vat": "305.40",
"total_incl_tax": "1832.40"
},
{
"id": "1081",
"ref": "FA2212-0842",
"customer_ref": "",
"date_invoice": "2022-12-06",
"date_due": "2023-01-05",
"status": "paid",
"total_excl_tax": "1527.00",
"total_vat": "305.40",
"total_incl_tax": "1832.40"
}
],
"pagination": {
"page": 1,
"per_page": 50,
"total_items": 2,
"total_pages": 1
}
}
Response (single)
{
"invoice": {
"id": "2800",
"ref": "FA2405-2401",
"customer_ref": "Abonnement The/Cafe",
"type": "standard",
"date_invoice": "2024-05-24",
"date_due": "2024-05-25",
"validated_at": "2024-05-24T10:00:00Z",
"created_at": "2024-05-24T09:00:00Z",
"updated_at": "2024-05-24T10:00:00Z",
"status": "paid",
"payment_terms": "Due upon receipt",
"payment_method": "Bank transfer",
"total_excl_tax": "1.00",
"total_vat": "0.20",
"total_incl_tax": "1.20",
"multicurrency_code": "EUR",
"public_note": "",
"lines": [
{
"id": "5430",
"position": 1,
"product_ref": "BUYMEACOFFEE",
"product_label": "Buy me a coffee",
"product_type": "service",
"description": "Buy me a coffee",
"quantity": "1.00",
"unit": "piece",
"unit_price_excl_tax": "0.50",
"discount_percent": "0.00",
"vat_rate": "20.000",
"total_excl_tax": "0.50",
"total_vat": "0.10",
"total_incl_tax": "0.60"
},
{
"id": "5431",
"position": 2,
"product_ref": "BUYMEATEA",
"product_label": "Buy me a tea",
"product_type": "service",
"description": "Buy me a tea",
"quantity": "1.00",
"unit": "piece",
"unit_price_excl_tax": "0.50",
"discount_percent": "0.00",
"vat_rate": "20.000",
"total_excl_tax": "0.50",
"total_vat": "0.10",
"total_incl_tax": "0.60"
}
],
"customer": {
"id": "100",
"name": "Client Example",
"address": "10 rue du Client",
"zip": "75001",
"city": "Paris",
"country": "FR",
"email": "client@example.com"
},
"supplier": {
"id": "0",
"name": "CAP-REL",
"address": "123 rue du Fournisseur",
"zip": "30380",
"city": "Saint Christol Les Ales",
"country": "FR",
"email": "contact@cap-rel.fr",
"phone": "+33698744401"
}
}
}
Download PDF
GET /obapi/v1/download/{id}?type=invoice