Bulk Assign Locations to Districts
POST
/api/v1/locations/bulk-district-assignments
Token needs the update ability.
About tokens
Assigns many locations to districts within a single district group in one request. The group's index determines which slot is written (index 0 → district_id, otherwise district_id_2). Every assigned district must belong to the named district group. Requires the update ability and create permission on locations.
Request body application/json
-
district_group_idstring (uuid) required -
assignmentsarray of object required-
locationstring (uuid) requiredLocation UUID. -
district_idstring (uuid) required
-
Responses
-
-
district_groupstring -
district_columnstringdistrict_iddistrict_id_2 -
totalinteger -
success_countinteger -
error_countinteger -
resultsarray of object-
indexinteger -
locationstring -
districtstring -
statusstring
-
-
-
-
messagestring
-
-
-
messagestring
-
-
-
messagestring -
errorsobject
-
curl -X POST "https://app.franchisesee.com/api/v1/locations/bulk-district-assignments" \
-H "Authorization: Bearer $FRANCHISESEE_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"district_group_id": "e1a4c8b2-7d3f-4b6e-9a2c-8f5d1e3b7a90",
"assignments": [
{
"location": "9b1c8f3e-7a2d-4c5b-8e1a-2f3d4c5b6a7e",
"district_id": "3f2a1b0c-9d8e-4f7a-b6c5-d4e3f2a1b0c9"
}
]
}'
Response
{
"district_group": "Region",
"district_column": "district_id",
"total": 3,
"success_count": 2,
"error_count": 1,
"results": [
{
"index": 0,
"location": "Downtown Austin",
"district": "Central Texas",
"status": "success"
}
]
}