Skip to main content

Logistic Region

The PostAddLogisticRegion endpoint is responsible for registering a Logistic Region in the MIMS system and can be viewed on screen CAD036.


How to register a logistic region​

HTTP POST Request

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

Input Parameters​

ParameterTypeRequiredDescription
LogisticRegionNoString(25)YesExternal code of the Logistic Region
LogisticRegionNameString(40)YesLogistic Region description
RiskDegreeIntegerYesEnumerator with possible values for Risk Degree: rdLow (Low), rdMedium (Medium) or rdHigh (High)
SubLogisticRegionListSubLogisticRegionDataListYesList of Sub Logistic Region (if there is none, pass the same information as the Logistic Region)
OverwriteIfExistsBooleanNoFlag indicating that data should be overwritten if the record already exists

📝 SubLogisticRegionDataList Object​

The SubLogisticRegionDataList object represents a list of Sub Logistic Regions belonging to a Logistic Region.

Input Parameters​

ParameterTypeRequiredDescription
SubLogisticRegionNoString(25)YesExternal code of the Sub Logistic Region
SubLogisticRegionNameString(40)YesSub Logistic Region description
OverwriteIfExistsBooleanNoFlag indicating that data should be overwritten if the record already exists

Return​

ParameterTypeRequiredDescription
WebServiceReturnWebServiceReturnYesStandard WebService response information in method execution
LogisticRegionCodeIntegerYesInternal Logistic Region code generated in the MIMS system

Request Example​

curl --location 'http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddLogisticRegion"' \
--header 'Content-Type: application/json' \
--data '{
"LogisticRegionNo": "001",
"LogisticRegionName": "Região Norte",
"RiskDegree": "rdMedium",
"SubLogisticRegionList": [
{
"SubLogisticRegionNo": "001-1",
"SubLogisticRegionName": "SubRegião Norte A",
"OverwriteIfExists": true
}
],
"OverwriteIfExists": true
}'

Response Example​

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

🐞 Possible Errors​

CodeMessage
LRE‑001The provided External Logistic Region Code parameter (LogisticRegionNo) already exists!
LRE‑002The provided External Sub Logistic Region Code parameter (SubLogisticRegionNo) already exists!