Skip to main content

Hourly pays API

Content

Hourly pays collection:

Single Hourly pay

Hourly pays collection

Hourly pays index

GET /api/v0/hourly-pays/{model}

Available models for hourly payments are: User, Client, Project.

Request

Index behaviourDefinition
Paginated by defaultNo
SortingNo
FiltersNo
Embedded-
GET /api/v0/hourly-pays/user HTTP/1.1
Content-Type: application/json

Response

200 OK

GET /api/v0/hourly-pays/user HTTP/1.1
Content-Type: application/json

{
"items": [
{
"id": 1,
"price": {
"CZK": {
"value": 1000,
"formatted": "1 000,00 Kč"
}
},
"hourly_payable_type": "App\\Containers\\Users\\Models\\User",
"hourly_payable": {
"id": 1,
"first_name": "Simplo",
"last_name": "Admin",
"email": "bzatek@simplo.cz",
"is_active": true,
"token": null,
"phone": null,
"hourly_pay": null,
"address": null,
"birth_date": null,
"note": null,
"goodday_id": "cac2499a-fcf4-3361-a845-6cd284ada5ab",
"goodday_created_at": null,
"created_at": "2022-11-29T13:07:32.000000Z",
"updated_at": "2022-11-29T13:07:32.000000Z"
},
"valid_from": "2022-10-31T23:00:00.000000Z",
"valid_to": null,
"created_at": "2022-11-29T14:35:31+0100",
"updated_at": "2022-11-29T14:35:31+0100"
}
]
}

Specific models hourly pays

GET /api/v0/hourly-pays/{model}/{model_id}

Request

Index behaviourDefinition
Paginated by defaultNo
SortingNo
FiltersNo
Embedded-
GET /api/v0/hourly-pays/user/1 HTTP/1.1
Content-Type: application/json

Response

200 OK

GET /api/v0/hourly-pays/user/1 HTTP/1.1
Content-Type: application/json

{
"items": [
{
"id": 1,
"price": {
"CZK": {
"value": 1000,
"formatted": "1 000,00 Kč"
}
},
"hourly_payable_type": "App\\Containers\\Users\\Models\\User",
"hourly_payable": {
"id": 1,
"first_name": "Simplo",
"last_name": "Admin",
"email": "bzatek@simplo.cz",
"is_active": true,
"token": null,
"phone": null,
"hourly_pay": null,
"address": null,
"birth_date": null,
"note": null,
"goodday_id": "cac2499a-fcf4-3361-a845-6cd284ada5ab",
"goodday_created_at": null,
"created_at": "2022-11-29T13:07:32.000000Z",
"updated_at": "2022-11-29T13:07:32.000000Z"
},
"valid_from": "2022-10-31T23:00:00.000000Z",
"valid_to": null,
"created_at": "2022-11-29T14:35:31+0100",
"updated_at": "2022-11-29T14:35:31+0100"
}
]
}

Create hourly pays

POST /api/v0/hourly-pays/{model}/{model_id}

Request

ParamTypeDescriptionRequirements
priceMonetaryAttributeAmount in currency--
valid_fromdateDate from hourly pay is validRequired.
valid_todateDate to hourly pay is validPresent. Could be empty. this means that this hourly pay is current.
POST /api/v0/hourly-pays/user/1 HTTP/1.1
Content-Type: application/json

{
"valid_from": "2024-12-11",
"valid_to": "2024-12-12",
"price": {
"CZK": 1000
}
}

Response

200 OK

{
"id": 12,
"price": {
"CZK": {
"value": 1000,
"formatted": "1 000,00 Kč"
}
},
"hourly_payable_type": "App\\Containers\\Projects\\Models\\Project",
"hourly_payable": {
"id": 1,
"name": "kaitrade.cz / grafické práce",
"goodday_id": "n0e2F5",
"parent_id": null,
"client_id": 2,
"status_id": 6,
"status_comment": null,
"responsible_user_id": null,
"active": true,
"description": "Pravideľné grafické práce pre Kaitrade a Holab.",
"start_date": null,
"end_date": null,
"priority": 5,
"estimate": null,
"progress": null,
"type": null,
"google_drive_url": null,
"billable": true,
"billing_type": null,
"billing_time_type": null,
"estimated_price": 0,
"goodday_created_at": "2019-10-08T14:52:40.000000Z",
"estimate_exceeded_80_percent_notified_at": null,
"estimate_exceeded_100_percent_notified_at": null,
"created_at": "2023-02-09T15:20:56.000000Z",
"updated_at": "2023-02-09T15:20:57.000000Z",
"is_client": true,
"has_signed_sla": false
},
"valid_from": "2025-03-11T00:00:00+0100",
"valid_to": "2025-03-12T00:00:00+0100",
"created_at": "2024-02-12T11:41:46+0100",
"updated_at": "2024-02-12T11:41:46+0100"
}


Update hourly pays

PATCH /api/v0/hourly-pays/{model}/{model_id}

Request

ParamTypeDescriptionRequirements
idIdentifier of HourlyPayUnique for single Hourly Pay.--
priceMonetaryAttributeAmount in currency--
valid_fromdateDate from hourly pay is valid--
valid_todateDate to hourly pay is valid--
{
"id": 12,
"valid_from": "2025-03-11",
"valid_to": "2025-03-12",
"price": {
"EUR": 50
}
}

Response

200 OK

{
"id": 12,
"price": {
"EUR": {
"value": 50,
"formatted": "50,00 €"
}
},
"hourly_payable_type": "App\\Containers\\Projects\\Models\\Project",
"hourly_payable": {
"id": 1,
"name": "kaitrade.cz / grafické práce",
"goodday_id": "n0e2F5",
"parent_id": null,
"client_id": 2,
"status_id": 6,
"status_comment": null,
"responsible_user_id": null,
"active": true,
"description": "Pravideľné grafické práce pre Kaitrade a Holab.",
"start_date": null,
"end_date": null,
"priority": 5,
"estimate": null,
"progress": null,
"type": null,
"google_drive_url": null,
"billable": true,
"billing_type": null,
"billing_time_type": null,
"estimated_price": 0,
"goodday_created_at": "2019-10-08T14:52:40.000000Z",
"estimate_exceeded_80_percent_notified_at": null,
"estimate_exceeded_100_percent_notified_at": null,
"created_at": "2023-02-09T15:20:56.000000Z",
"updated_at": "2023-02-09T15:20:57.000000Z",
"is_client": true,
"has_signed_sla": false
},
"valid_from": "2025-03-11T00:00:00+0100",
"valid_to": "2025-03-12T00:00:00+0100",
"created_at": "2024-02-12T11:41:46+0100",
"updated_at": "2024-02-12T11:41:46+0100"
}

422 UNPROCESSABLE CONTENT

Updating HourlyPay for different model.

{
"type": "ValidationError",
"message": "The given data was invalid.",
"id": "96e7c99c-821e-4019-8ccf-ce8cfbe0fd6e",
"errors": [
{
"field": "id",
"message": "Typ aktualizované položky nepatří danému modelu."
}
]
}

Delete hourly pay

DELETE /api/v0/hourly-pays/{model}/{model_id}

Request

DELETE /api/v0/hourly-pays/1 HTTP/1.1
Content-Type: application/json

Response

204 No content