Fixed pays API
Content
Fixed pays collection:
Single Fixed pay
Fixed pays collection
Fixed pays index
GET /api/v0/fixed-pays
Request
| Index behaviour | Definition |
|---|---|
| Paginated by default | No |
| Sorting | project_id, date, price |
| Filters | project_id: int, date: date, price: decimal |
| Embedded | - |
GET /api/v0/fixed-pays HTTP/1.1
Content-Type: application/json
Response
200 OK
{
"items": [
{
"id": 1,
"project_id": 10,
"date": "2024-02-06",
"price": {
"CZK": {
"value": 1000,
"formatted": "1 000,00 Kč"
}
},
"created_at": "2024-02-12T10:16:08+0100",
"updated_at": "2024-02-12T10:16:08+0100",
"_links": [
{
"href": "/api/v0/fixed-pays/1",
"rel": "self",
"type": "GET"
}
]
}
]
}
Create fixed pays
POST /api/v0/fixed-pays
Request
| Param | Type | Description | Requirements |
|---|---|---|---|
price | MonetaryAttribute | Amount in currency. | -- |
date | date/null | Date when value should be invoiced. | Required. |
project_id | int | Identifier of Project. | Required. Unique for single project |
POST /api/v0/fixed-pays HTTP/1.1
Content-Type: application/json
{
"date": "2024-12-11",
"valid_to": "2024-12-12",
"price": {
"CZK": 1000,
"EUR": 50,
}
}
Response
200 OK
{
"id": 2,
"project_id": 1,
"date": "2025-03-11",
"price": {
"EUR": {
"value": 50,
"formatted": "50,00 €"
},
"CZK": {
"value": 1000,
"formatted": "1 000,00 Kč"
}
},
"created_at": "2024-02-12T12:58:41+0100",
"updated_at": "2024-02-12T12:58:41+0100",
"_links": [
{
"href": "/api/v0/fixed-pays/2",
"rel": "self",
"type": "GET"
}
]
}
Single fixed pay
Get single fixed pay
GET /api/v0/fixed-pays/{fixed_pay_id}
Request
| Index behaviour | Definition |
|---|---|
| Paginated by default | No |
| Sorting | No |
| Filters | No |
| Embedded | - |
GET /api/v0/fixed-pays/1 HTTP/1.1
Content-Type: application/json
Response
200 OK
{
"id": 1,
"project_id": 10,
"date": "2024-02-06",
"price": {
"CZK": {
"value": 1000,
"formatted": "1 000,00 Kč"
}
},
"created_at": "2024-02-12T10:16:08+0100",
"updated_at": "2024-02-12T10:16:08+0100",
"_links": [
{
"href": "/api/v0/fixed-pays/1",
"rel": "self",
"type": "GET"
}
]
}
Update fixed pays
PATCH /api/v0/fixed-pays
Request
| Param | Type | Description | Requirements |
|---|---|---|---|
price | MonetaryAttribute | Amount in currency | -- |
date | date | Date when this should be invoiced | -- |
project_id | int | Unique for single project | -- |
{
"price": {
"EUR": 50
}
}
Response
200 OK
{
"id": 2,
"project_id": 1,
"date": "2025-03-11",
"price": {
"EUR": {
"value": 50,
"formatted": "50,00 €"
}
},
"created_at": "2024-02-12T12:58:41+0100",
"updated_at": "2024-02-12T12:58:41+0100",
"_links": [
{
"href": "/api/v0/fixed-pays/2",
"rel": "self",
"type": "GET"
}
]
}
Delete fixed pay
DELETE /api/v0/fixed-pays/{fixed-pay-id}
Request
DELETE /api/v0/fixed-pays/1 HTTP/1.1
Content-Type: application/json
Response
204 No content