Open311 GeoReport v2

Council developer API

Flag IT speaks Open311 GeoReport v2, so existing council CRM and highways systems can pull reports without new integration work. Every council gets its own API key and an HMAC-signed webhook.

1. Get your key

Council admins find the key in Council settings → API access. Send it as ?api_key= or the X-Api-Key header.

curl "https://your-app/api/open311/v2/requests?api_key=fi_live_..."

2. Or take webhooks

Set a webhook URL and Flag IT posts JSON as reports arrive. Verify the X-FlagIT-Signature header: HMAC-SHA256 of the raw body, keyed with your webhook secret.

X-FlagIT-Event: report.created
X-FlagIT-Signature: sha256=5f2c...

3. Keep it in sync

Push status changes back by calling GET /status, or let your officers work directly in the Flag IT council queue.

{ "service_request_id": "FI-8K2M4QX",
  "status": "closed",
  "status_notes": "Filled and resurfaced" }

Endpoints

MethodPathAuthWhat it does
GET/api/open311/v2/discoveryPublicService discovery document.
GET/api/open311/v2/servicesPublicService codes you can report against.
GET/api/open311/v2/requestsAPI keyYour council's reports. Filters: status, service_code, start_date, end_date, page, page_size.
POST/api/open311/v2/requestsAPI keyCreate a report inside your council. Accepts JSON or form-encoded bodies.
GET/api/open311/v2/requests/{id}API keyOne report by Flag IT reference.
GET/api/open311/v2/statusAPI keyStatus for ?service_request_id=FI-XXXX.

Service codes

The same codes are returned by /services.

Pothole or road damagepothole_road_damage
Fly tippingfly_tipping
Unclaimed rubbish or litterunclaimed_rubbish
Faulty street lightstreet_light_fault
Damaged pavement or kerbpavement_damage
Graffitigraffiti
Blocked drain or floodingblocked_drain
Overgrown or damaged treetree_issue
Abandoned vehicleabandoned_vehicle
Something elseother

Create a report

Useful when a council phone line takes a report that should also appear in Flag IT.

POST /api/open311/v2/requests
Content-Type: application/json

{
  "api_key": "fi_live_...",
  "service_code": "pothole_road_damage",
  "description": "Pothole 30cm wide outside the school gate",
  "address_string": "Kirkstall Road, Leeds",
  "lat": 53.8041,
  "long": -1.5591,
  "email": "highways@council.gov.uk"
}

Responses use the Open311 shape: [{"service_request_id","service_notice","account_id"}].

See connected councils →