Billing Overviews API
General notes
Billings Overviews collection:
Single Billings Overview:
Billings Overviews collection
Billings Overviews index
This method needs permission
accessonbillings-overviews.
Request
| Index behaviour | Definition |
|---|---|
| Paginated by default | No |
| Sorting | id, month, year, created_at, updated_at |
| Filters | id:enum, month:int, year:int, created_at:datetime, updated_at:datetime |
| Embedded | - |
GET /api/v0/billings-overviews HTTP/1.1
Content-Type: application/json
Response
Note: By default this shows all related Billings.
200 OK
{
"items": [
{
"id": 153,
"month": 2,
"year": 2024,
"items": [
{
"id": 74,
"name": "Klientská smlouva ",
"model_type": "1",
"model_id": "6",
"price": {
"CZK": {
"value": 100,
"formatted": "100,00 Kč"
}
},
"date": "2024-02-01",
"billings_overview_id": 153,
"responsible_person_id": 39,
"responsible_person_name": "Martin Pech",
"note": null,
"client_id": 2,
"client_name": "KAITRADE spol. s r.o.",
"past_deadline": false,
"past_deadline_notified_at": null,
"invoice_number": "20240001",
"created_at": "2024-02-21T12:15:10+0100",
"updated_at": "2024-03-25T09:06:31+0100"
},
{
"id": 75,
"name": "Klientská smlouva ",
"model_type": "1",
"model_id": "7",
"price": {
"EUR": {
"value": 4,
"formatted": "4,00 €"
}
},
"date": "2024-02-29",
"billings_overview_id": 153,
"responsible_person_id": 39,
"responsible_person_name": "Martin Pech",
"note": null,
"client_id": 2,
"client_name": "KAITRADE spol. s r.o.",
"past_deadline": false,
"past_deadline_notified_at": null,
"invoice_number": "20240002",
"created_at": "2024-02-21T12:15:10+0100",
"updated_at": "2024-03-11T10:22:12+0100"
}
],
"created_at": "2024-02-19T10:54:32+0100",
"updated_at": "2024-02-19T10:54:32+0100",
"_links": [
{
"href": "/api/v0/billings-overviews/148",
"rel": "self",
"type": "GET"
}
]
}
]
}
Single Billings Overvies
Billings Overview detail
GET /api/v0/billings-overviews/{id}
This method needs permission
readonbillings-overviews.
Request
GET /api/v0/billings-overviews/148 HTTP/1.1
Content-Type: application/json
Response
200 OK
{
"id": 148,
"month": 2,
"year": 2024,
"items": [
{
"client_id": 2,
"client_name": "KAITRADE spol. s r.o.",
"overview": [
{
"model_type": "1",
"billings": [
{
"id": 52,
"name": "Klientská smlouva ",
"model_type": "1",
"model_id": "6",
"price": {
"CZK": {
"value": 100,
"formatted": "100,00 Kč"
}
},
"date": "2024-02-01",
"billings_overview_id": 148,
"responsible_person_id": 39,
"responsible_person_name": "Martin Pech",
"note": null,
"client_id": 2,
"client_name": "KAITRADE spol. s r.o.",
"past_deadline": false,
"past_deadline_notified_at": null,
"invoice_number": null,
"created_at": "2024-02-19T10:54:32+0100",
"updated_at": "2024-02-19T10:54:32+0100"
},
{
"id": 53,
"name": "Klientská smlouva ",
"model_type": "1",
"model_id": "7",
"price": {
"EUR": {
"value": 4,
"formatted": "4,00 €"
}
},
"date": "2024-02-02",
"billings_overview_id": 148,
"responsible_person_id": 39,
"responsible_person_name": "Martin Pech",
"note": null,
"client_id": 2,
"client_name": "KAITRADE spol. s r.o.",
"past_deadline": false,
"past_deadline_notified_at": null,
"invoice_number": null,
"created_at": "2024-02-19T10:54:32+0100",
"updated_at": "2024-02-20T10:45:19+0100"
}
]
},
{
"model_type": "3",
"billings": [
{
"id": 54,
"name": "kaitrade.cz / grafické práce",
"model_type": "3",
"model_id": "1",
"price": {
"CZK": {
"value": 2345,
"formatted": "2 345,00 Kč"
}
},
"date": "2024-02-08",
"billings_overview_id": 148,
"responsible_person_id": null,
"responsible_person_name": null,
"note": "Fixed",
"client_id": 2,
"client_name": "KAITRADE spol. s r.o.",
"past_deadline": false,
"past_deadline_notified_at": null,
"invoice_number": null,
"created_at": "2024-02-19T10:54:32+0100",
"updated_at": "2024-02-19T10:54:32+0100"
}
]
}
]
},
{
"client_id": 3,
"client_name": "Nadační horka s.r.o.",
"overview": [
{
"model_type": "3",
"billings": [
{
"id": 55,
"name": "athletebox.cz / právní dokumenty",
"model_type": "3",
"model_id": "2",
"price": {
"CZK": {
"value": 404,
"formatted": "404,00 Kč"
}
},
"date": "2024-02-02",
"billings_overview_id": 148,
"responsible_person_id": 1,
"responsible_person_name": "Aleš Bžatek",
"note": null,
"client_id": 3,
"client_name": "Nadační horka s.r.o.",
"past_deadline": false,
"past_deadline_notified_at": null,
"invoice_number": null,
"created_at": "2024-02-19T10:54:32+0100",
"updated_at": "2024-02-20T10:45:23+0100"
},
{
"id": 56,
"name": "athletebox.cz / aktualizace a servis",
"model_type": "3",
"model_id": "3",
"price": {
"CZK": {
"value": 3725,
"formatted": "3 725,00 Kč"
}
},
"date": "2024-02-01",
"billings_overview_id": 148,
"responsible_person_id": 1,
"responsible_person_name": "Aleš Bžatek",
"note": null,
"client_id": 3,
"client_name": "Nadační horka s.r.o.",
"past_deadline": false,
"past_deadline_notified_at": null,
"invoice_number": null,
"created_at": "2024-02-19T10:54:32+0100",
"updated_at": "2024-02-19T10:54:32+0100"
}
]
}
]
}
],
"created_at": "2024-02-19T10:54:32+0100",
"updated_at": "2024-02-19T10:54:32+0100",
"_links": [
{
"href": "/api/v0/billings-overviews/148",
"rel": "self",
"type": "GET"
}
]
}
404 NOT FOUND
ClientContract was not found.
GET /api/v0/clients/2 HTTP/1.1
Content-Type: application/json
Status-Code: 404
{
"type": "NotFound",
"message": "Required model was not found.",
"id": "0cd85449-05fe-4866-9802-8192e6785fc7"
}