Enables or disables a department (and all descendant departments).
<?xml version="1.0" encoding="utf-16"?> <berkeResponse status="ok" responseCode="200"> <department parentSourceDepartmentId="[parentSourceDepartmentId]" sourceDepartmentId="[sourceDepartmentId to set enable/disable]" name="[current name]" description="[current description]" isEnabled="true" changeSummary="[summary of accepted changes]" /> </berkeResponse>
{ "department": { "changeSummary": "[summary of accepted changes]", "parentSourceDepartmentId": "[parentSourceDepartmentId]", "sourceDepartmentId": "[sourceDepartmentId to set enable/disable]", "name": "[current name]", "description": "[current 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]" }
If successful, the response will include a department node that contains the data you submitted.
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:14:11.2003455Z] to [2024-11-22T09:14:11.8003455Z]." responseCode="429" callDeniedDateTime="2024-11-22T09:14:11.9003455Z" callExpiresOnCompletion="true" countCallsExceeded="3" estimatedMillisecondsToNextAllowedCall="423" firstCallDeniedDateTime="2024-11-22T09:14:11.6003455Z" isDailyLimit="false" maximumCallsPerTimeFrame="120" timeFrameMilliseconds="60000" />
{ "callDeniedDateTime": "2024-11-22T09:14:11.9003455Z", "callExpiresOnCompletion": true, "countCallsExceeded": 3, "estimatedMillisecondsToNextAllowedCall": 423, "firstCallDeniedDateTime": "2024-11-22T09:14:11.6003455Z", "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:14:11.2003455Z] to [2024-11-22T09:14:11.8003455Z].", "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: