Your browser is not up to date. This may cause security, speed, and display
issues. Please update your browser.
Update Browser
X
| Parameter | Type | Description |
|---|---|---|
| id | integer |
The ID of the surcharge model
|
| name | string |
The name of the surcharge model
|
| accumulation | boolean |
Should night surcharges apply in addition to another surcharge?
If false, only the surcharge with the higher percent value applies
|
| night | surcharge|null |
night surcharge configuration
|
| night_increased | surcharge|null |
increased night surcharge configuration
|
| nonbusiness | surcharge|null |
nonbusiness surcharge configuration
|
| nonbusiness_special | surcharge|null |
nonbusiness surcharge configuration for special nonbusiness days
|
| sunday | surcharge|null |
sunday surcharge configuration
|
| saturday | surcharge|null |
saturday surcharge configuration
|
A surchargeModel only contains the keys for surcharges that have been configured.
| Parameter | Type | Description |
|---|---|---|
| percent | integer |
Percentage of the work time that is added to the work time account
|
| time_since | string |
Start of the period during which the surcharge applies
Format hh:mm:ss, e.g. 23:00:00
|
| time_until | string |
End of the period during which the surcharge applies
Format hh:mm:ss, e.g. 23:00:00
|
| time_since_is_previous_day | boolean |
Does the surcharge period start on the previous day?
Not for "night" and "night_increased", as these surcharges apply every day
|
| time_until_is_next_day | boolean |
Does the surcharge period end on the next day?
Not for "night" and "night_increased", as these surcharges apply every day
|
GET /api/v2/surcharges
{
"surcharges":
{
[object of type surchargeModel],
[object of type surchargeModel],
...
}
}GET /api/v2/surcharges/[ID]
{
"surcharge": [object of type surchargeModel]
}POST /api/v2/surcharges
| Required parameters | name, accumulation |
|---|
| Optional parameters | night, night_increased, nonbusiness, nonbusiness_special, sunday, saturday |
|---|
{
"name": "New surcharge model",
"accumulation": true,
"sunday": {
"percent": 50,
"time_since": "00:00:00",
"time_until": "04:00:00",
"time_since_is_previous_day": false,
"time_until_is_next_day": true
},
"nonbusiness": {
"percent": 125,
"time_since": "00:00:00",
"time_until": "04:00:00",
"time_since_is_previous_day": false,
"time_until_is_next_day": true
},
"night": {
"percent": 25,
"time_since": "22:00:00",
"time_until": "06:00:00"
},
"night_increased": {
"percent": 40,
"time_since": "00:00:00",
"time_until": "04:00:00"
}
}{
"surcharge": [object of type surchargeModel]
}PUT /api/v2/surcharges/[ID]
| Optional parameters | name, accumulation, night, night_increased, nonbusiness, nonbusiness_special, sunday, saturday |
|---|
Sumbit null for a surcharge (e.g. night_increased) instead of an object to remove this surcharge from the surcharge model. Setting percent = 0 will also remove a surcharge from the model.
{
"surcharge": [object of type surchargeModel]
}DELETE /api/v2/surcharges/[ID]
{
"success": true
}