Ref ID

Geographies such as postcodes, municipalities and counties come from reference datasets, one per country and type: for example "Postcode 5 - se" or "Municipality - no". The ref ID identifies the dataset (the version of it) that a geography comes from. Together with a Feature ID it points at one geography.

The easiest place to find it is in an area: every group in geo_ids_ref_groups has a ref_id (see Polygon ID).

To list all datasets available to you:

curl https://app-api.geposit.se/v2.0/datasets/ref/ \
  --header 'x-api-key: {API_KEY}'
[
  {
    "id": "DATASET_ID",
    "name": "Sweden",
    "country": "se",
    "groups": [
      {
        "id": "GROUP_ID",
        "name": "County",
        "level": "county",
        "versions": [
          {
            "id": "REF_ID",
            "name": "County",
            "country": "se"
          }
        ]
      }
    ]
  }
]

(Shortened.) The ref ID is groups[].versions[].id. Often it equals the group's id, but not always, so read it from the version.


Did this page help you?