Clockodo API: surcharge models

Object type "surchargeModel"

Parameter Type Description
idinteger
The ID of the surcharge model
namestring
The name of the surcharge model
accumulationboolean
Should night surcharges apply in addition to another surcharge?
If false, only the surcharge with the higher percent value applies
nightsurcharge|null
night surcharge configuration
night_increasedsurcharge|null
increased night surcharge configuration
nonbusinesssurcharge|null
nonbusiness surcharge configuration
nonbusiness_specialsurcharge|null
nonbusiness surcharge configuration for special nonbusiness days
sundaysurcharge|null
sunday surcharge configuration
saturdaysurcharge|null
saturday surcharge configuration

A surchargeModel only contains the keys for surcharges that have been configured.

Object type "surcharge"

Parameter Type Description
percentinteger
Percentage of the work time that is added to the work time account
time_sincestring
Start of the period during which the surcharge applies
Format hh:mm:ss, e.g. 23:00:00
time_untilstring
End of the period during which the surcharge applies
Format hh:mm:ss, e.g. 23:00:00
time_since_is_previous_dayboolean
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_dayboolean
Does the surcharge period end on the next day?
Not for "night" and "night_increased", as these surcharges apply every day

List surcharge models

Request
GET /api/v2/surcharges
Response
{
  "surcharges": 
  {
    [object of type surchargeModel],
    [object of type surchargeModel], 
    ...
  }
}

Request single surcharge model

Request
GET /api/v2/surcharges/[ID]
Response
{
  "surcharge": [object of type surchargeModel]
}

Add surcharge model

Request
POST /api/v2/surcharges
Required parameters name, accumulation
Optional parameters night, night_increased, nonbusiness, nonbusiness_special, sunday, saturday
JSON body of a POST request (example)
{
    "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"
    }
}
Response
{
  "surcharge": [object of type surchargeModel]
}

Edit surcharge model

Request
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.

Response
{
  "surcharge": [object of type surchargeModel]
}

Delete surcharge model

Request
DELETE /api/v2/surcharges/[ID]
Response
{
  "success": true
}
stripes illustration
Contact us!

Our Customer-Success-Team will answer your questions.

Contact now!
Test all functions 14 days free of charge
By submitting this form you accept our terms and conditions and our privacy policy and you confirm that you will use Clockodo as a commercial user.

Take advantage of the experience of 10,000 other companies:

Bechtle Mannheim LogoBechtlePeerigon LogoPeerigon GmbH
Phoenix Logistik LogoPhoenix LogistikFieda LogoFidea