Skip to main content

Customer Group


Customer Group Registration

The PostAddCustomerGroup endpoint is responsible for registering a new Customer Group in the MIMS system. This registration can be viewed on screen CAD028.


How to register a customer group

HTTP POST Request

Request TypeExample URL
POST{{url_base}}/PostAddCustomerGroup
Examplehttp://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddCustomerGroup"

Input Parameters

ParameterTypeRequiredDescription
CustomerGroupNoString(25)YesExternal code of the customer group
NameString(40)YesCustomer group description
OverwriteIfExistsBooleanNoFlag indicating that data should be overwritten if the record already exists

Return

ParameterTypeRequiredDescription
WebServiceReturnWebServiceReturnYesStandard WebService response information in method execution
CustomerGroupCodeIntegerYesInternal Customer Group code generated in the MIMS system

Request Example

curl --location 'http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddCustomerGroup"' \
--header 'Content-Type: application/json' \
--data '{
"CustomerGroupNo": "CG001",
"Name": "Clientes Varejo",
"OverwriteIfExists": true
}'

Response Example

{
"WebServiceReturn": {
"Status": "wrsSuccess",
"ErrorCode": "",
"Message": "",
"Actor": "",
"ReturnQuestion": null
},
"CustomerGroupCode": 4
}

🐞 Possible Errors

CodeMessage
ACG‑001The provided External Customer Group Code parameter (CustomerGroupNo) already exists!


Customer Group Deletion

The PostDeleteCustomerGroup endpoint is responsible for executing the deletion of a Customer Group in the MIMS system.


How to delete a customer group

HTTP POST Request

Request TypeExample URL
POST{{url_base}}/PostDeleteCustomerGroup
Examplehttp://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostDeleteCustomerGroup"

Input Parameters

ParameterTypeRequiredDescription
CustomerGroupNoString(25)YesExternal code of the customer group
ErrorIfNotFoundBooleanNoReturns error if the informed customer group does not exist in the database

Return

ParameterTypeRequiredDescription
WebServiceReturnWebServiceReturnYesStandard WebService response information in method execution

Request Example

curl --location 'http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostDeleteCustomerGroup"' \
--header 'Content-Type: application/json' \
--data '{
"CustomerGroupNo": "CG001",
"ErrorIfNotFound": false
}'

Response Example

{
"WebServiceReturn": {
"Status": "wrsSuccess",
"ErrorCode": "",
"Message": "",
"Actor": "",
"ReturnQuestion": null
}
}

🐞 Possible Errors

CodeMessage
DCG‑001The informed customer group belongs to a customer, therefore it cannot be deleted!
DCG‑002The provided External Customer Group Code parameter (CustomerGroupNo) was not found!