Save district polygons on the map
POST
/api/crm/v2/districts.map_updatev2 operationId:
districts.mapUpdateSaves district polygons. The request body contains the entire map: a district not present in districts will lose its polygons—this is how the "Delete polygons" option in the district menu works. The district color is stored in its polygons and is deleted along with them, so color is required in each item.
Authorization
api-token + language + role
Query parameters
branch_idintegerrequired
Example: 1
Request body application/json
object
districtsobjectrequired
Dictionary values
object
colorstringrequired
Color in HEX format without the leading "#" symbol; required: a district without shapes does not have a color to use as a fallback
Example: 82B1FF
coordinatesarray of array of array of numberrequired
Responses
OK
object
statusstringrequired
Values:successerror
Example: success
dataobject