BoxLatviaDevelopers
Get access
API reference

Reference data

Amenities, districts, price units and sizes are managed by BoxLatvia. You refer to them by code.

Tip
The lists are short and rarely change. Fetch them once a day at most and keep them in your system.

#Endpoints

#List reference data

GET/v1/reference/{kind}reference:read

The codes you use in other requests. Each row has a stable code: use it, never the Latvian name or the id. The lists are short and rarely change: fetch them once a day at most.

Path parameters

NameTypeDescription
kind requiredstringfeatures, feature-categories, districts, price-units or sizes.

Examples

features

Amenities. Used in features of locations and boxes.

curl "$API/v1/reference/features" \
  -u "$CLIENT_ID:$CLIENT_SECRET"
200 OK
{
  "data": [
    {
      "id": "6d0c5f4e-2b7a-4c1e-9f3a-81b2d4e7a001",
      "code": "pasapkalposanas-noliktavas",
      "name": "Pašapkalpošanās noliktavas",
      "category_code": "pakalpojuma-veids",
      "display_sequence": 0,
      "featured": false,
      "active": true
    },
    {
      "id": "a42f19c8-73de-4b56-8d0e-5c1f2a9b7002",
      "code": "24-7-piekluve",
      "name": "24/7 piekļuve",
      "category_code": "pieejamiba",
      "display_sequence": 1,
      "featured": true,
      "active": true
    },
    {
      "id": "f81e3b60-9a24-4d7c-b5e1-0d6c8a3f4003",
      "code": "apkure",
      "name": "Apkure",
      "category_code": "klimata-kontrole",
      "display_sequence": 1,
      "featured": false,
      "active": true
    }
  ]
}
districts

Used in district of locations.

curl "$API/v1/reference/districts" \
  -u "$CLIENT_ID:$CLIENT_SECRET"
200 OK
{
  "data": [
    {
      "id": "2b9e7d10-4c3f-4a85-9e62-7f1d0b5c8101",
      "code": "marupes-novads-pinki",
      "name": "Mārupes novads - Piņķi",
      "active": true
    },
    {
      "id": "c5a3f8e2-1d64-4b09-a7f3-3e8b9d2c6102",
      "code": "riga-agenskalns",
      "name": "Rīga - Āgenskalns",
      "active": true
    },
    {
      "id": "70d4b6a9-e851-4f32-8c1b-9a2e5f7d3103",
      "code": "riga-centrs",
      "name": "Rīga - Centrs",
      "active": true
    }
  ]
}
price-units

Used in price_unit of boxes.

curl "$API/v1/reference/price-units" \
  -u "$CLIENT_ID:$CLIENT_SECRET"
200 OK
{
  "data": [
    {
      "id": "9e1a4c73-5b2d-4e80-a6f9-2d7c3b8e1201",
      "code": "menesi",
      "name": "Mēnesī",
      "active": true
    },
    {
      "id": "3f6b8d25-a9c1-4720-b4e8-6c0d1a5f9202",
      "code": "nedela",
      "name": "Nedēļā",
      "active": true
    }
  ]
}
feature-categories

Groups the amenities.

curl "$API/v1/reference/feature-categories" \
  -u "$CLIENT_ID:$CLIENT_SECRET"
200 OK
{
  "data": [
    {
      "id": "d7c2e9a4-3b60-4f18-8a5d-1e4f7b0c2301",
      "code": "pakalpojuma-veids",
      "name": "Pakalpojuma veids",
      "display_sequence": 0,
      "service_type": true,
      "active": true
    },
    {
      "id": "4a8f1b36-c7d9-4e52-9b03-8d2a6e5f1302",
      "code": "pieejamiba",
      "name": "Pieejamība",
      "display_sequence": 1,
      "service_type": false,
      "active": true
    }
  ]
}
sizes

The standard box sizes in m². They have no code.

curl "$API/v1/reference/sizes" \
  -u "$CLIENT_ID:$CLIENT_SECRET"
200 OK
{
  "data": [
    {
      "id": "b3e5a7c9-2f41-4d68-a0b2-5e9c1d7f3401",
      "size": 1,
      "active": true
    },
    {
      "id": "18d6f0b4-8a3e-4c97-b5d1-7a2f9e4c6402",
      "size": 5,
      "active": true
    },
    {
      "id": "e9a2c4d6-0b8f-4137-8e5a-3c7b1f9d2403",
      "size": 12,
      "active": true
    }
  ]
}

Errors

StatusWhen
404kind is not one of the five lists.