4a Get Facilities

Step 4a: Get Facilities

Retrieve facility locations with polygon geometries for map rendering. Filter by asset_task_id from Step 1.

What this step does

It lists the facility records that the upload created, scoped to this task via filter[assets.task_id]=eq:{task-id}. Each facility carries its geometry, so the response doubles as the polygon source for the map and the key set the metric steps (4c/4d) join against by facility_id.

Why it's needed

The metrics endpoints return values keyed by facility_id but not the facility's name, country, or shape. This call supplies those โ€” it's the location half of the location-plus-metric join. Filtering by assets.task_id keeps the result to exactly the facilities from this upload rather than every facility in the org, so the confirmation reflects only what the quick ingestion just produced.

Request

GET /locations/facilities?filter[assets.task_id]=eq:{task-id}