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 Type | Example URL |
|---|---|
| POST | {{url_base}}/PostAddLogisticRegion |
| Example | http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddLogisticRegion" |
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| LogisticRegionNo | String(25) | Yes | External code of the Logistic Region |
| LogisticRegionName | String(40) | Yes | Logistic Region description |
| RiskDegree | Integer | Yes | Enumerator with possible values for Risk Degree: rdLow (Low), rdMedium (Medium) or rdHigh (High) |
| SubLogisticRegionList | SubLogisticRegionDataList | Yes | List of Sub Logistic Region (if there is none, pass the same information as the Logistic Region) |
| OverwriteIfExists | Boolean | No | Flag 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
Parameter Type Required Description SubLogisticRegionNo String(25) Yes External code of the Sub Logistic Region SubLogisticRegionName String(40) Yes Sub Logistic Region 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 |
| LogisticRegionCode | Integer | Yes | Internal 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
| Code | Message |
|---|---|
| LRE‑001 | The provided External Logistic Region Code parameter (LogisticRegionNo) already exists! |
| LRE‑002 | The provided External Sub Logistic Region Code parameter (SubLogisticRegionNo) already exists! |