Skip to content
API reference / Locations
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_id string (uuid) required
  • assignments array of object required
    • location string (uuid) required
      Location UUID.
    • district_id string (uuid) required

Responses

    • district_group string
    • district_column string
      district_id district_id_2
    • total integer
    • success_count integer
    • error_count integer
    • results array of object
      • index integer
      • location string
      • district string
      • status string
    • message string
    • message string
    • message string
    • errors object
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"
        }
    ]
}