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 Type | Example URL |
|---|---|
| POST | {{url_base}}/PostAddProductFamily |
| Example | http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddProductFamily" |
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ProductFamilyNo | String(25) | Yes | External code of the product family |
| Name | String(40) | Yes | Product family description |
| OverwriteIfExists | Boolean | No | Flag indicating that data should be overwritten if the record already exists |
Return
| Parameter | Type | Required | Description |
|---|---|---|---|
| WebServiceReturn | WebServiceReturn | Yes | Standard WebService response information in method execution |
| ProductFamilyCode | Integer | Yes | Internal 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
| Code | Message |
|---|---|
| AFP‑001 | The provided External Product Family Code parameter (ProductFamilyNo) already exists! |