Skip to main content

Product Family

The PostAddProductFamily endpoint is responsible for registering a new product family in the MIMS system and can be viewed on screen CAD193.


How to register a product family​

HTTP POST Request

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

Input Parameters​

ParameterTypeRequiredDescription
ProductFamilyNoString(25)YesExternal code of the product family
NameString(40)YesProduct family description
OverwriteIfExistsBooleanNoFlag indicating that data should be overwritten if the record already exists

Return​

ParameterTypeRequiredDescription
WebServiceReturnWebServiceReturnYesStandard WebService response information in method execution
ProductFamilyCodeIntegerYesInternal product family code generated in the MIMS system

Request Example​

curl --location 'http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddProductFamily"' \
--header 'Content-Type: application/json' \
--data '{
"ProductFamilyNo": "FAMI123",
"Name": "Família Exemplo",
"OverwriteIfExists": true
}'

Response Example​

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

🐞 Possible Errors​

CodeMessage
AFP‑001The provided External Product Family Code parameter (ProductFamilyNo) already exists!