Creates a new department under an existing department.
<?xml version="1.0" encoding="utf-16"?> <berkeResponse status="ok" responseCode="200"> <department parentSourceDepartmentId="[parentSourceDepartmentId]" sourceDepartmentId="[sourceDepartmentId]" name="[name]" description="[optional description]" isEnabled="true" /> </berkeResponse>
{ "department": { "parentSourceDepartmentId": "[parentSourceDepartmentId]", "sourceDepartmentId": "[sourceDepartmentId]", "name": "[name]", "description": "[optional description]", "isEnabled": true }, "status": "ok", "response": null, "responseCode": "200" }
<?xml version="1.0" encoding="utf-16"?> <berkeResponse status="[!=ok]" response="[Error Message], [Parameter]=[[ParameterValue]]" responseCode="[!=200]" />
{ "status": "[!=ok]", "response": "[Error Message], [Parameter]=[[ParameterValue]]", "responseCode": "[!=200]" }
All API requests include two extended HTTP headers in the response:
If your request was successful, X-Response-Code will be 200.0. If the Berke response code is 1000 or greater, then an error occurred. For example, 403.1003 tells you that there was a HTTP 403 error (Forbidden). The 1003 Berke status code tells you the API key is invalid.
When an error occurs, further information can be found in the X-Response-Message header. For example, X-Response-Message will return API key '[API.Key.Sent.To.Berke]' is invalid or inactive if the API key was not authenticated.
The most common errors returned for this method are listed below.
<?xml version="1.0" encoding="utf-16"?> <berkeResponse status="[!=ok]" response="[API Method] API method requests exceeded burst limit of 120 occurrences within 60000 milliseconds. Excess requests occurred 3 times from [2024-11-22T09:44:10.4145766Z] to [2024-11-22T09:44:11.0145766Z]." responseCode="429" callDeniedDateTime="2024-11-22T09:44:11.1145766Z" callExpiresOnCompletion="true" countCallsExceeded="3" estimatedMillisecondsToNextAllowedCall="423" firstCallDeniedDateTime="2024-11-22T09:44:10.8145766Z" isDailyLimit="false" maximumCallsPerTimeFrame="120" timeFrameMilliseconds="60000" />
{ "callDeniedDateTime": "2024-11-22T09:44:11.1145766Z", "callExpiresOnCompletion": true, "countCallsExceeded": 3, "estimatedMillisecondsToNextAllowedCall": 423, "firstCallDeniedDateTime": "2024-11-22T09:44:10.8145766Z", "isDailyLimit": false, "maximumCallsPerTimeFrame": 120, "timeFrameMilliseconds": 60000, "status": "[!=ok]", "response": "[API Method] API method requests exceeded burst limit of 120 occurrences within 60000 milliseconds. Excess requests occurred 3 times from [2024-11-22T09:44:10.4145766Z] to [2024-11-22T09:44:11.0145766Z].", "responseCode": "429" }
API throttle limits are set per-company. Please login and return to this area to see your company's specific throttle configuration.
Your application can use the following API method response information to determine its course of action when HTTP status code 429 is returned by an API method call: