POST api/CreateTerritory
Request Information
URI Parameters
None.
Body Parameters
TerritoryRequestName | Description | Type | Additional information |
---|---|---|---|
territoryDetail | Collection of DSMTerritoryDetail |
None. |
|
territoryCoordinates | Collection of DSMTerritoryCoordinates |
None. |
|
orgId | string |
None. |
Request Formats
application/json, text/json
Sample:
{ "territoryDetail": [ { "territoryId": "sample string 1", "territoryName": "sample string 2", "territoryAddress": "sample string 3", "territoryRadius": 4.1, "isActive": true, "orgId": "sample string 6", "isOutOfTerritory": true, "parentTerritoryId": "sample string 8" }, { "territoryId": "sample string 1", "territoryName": "sample string 2", "territoryAddress": "sample string 3", "territoryRadius": 4.1, "isActive": true, "orgId": "sample string 6", "isOutOfTerritory": true, "parentTerritoryId": "sample string 8" } ], "territoryCoordinates": [ { "latitude": "sample string 1", "longitude": "sample string 2", "territoryId": "sample string 3", "territorySequence": 4.1 }, { "latitude": "sample string 1", "longitude": "sample string 2", "territoryId": "sample string 3", "territorySequence": 4.1 } ], "orgId": "sample string 1" }
application/xml, text/xml
Sample:
<TerritoryRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RouteOptimizerWebAPI.Models"> <orgId>sample string 1</orgId> <territoryCoordinates> <DSMTerritoryCoordinates> <latitude>sample string 1</latitude> <longitude>sample string 2</longitude> <territoryId>sample string 3</territoryId> <territorySequence>4.1</territorySequence> </DSMTerritoryCoordinates> <DSMTerritoryCoordinates> <latitude>sample string 1</latitude> <longitude>sample string 2</longitude> <territoryId>sample string 3</territoryId> <territorySequence>4.1</territorySequence> </DSMTerritoryCoordinates> </territoryCoordinates> <territoryDetail> <DSMTerritoryDetail> <isActive>true</isActive> <isOutOfTerritory>true</isOutOfTerritory> <orgId>sample string 6</orgId> <parentTerritoryId>sample string 8</parentTerritoryId> <territoryAddress>sample string 3</territoryAddress> <territoryId>sample string 1</territoryId> <territoryName>sample string 2</territoryName> <territoryRadius>4.1</territoryRadius> </DSMTerritoryDetail> <DSMTerritoryDetail> <isActive>true</isActive> <isOutOfTerritory>true</isOutOfTerritory> <orgId>sample string 6</orgId> <parentTerritoryId>sample string 8</parentTerritoryId> <territoryAddress>sample string 3</territoryAddress> <territoryId>sample string 1</territoryId> <territoryName>sample string 2</territoryName> <territoryRadius>4.1</territoryRadius> </DSMTerritoryDetail> </territoryDetail> </TerritoryRequest>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
TerritoryResultName | Description | Type | Additional information |
---|---|---|---|
territoryBoundries | Collection of DSMTerritoryCoordinates |
None. |
|
success | boolean |
None. |
|
error | string |
None. |
Response Formats
application/json, text/json
Sample:
{ "success": true, "error": "sample string 2", "territoryBoundries": [ { "latitude": "sample string 1", "longitude": "sample string 2", "territoryId": "sample string 3", "territorySequence": 4.1 }, { "latitude": "sample string 1", "longitude": "sample string 2", "territoryId": "sample string 3", "territorySequence": 4.1 } ] }
application/xml, text/xml
Sample:
<TerritoryResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RouteOptimizerWebAPI.Models"> <error>sample string 2</error> <success>true</success> <territoryBoundries> <DSMTerritoryCoordinates> <latitude>sample string 1</latitude> <longitude>sample string 2</longitude> <territoryId>sample string 3</territoryId> <territorySequence>4.1</territorySequence> </DSMTerritoryCoordinates> <DSMTerritoryCoordinates> <latitude>sample string 1</latitude> <longitude>sample string 2</longitude> <territoryId>sample string 3</territoryId> <territorySequence>4.1</territorySequence> </DSMTerritoryCoordinates> </territoryBoundries> </TerritoryResult>