# Update Account Contract Data source: https://developer.mastercard.com/mastercard-processing-core/documentation/sandbox-testing/data-management/update-acc-contract-data/index.md ## Test case -- Success {#test-case--success} This test case describes updating data for a specified account contract in the CMS. Note: The field that you do not want to change must not be in the request. The field sent in the request with a null value explicitly will be cleared in the CMS. **Sample request**
`PATCH /accounts/60001 -H 'If-Match: "7fedf39c3c2952a62821de4b480d1d6f"'` ```JSON { "accountContractName": "North Division Account", "cbsNumber": "CBS83863371812033" } ``` **Sample response** `204` ## Test case -- Fail -- Duplicated cbsNumber {#test-case--fail--duplicated-cbsnumber} This test case describes an attempt to update the data for a specified account contract with the `cbsNumber`, which already exists in the CMS. For this test case, use the following information in the request: | Field | Available value | |-------------------------------|---------------------| | accountContractData.cbsNumber | CBS1950395609519670 | **Sample request** `PATCH /accounts/60001 -H 'If-Match: "5c7d022061b0874200bfed735c6b9308"'` ```JSON { "accountContractName": "North Division Account", "cbsNumber": "CBS1950395609519670" } ``` **Sample response** `400` ```JSON { "Errors": { "Error": [ { "Source": "MASTERCARD PROCESSING", "ReasonCode": "DUPLICATED_CBS_NUMBER", "Description": "Duplicated CBS number.", "Recoverable": false } ] } } ``` ## Test case -- Fail -- Not an Account Contract {#test-case--fail--not-an-account-contract} This test case describes an attempt to update the data for a specified account contract in the CMS which is not an account contract. For this test case, use the following information in the request: | Path parameter | Available value | |-----------------------|-----------------| | `account_contract_id` | 101223 | **Sample request** `PATCH /accounts/101223 -H 'If-Match: "5c7d022061b0874200bfed735c6b9308"'` ```JSON { "accountContractName": "North Division Account", "cbsNumber": "CBS83863371812033" } ``` **Sample response** `400` ```JSON { "Errors": { "Error": [ { "Source": "MASTERCARD PROCESSING", "ReasonCode": "NOT_ACCOUNT_CONTRACT", "Description": "Contract with id 101223 is not an account.", "Recoverable": false } ] } } ```