POST /organizations

Request parameters

ParameterTypeDescription
idstringIf provided existing organization will be edited. If not provided a new organization will be created.
validFromdateDate from when the organization becomes valid and can be selected at time entries.
Provide date in ISO-8601 format with +00:00 time zone, eg. 2022-01-01T00:00:00+00:00
validTodateDate to until the organization is valid and until it can be selected at time entries.
Dates in past mean that this organization is deactivated.
Provide date in ISO-8601 format with +00:00 time zone, eg. 2022-01-01T00:00:00+00:00
nameobjectObject containing organizations name and description
organizationNamestringA name is mandatory.
descriptionstringProvide description if desired.
organizationTypeobjectObject containing organizations type and parent organization.
typestringPossible types:
"project", "subsidiary", "partner", "client", "supplier", "branch", "other"
If not provided then "project" will be created.
parentOrganizationUnitIdstringProvide id of parent organization.
If not provided then organization will be assigned direct to company (parent = company) if authenticated user has the coresponding permissions, otherwise 401 error will be returned.
addressobjectIf desired an address can be saved.
relIdlongProvide this id if existing organization should be edited.
idstringIf provided existing address will be edited. If not provided a new address will be created.
streetstringStreet of the address.
citystringCity of the address.
statestringState of the address.
postalCodestringPostal code (zip) of the address.
countrystringIf desired, provide "country" from Country List.
contactInformationobjectObject containing organizations email and phone number.
organizationEmailstringIf desired an email can be saved.
phoneNumberstringIf desired a phone number can be saved.
assignUsersarrayArray of roles which can be assigned to the organization.
Possible roles: "employee", "approver", "administrator"
administrators, approvers, employeesarray [object]Provide an array of roles which should be assigned to the organization.
userIdstringProvide the user id's for every role for those users which should be assigned to this organization.
timeTrackingSettingsobjectObject of time tracking settings which should apply for this organization.
If no settings are provided then inherited settings from parent organization will be considered.
If settings are provided then they will apply to child organizations as well (as long as child organization has no setting by itself).
maxTimeEntryLengthintegerProvide maximum allowed length of time entry in milliseconds.

E.g. if it is desired that maximum time entries of 9 hours can be saved for this organization, then provide 32400000 (9h x 60min x 60sec x 1000ms).
allowTimeEntriesFromTimeintegerProvide from time in milliseconds from when time entries will be allowed to be saved.

E.g. if it is desired that time entries are allowed only from 9 a.m., then provide 32400000 (9h x 60min x 60sec x 1000ms).
allowTimeEntriesToTimeintegerProvide to time in milliseconds until when time entries will be allowed to be saved.

E.g. if it is desired that time entries are allowed only till 9 p.m., then provide 75600000 (21h x 60min x 60sec x 1000ms).
minTimeEntryBreakLengthintegerProvide minimum length of breaks in milliseconds.

E.g. if every breake which is saved for this organization should have a minimum break of 30 minutes, then provide 1800000 (0,5h x 60min x 60sec x 1000ms).
maxTimeEntryBreakLengthintegerProvide maximum length of breaks in milliseconds.

E.g. if every breake which is saved for this organization should have a maximum break of 60 minutes, then provide 3600000 (1h x 60min x 60sec x 1000ms).
roundingTypeTimeEntryStartTimestringProvide rounding settings for time entries start time.
Possible values:
"off", "up", "down", "nearest"
roundingAmountTimeEntryStartTimeintegerProvide rounding amount for time entries start time in minutes.

Possible values are: 5, 10, 15, 30, 60
roundingTypeTimeEntryEndTimestringProvide rounding settings for time entries end time.
Possible values:
"off", "up", "down", "nearest"
roundingAmountTimeEntryEndTimeintegerProvide rounding amount for time entries end time in minutes.

Possible values are: 5, 10, 15, 30, 60
roundingTypeBreakStartTimestringProvide rounding settings for time entries break start time.
Possible values:
"off", "up", "down", "nearest"
roundingAmountBreakStartTimeintegerProvide rounding amount for time entries break start time in minutes.

Possible values are: 5, 10, 15, 30, 60
roundingTypeBreakEndTimestringProvide rounding settings for time entries break end time.
Possible values:
"off", "up", "down", "nearest"
roundingAmountBreakEndTimeintegerProvide rounding amount for time entries break end time in minutes.

Possible values are: 5, 10, 15, 30, 60
allowTimeEntriesInPastbooleanProvide "true" if you want to allow that time entries can be saved for the past, otherwise provide "false".
allowTimeEntriesInFuturebooleanProvide "true" if you want to allow that time entries can be saved for the future, otherwise provide "false".
onlyClockTimeEntriesAllowedbooleanProvide "true" if you want to allow only clock time entries for this organization, otherwise provide "false".
automaticTargetTimesbooleanProvide "true" if you want that target times are saved automatically with every time entry, otherwise provide "false".
ignoreTargetTimesbooleanProvide "true" if you want that target times are ignored when time entries are saved for this organization, otherwise provide "false".
locationTrackingobjectObject containing organizations location tracking settings.
isOnbooleanProvide "true" if you want that time entries can only be saved within a certain GPS location, otherwise provide "false".
locationRadiusintegerIf location tracking "isOn" is true, provide the location radius in meter.
latitudedoubleIf location tracking "isOn" is true, provide GPS location latitude.
longitudedoubleIf location tracking "isOn" is true, provide GPS location longitude.
clockingSsIdstringProvide WIFI SSID if you want that time entries are saved automatically when users connect to this WIFI.
clockingMacAddressstringProvide mac address of WIFI router if you want to restrict that automatic WIFI time entries are only saved if users are connected to a certain router.
exportIdsobjectIf desired, up to three export id's and a hardware terminal id can be used to match organizations with third party applications.
exportId1stringIf needed provide an export id.
exportId2stringIf needed provide an export id.
exportId3stringIf needed provide an export id.
hardwareTerminalChipIdstringProvide users hardware terminal chip id if user is tracking time via a hardware terminal.

Request parameters

Simple request JSON example
An organization will be created if "organizationName" is provided.

{
	"name": {
		"organizationName": "Organization Name"
	}
}

🚧

Warning

If organization "id" is sent in request, then existing organization will be edited.
If in such a case the request JSON has NULL values (because some attributes are not sent at all), then all objects with NULL values will be removed.

When updating an organization, then make sure that already saved data is sent in request again in order to avoid deleting this data.

Full request JSON example:

{
	"id": "987abc78-39c5-436f-a70b-d3a14db753c0",
	"validFrom" :"2022-01-01T00:00:00+00:00", 
    "validTo":"2022-12-31T23:59:59+00:00",
	"name": {
		"organizationName": "Organization Name",
		"description": "Description of organization"
	},
	"organizationType": {
		"type": "project", 
		"parentOrganizationUnitId": "123abc78-39c5-436f-a70b-d3a14db753c6"
	},
	"address": {
        "relId":"123456",
        "id": "321abc78-39c5-436f-a70b-d3a14db753c6",
        "street": "",
        "city": "",
        "state": "",
        "postalCode": "",
        "country": "DE" 
    },
	"contactInformation": {
		"organizationEmail": "[email protected]",
		"phoneNumber":"+49123456789"
	},
	
	"assignUsers": {
		"administrators": [
        {
            "userId": "c4206912-62a6-4ca6-af24-f95d99624615"
        }],
		"approvers": [
        {
            "userId": "91de12c1-4237-431f-a408-e4f7013434b4"
        }],
		"employees": [
        {
            "userId": "993ea1fb-ae4a-422e-9e90-5ecdbb1afb7f"
        }]
	},
	"timeTrackingSettings": {
		"maxTimeEntryLength":"",
		"allowTimeEntriesFromTime": "", 
		"allowTimeEntriesToTime": "",
		"minTimeEntryBreakLength": "",
		"maxTimeEntryBreakLength": "",
		"roundingTypeTimeEntryStartTime": "off", 
		"roundingAmountTimeEntryStartTime": "",
		"roundingTypeTimeEntryEndTime": "off", 
		"roundingAmountTimeEntryEndTime": "",
		"roundingTypeBreakStartTime": "off", 
		"roundingAmountBreakStartTime": "",
		"roundingTypeBreakEndTime": "off", 
		"roundingAmountBreakEndTime":"",
		"allowTimeEntriesInPast": "true",
		"allowTimeEntriesInFuture": "true",
		"onlyClockTimeEntriesAllowed": "false",
		"automaticTargetTimes": "false",
		"ignoreTargetTimes": "true"
	},
	"locationTracking": {
		"isOn": "true",
		"locationRadius": "100",
		"latitude": 123.456,
		"longitude": 987.654,
		"clockingMacAddress": "",
		"clockingSsId": ""
	},
    "exportIds": {
        "exportId1": "123",
        "exportId2": "456",
        "exportId3": "789",
        "hardwareTerminalChipId": "chip 123"
    }
}

Responses

CodeTitleDescription
200SuccessReturned if request was successful.
400Bad RequestReturned if request was bad.
401UnauthorizedReturned if request was not authorized (eg. due to bad API key).
404Not FoundReturned if request could not be found.

📘

Editing organization depending on assigned roles

If an organization has assigned higher roles than the authenticated user, then authenticated user with lower role will not be able to edit this organization.

If an organization has assigned lower or equal roles than the authenticated user, then authenticated user will be able to edit this organization.

Response JSON example:

{
    "items": [
        {
            "message": "Success",
            "data": {
                "id": "123abc45-39c5-436f-a70b-d3a14db753c6"
            }
        }
    ],
    "valid": true
}