# Decline Patches Declines one or more patches for the specified custom group(s) and customers, with each patch requiring a reasonId and remarks. The API does not support the Linux platform; therefore, Linux patches were automatically excluded. ## Endpoint `PUT /dcapi/patch/settings/declinePatch/declinePatches` ## Request ### Request URL `https://[{serverurl}](https://www.manageengine.com/products/desktop-central/help/api/cloud/oauth-authentication-endpoint-domain.html)/dcapi/patch/settings/declinePatch/declinePatches` ### Scope `DesktopCentralCloud.PatchMgmt.UPDATE` ### Header `Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52` ### Request Parameters #### Request Headers - **Content-Type** `string` — **Mandatory**: `application/declinePatches.v1+json` - **Accept** `string` — **Mandatory**: `application/declinePatches.v1+json` #### Request Body `application/json` - `JSON Object` - **patches** `JSON Array` — Optional List of patch objects to decline. Each object contains patch ID, reason ID and remarks. - **customGroupID** `JSON Array` — Optional List of custom group resource IDs to decline patches for. Cannot be empty. ### Sample Request ```curl curl --request PUT \ --url https://appdomains/dcapi/patch/settings/declinePatch/declinePatches \ --header 'Accept: application/declinePatches.v1+json' \ --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \ --header 'Content-Type: application/declinePatches.v1+json' \ --data '{}' ``` ### Sample Request Body #### Decline a single patch for one custom group ```json { "patches": [ { "reasonId": "1", "id": "110001", "remarks": "Vendor reported crash on reboot" } ], "customGroupID": [ "301" ] } ``` #### Decline multiple patches with different reasons for multiple custom groups ```json { "patches": [ { "reasonId": "1", "id": "110001", "remarks": "Vendor-reported patch issue causing BSOD" }, { "reasonId": "3", "id": "110002", "remarks": "Conflicts with in-house CRM application v4.2" }, { "reasonId": "5", "id": "110003", "remarks": "Awaiting approval from change advisory board" } ], "customGroupID": [ "501", "502" ] } ``` ## Response Parameters ### HTTP Code 200 Response body: `application/json` - `JSON Object` - **status** `string` Operation result: `'success'` when patches are declined successfully - **message** `string` Localized success message ### HTTP Code 400 Response body: `application/json` - `JSON Object` - **errorCode** `string` Validation error code: `INSUFFICIENT_DATA` = missing required fields, `INVALID_DATA` = invalid format or business rule violation (for example, All Computers mixed with other groups, non-numeric id/reasonId) - **errorMessage** `string` Detailed message describing the specific validation failure ### HTTP Code 401 Response body: `application/json` - `JSON Object` - **errorCode** `long` Unauthorized error code returned when authentication credentials are missing, expired, or invalid (authentication = required) - **errorMsg** `string` Authentication failure reason ### HTTP Code 403 Response body: `application/json` - `JSON Object` - **errorCode** `string` Authorization error code: `UAC_UNAUTHORIZED` when user lacks access to selected custom groups - **errorMessage** `string` Message indicating the user is not authorized to decline patches for the selected groups ### HTTP Code 500 Response body: `application/json` - `JSON Object` - **errorCode** `string` Internal error code: unexpected server error during decline operation - **errorMessage** `string` Error message describing the internal failure ## Sample Responses ### HTTP 200 Patches declined successfully. ```json { "message": "Patches declined successfully", "status": "success" } ``` ### HTTP 400 #### Patches list is empty or null ```json { "errorMessage": "Patches list is empty", "errorCode": "INSUFFICIENT_DATA" } ``` #### A patch object is missing the required reasonId ```json { "errorMessage": "reasonId is mandatory for patch id: 110001", "errorCode": "INSUFFICIENT_DATA" } ``` #### All Computers group selected with other custom groups ```json { "errorMessage": "All Computer Groups cannot be selected with other Custom Groups", "errorCode": "INVALID_DATA" } ``` ### HTTP 401 Authentication credentials missing or invalid. ```json { "errorMessage": "Authentication credentials are missing or invalid", "errorCode": "UNAUTHORIZED" } ``` ### HTTP 403 User lacks access to the selected custom groups. ```json { "errorMessage": "The user is not authorized to perform this operation!", "errorCode": "UAC_UNAUTHORIZED" } ``` ### HTTP 500 Unexpected server error during decline. ```json { "errorMessage": "An internal error occurred while processing the request", "errorCode": "INTERNAL_ERROR" } ``` ## Rate Limit ![](https://www.zohowebstatic.com/sites/zweb/images/people/ico-help.png) **Duration:** 1 minute | **Threshold:** 30 | **Lock period:** 5 minutes Duration - Time window for the threshold. Threshold - Number of API calls allowed within the specified duration. Lock Period - Wait time before consecutive API requests.