Skip to content

Regions & categories

Two read-only endpoints expose the integer ids used by filters.regions[] and filters.categories[] on forecasts and drivers. Use them to build pickers in your UI or to validate ids on your side before submitting.

EndpointReturns
GET /api/v1/regionsAll regions, sorted by integer id ascending.
GET /api/v1/categoriesAll categories, sorted by integer id ascending.

Both are discovery only — the forecast and drivers endpoints do not cross-check ids against these listings. They only enforce the 19999 integer range.

Regions

bash
curl -sS -H "Authorization: Bearer $SYBILION_API_TOKEN" \
  https://api.sybilion.dev/api/v1/regions \
  | jq '{count: (.items | length), first: .items[0]}'
python
import os

from sybilion import Client

client = Client(token=os.environ["SYBILION_API_TOKEN"])

regions = client.raw.api_v1_regions_get()
print(len(regions.items), "regions; first:", regions.items[0])
go
package main

import (
	"context"
	"fmt"
	"log"
	"os"

	"go.sybilion.dev/sybilion"
)

func main() {
	c := sybilion.New(sybilion.Options{
		Token: os.Getenv("SYBILION_API_TOKEN"),
	})

	resp, _, err := c.DefaultAPI().ApiV1RegionsGet(context.Background()).Execute()
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(len(resp.Items), "regions")
}

Categories

bash
curl -sS -H "Authorization: Bearer $SYBILION_API_TOKEN" \
  https://api.sybilion.dev/api/v1/categories \
  | jq '{count: (.items | length), first: .items[0]}'
python
categories = client.raw.api_v1_categories_get()
print(len(categories.items), "categories; first:", categories.items[0])
go
resp, _, err := c.DefaultAPI().ApiV1CategoriesGet(context.Background()).Execute()
if err != nil {
	log.Fatal(err)
}
fmt.Println(len(resp.Items), "categories")

Response shape

Both endpoints return the same JSON envelope:

json
{
  "items": [
    {
      "id": 42,
      "name": "Example",
      "code": 100,
      "parent_id": null,
      "path": "/…",
      "latitude": 0.0,
      "longitude": 0.0
    }
  ]
}
  • items is the complete listing — there is no pagination.
  • Every entry includes integer id. Other fields (names, codes, hierarchy) depend on the dimension.

Cache the result on your side if you call frequently — payload size grows with the dataset.

Availability

If the dimensions backend is not enabled for your account, both endpoints return 503 with {"error": "…"}. Contact [email protected] if you need this feature.

See also

[email protected] · Slack · Discord (links in Community page & header icons)