address_management/set_area.php

Last modified by YellowFox_RD on 2025/01/23 09:11

Table of Contents

This function allows you to create, update and delete server-based territories.

Description

POST /address_management/set_areas.php?company=RTI_COMPANYKEY&import=RTI_IMPORTKEY&type=square&coordinates=[{"lat":13.33889,"lon":50.89091}]&name=name&costCenter=kosten&useInTimeRecording=0&useInMap=0&mode=create&category=passive

Parameter

ParameterDescriptionTypeNoteObligation
companyRTI Company keystring yes
importRTI Import keystring yes
modeDistinguishing between the different actionsstringParameter
  • create = Create new area
  • update =Update area
  • delete = Delete area
yes
categoryArea categorystringis currently always 'passiveyes
uuidFor the unique identification of the areastringMandatory for update and delete modeyes
typeType of areastringOptional parameter
  • polygon
  • polyline
  • square
yes(1)
coordinatesLatitude/Longitude
Example:[{"lat":13.33889,"lon":50.89091},{"lat":13.32491,"lon":50.89091},{"lat":13.32491,"lon":50.89989},{"lat":13.33889,"lon":50.89989}]
stringCoordinates for the area type:
  • polygon = minimum 3
  • polyline = minimum 2
  • square  = Exactly one coordinate
yes(1)(2)
nameArea namestringmax. 50 Charactersyes(1)(2)
costCenterCost centreinteger no
useInTimeRecordingShould the area be displayed in the time recording?integerOptional Parameter
  • 0 (Standard) =Do not show area in time recording
  • 1 = Show area in time recording
no
useInMapShould the area be displayed on the map?integerOptional Parameter
  • 0 (Standard) =Do not show area on map
  • 1 = Show area in map
no
radiusRoute width in metresintegerOnly if area type 'polyline' or 'square'.
Min. 200 und Max. 20.000
yes(1)(2)

Notes:
1) Mandatory in 'create' mode
2)  Optional in 'update' mode

Return

A string is returned. Otherwise a "ERROR:Description" returned

Parameter

ParameterDescriptionType
uuidTo clearly identify the areastring
statusOutputs OK if the action performed was successfulstring

JSON Format

  {
       "uuid": "ABC-123-DEF",
       "status": "OK"
 }

Examples

https://map.yellowfox.de/rti/address_management/set_area.php?company=COMPANY_KEY&import=IMPORT_KEY&type=polygon&coordinates=[{"lat":13.33889,"lon":50.89091},{"lat":13.32491,"lon":50.89091},{"lat":13.32491,"lon":50.89989},{"lat":13.33889,"lon":50.89989}]&name=testing123456&costCenter=012&useInTimeRecording=0&useInMap=0&mode=create&category=passive