# Set Classifier source: https://developer.mastercard.com/mastercard-processing-core/documentation/sandbox-testing/classifiers-and-parameters-management/set-classifier/index.md ## Test case -- Success -- Set Classifier for a Client {#test-case--success--set-classifier-for-a-client} This test case describes setting a classifier for a specified client stored in the CMS. Refer to [Classifiers](https://developer.mastercard.com/mastercard-processing-core/documentation/guides/card-management-system/index.md#classifiers) for more information about Classifiers. For this test case, use the following information in the request: | Path parameter | Available value | |-------------------|--------------------| | `classifier_code` | TEST_CLASSIFIER_01 | | | TEST_CLASSIFIER_02 | **Sample request** `PUT clients/40000/classifiers/TEST_CLASSIFIER_01` ```JSON { "classifierValue": "VALUE_1A", "endDate": "2031-06-25", "startDate": "2031-06-25" } ``` **Sample response** `204` ## Test case -- Success -- Set Classifier for a Contract {#test-case--success--set-classifier-for-a-contract} This test case describes setting a classifier for a specified contract (account contract or card contract) stored in the CMS. Refer to [Classifiers](https://developer.mastercard.com/mastercard-processing-core/documentation/guides/card-management-system/index.md#classifiers) for more information about Classifiers. For this test case, use the following information in the request: | Path parameter | Available value | |-------------------|--------------------| | `classifier_code` | TEST_CLASSIFIER_01 | | | TEST_CLASSIFIER_02 | **Sample request** `PUT /contracts/70001/classifiers/TEST_CLASSIFIER_01` ```JSON { "classifierValue": "VALUE_1A", "endDate": "2031-06-25", "startDate": "2031-06-25" } ``` **Sample response** `204` ## Test case -- Fail -- Invalid Contract's classifier code {#test-case--fail--invalid-contracts-classifier-code} This test case describes an attempt to set a classifier for a specified contract (account contract or card contract) stored in the CMS by sending an incorrect classifier code. Refer to [Classifiers](https://developer.mastercard.com/mastercard-processing-core/documentation/guides/card-management-system/index.md#classifiers) for more information about Classifiers. For this test case, use the following information in the request: | Path parameter | Available value | |-------------------|-----------------| | `classifier_code` | INVALID | **Sample request** `PUT /contracts/70001/classifiers/INVALID` ```JSON { "classifierValue": "YES", "endDate": "2031-06-25", "startDate": "2031-06-25" } ``` **Sample response** `404` ```JSON { "Errors": { "Error": [ { "Source": "MASTERCARD PROCESSING", "ReasonCode": "CLASSIFIER_CODE_DOES_NOT_EXIST", "Description": "Classifier with code INVALID not found.", "Recoverable": false } ] } } ``` ## Test case -- Fail -- Invalid Contract's classifier value {#test-case--fail--invalid-contracts-classifier-value} This test case describes an attempt to set a classifier for a specified contract (account contract or card contract) stored in the CMS by sending an incorrect classifier value. Refer to [Classifiers](https://developer.mastercard.com/mastercard-processing-core/documentation/guides/card-management-system/index.md#classifiers) for more information about Classifiers. For this test case, use the following information in the request: | Path parameter | Available value | |-------------------|--------------------| | `classifier_code` | TEST_CLASSIFIER_01 | | | TEST_CLASSIFIER_02 | | Field | Available value | |-------------------|-----------------| | `classifierValue` | INVALID | **Sample request** `PUT /contracts/70001/classifiers/TEST_CLASSIFIER_01` ```JSON { "classifierValue" : "INVALID", "endDate" : "2031-06-25", "startDate" : "2031-06-25" } ``` **Sample response** `404` ```JSON { "Errors": { "Error": [ { "Source": "MASTERCARD PROCESSING", "ReasonCode": "INVALID_CLASSIFIER_VALUE", "Description": "Invalid value INVALID for classifier with code TEST_CLASSIFIER_01.", "Recoverable": false } ] } } ```