Skip to main content

Client Hosting Invoices API

General notes

Embeddable fields

NameTypeDescription
clientClientModel of Client.
responsible_personUserModel of User.
client_hostingClientHosting[]Model of ClientHosting.
projectProject[]Model of Project.

Content

Client Hosting Invoices collection

Single costs

Client Hosting Invoices collection

Client Hosting Invoices index

GET /api/v0/client-hosting-invoices

This method needs permission access on client-hosting-invoices.

Request

Index behaviourDefinition
Paginated by defaultYes
Sortingid, invoice_number, client_hosting_id, date, amount_of_money, past_deadline, past_deadline_notified_at, created_at, updated_at
Filtersid:int, invoice_number:int, client_hosting_id:int, date:date, amount_of_money:array, past_deadline:bool, past_deadline_notified_at:datetime, created_at:datetime, updated_at:datetime, client_id:int
Embedded-
GET /api/v0/client-hosting-invoices HTTP/1.1
Content-Type: application/json

Response

200 OK

{
"items": [
{
"id": 6,
"invoice_number": null,
"client_contract_id": 6,
"date": "2024-01-29T23:00:00.000000Z",
"amount_of_money": {
"CZK": {
"value": 120.22,
"formatted": "120,22 Kč"
}
},
"past_deadline": false,
"past_deadline_notified_at": null,
"created_at": "2024-01-30T11:00:05+0100",
"updated_at": "2024-01-30T11:00:05+0100",
"_links": [
{
"href": "/api/v0/client-hosting-invoices/6",
"rel": "self",
"type": "GET"
}
]
}
]
}


Single Client Hosting Invoice

Show Client Hosting Invoice

GET /api/v0/client-hosting-invoices/{invoice_id}

This method needs permission read on client-hosting-invoices.

Request

GET /api/v0/client-hosting-invoices/6 HTTP/1.1
Content-Type: application/json

Response

{
"id": 6,
"invoice_number": null,
"client_hosting_id": 6,
"date": "2024-01-29T23:00:00.000000Z",
"amount_of_money": {
"CZK": {
"value": 120.22,
"formatted": "120,22 Kč"
}
},
"past_deadline": false,
"past_deadline_notified_at": null,
"created_at": "2024-01-30T11:00:05+0100",
"updated_at": "2024-01-30T11:00:05+0100",
"_links": [
{
"href": "/api/v0/client-hosting-invoices/6",
"rel": "self",
"type": "GET"
}
]
}

404 NOT FOUND

Not found.


Update Client Hosting Invoice

PUT/PATCH /api/v0/client-hosting-invoices/{invoice_id}

This method needs permission update on client-hosting-invoices.

Request

ParamTypeDescriptionRequirements
invoice_numberintInvoice number.Required. Unique. Must be an int.
PATCH /api/v0/client-hosting-invoices/6 HTTP/1.1
Content-Type: application/json

Response

200 OK

{
"id": 6,
"invoice_number": 20240130,
"client_hosting_id": 6,
"date": "2024-01-29T23:00:00.000000Z",
"amount_of_money": {
"CZK": {
"value": 120.22,
"formatted": "120,22 Kč"
}
},
"past_deadline": false,
"past_deadline_notified_at": null,
"created_at": "2024-01-30T11:00:05+0100",
"updated_at": "2024-01-30T11:00:05+0100",
"_links": [
{
"href": "/api/v0/client-hosting-invoices/6",
"rel": "self",
"type": "GET"
}
]
}

Issue external (idoklad) invoice

GET /api/v0/client-hosting-invoices/{id}/issue-invoice

This method requires permissions update on ClientHostingInvoice.

Request

GET /api/v0/client-hosting-invoices/6/issue-invoice
Content-Type: application/json

204 NO CONTENT

Invoice will be converted to new IDoklad invoice.