API reference
Supplier profile
Your company record and the credentials you are using.
#The Supplier object
| Name | Type | Description |
|---|---|---|
id | uuid | BoxLatvia's identifier. |
name | string | Company name. |
reg_nr | string | null | Registration number. Read-only: managed by BoxLatvia. |
vat_reg_nr | string | null | VAT number. |
address address_city address_country country | string | null | Company address; country is the country code, for example LV. |
person_type | string | null | legal or natural. Read-only. |
contact_person_name contact_person_email contact_person_phone | string | null | Who BoxLatvia contacts about your listings. |
created_at updated_at | datetime | When it was created and last changed (UTC). |
Example
{
"id": "9fbb9ba2-6be5-4ae3-9b54-9fd36e889130",
"name": "Imanta Storage SIA",
"reg_nr": "40103456789",
"vat_reg_nr": "LV40103456789",
"address": "Kurzemes prospekts 1",
"address_city": "Rīga",
"address_country": "Latvija",
"country": "LV",
"person_type": "legal",
"contact_person_name": "Anna Bērziņa",
"contact_person_email": "anna@imantastorage.example",
"contact_person_phone": "+371 20000000",
"created_at": "2026-11-07T09:30:12.418Z",
"updated_at": "2026-11-07T09:30:12.418Z"
}#Endpoints
#Who am I
GET
/v1/mesupplier:readThe credentials you are calling with, their scopes, and your supplier profile. The first call to make to check that everything works.
Example
Check your credentials
curl "$API/v1/me" \
-u "$CLIENT_ID:$CLIENT_SECRET"const API = "https://api.boxlatvia.lv";
const auth = "Basic " + btoa(`${CLIENT_ID}:${CLIENT_SECRET}`);
const res = await fetch(`${API}/v1/me`, {
headers: { Authorization: auth },
});
console.log(res.status, await res.json());import requests
API = "https://api.boxlatvia.lv"
r = requests.get(
f"{API}/v1/me",
auth=(CLIENT_ID, CLIENT_SECRET),
)
print(r.status_code, r.json())200 OK
{
"client": {
"client_id": "bxc_8F2ZPMcAmQZzr243",
"scopes": [
"reference:read",
"supplier:read",
"supplier:write",
"locations:read",
"locations:write",
"boxes:read",
"boxes:write",
"images:write"
]
},
"supplier": {
"id": "9fbb9ba2-6be5-4ae3-9b54-9fd36e889130",
"name": "Imanta Storage SIA",
"reg_nr": "40103456789",
"vat_reg_nr": "LV40103456789",
"address": "Kurzemes prospekts 1",
"address_city": "Rīga",
"address_country": "Latvija",
"country": "LV",
"person_type": "legal",
"contact_person_name": "Anna Bērziņa",
"contact_person_email": "anna@imantastorage.example",
"contact_person_phone": "+371 20000000",
"created_at": "2026-11-07T09:30:12.418Z",
"updated_at": "2026-11-07T09:30:12.418Z"
}
}Errors
| Status | When |
|---|---|
| 401 | Wrong or missing credentials. |
#Retrieve your profile
GET
/v1/suppliersupplier:readYour company record, with the ETag needed to change it.
Example
Retrieve
curl "$API/v1/supplier" \
-u "$CLIENT_ID:$CLIENT_SECRET"const API = "https://api.boxlatvia.lv";
const auth = "Basic " + btoa(`${CLIENT_ID}:${CLIENT_SECRET}`);
const res = await fetch(`${API}/v1/supplier`, {
headers: { Authorization: auth },
});
console.log(res.status, await res.json());import requests
API = "https://api.boxlatvia.lv"
r = requests.get(
f"{API}/v1/supplier",
auth=(CLIENT_ID, CLIENT_SECRET),
)
print(r.status_code, r.json())200 OKETag: W/"6b0bdad3b902b9d4e44a2772"
{
"id": "9fbb9ba2-6be5-4ae3-9b54-9fd36e889130",
"name": "Imanta Storage SIA",
"reg_nr": "40103456789",
"vat_reg_nr": "LV40103456789",
"address": "Kurzemes prospekts 1",
"address_city": "Rīga",
"address_country": "Latvija",
"country": "LV",
"person_type": "legal",
"contact_person_name": "Anna Bērziņa",
"contact_person_email": "anna@imantastorage.example",
"contact_person_phone": "+371 20000000",
"created_at": "2026-11-07T09:30:12.418Z",
"updated_at": "2026-11-07T09:30:12.418Z"
}#Update your profile
PATCH
/v1/suppliersupplier:writeChanges contact and address fields. The registration number, person type and anything commercial are managed by BoxLatvia and cannot be changed here.
Query parameters
| Name | Type | Description |
|---|---|---|
validate_only | boolean | true runs every check and returns what would happen, but saves nothing. See dry runs. |
Headers
| Name | Type | Description |
|---|---|---|
If-Match required | string | The ETag from a previous GET, exactly as received. 428 if missing, 412 if the object changed since. See conditional updates. |
Request body (any of the fields)
| Name | Type | Description |
|---|---|---|
name | string | Company name, up to 255 characters. |
vat_reg_nr | string | null | Up to 50 characters. |
address | string | null | Up to 255 characters. |
address_city | string | null | Up to 50 characters. |
address_country | string | null | Up to 100 characters. |
country | string | null | Country code, up to 10 characters. |
contact_person_name | string | null | Up to 255 characters. |
contact_person_email | string | null | A valid e-mail address. |
contact_person_phone | string | null | Up to 50 characters. |
Examples
Change the contact person
curl -X PATCH "$API/v1/supplier" \
-u "$CLIENT_ID:$CLIENT_SECRET" \
-H "Content-Type: application/json" \
-H "If-Match: W/\"6b0bdad3b902b9d4e44a2772\"" \
-d '{
"contact_person_name": "Anna Bērziņa",
"contact_person_phone": "+371 29999999"
}'const API = "https://api.boxlatvia.lv";
const auth = "Basic " + btoa(`${CLIENT_ID}:${CLIENT_SECRET}`);
const res = await fetch(`${API}/v1/supplier`, {
method: "PATCH",
headers: { Authorization: auth, "Content-Type": "application/json", "If-Match": "W/\"6b0bdad3b902b9d4e44a2772\"" },
body: JSON.stringify({
"contact_person_name": "Anna Bērziņa",
"contact_person_phone": "+371 29999999"
}),
});
console.log(res.status, await res.json());import requests
API = "https://api.boxlatvia.lv"
r = requests.patch(
f"{API}/v1/supplier",
auth=(CLIENT_ID, CLIENT_SECRET),
headers={"If-Match": "W/\"6b0bdad3b902b9d4e44a2772\""},
json={
"contact_person_name": "Anna Bērziņa",
"contact_person_phone": "+371 29999999",
},
)
print(r.status_code, r.json())200 OKETag: W/"d009965c37d9059fd03fc7bd"
{
"id": "9fbb9ba2-6be5-4ae3-9b54-9fd36e889130",
"name": "Imanta Storage SIA",
"reg_nr": "40103456789",
"vat_reg_nr": "LV40103456789",
"address": "Kurzemes prospekts 1",
"address_city": "Rīga",
"address_country": "Latvija",
"country": "LV",
"person_type": "legal",
"contact_person_name": "Anna Bērziņa",
"contact_person_email": "anna@imantastorage.example",
"contact_person_phone": "+371 29999999",
"created_at": "2026-11-07T09:30:12.418Z",
"updated_at": "2026-11-07T14:05:41.092Z"
}A field you cannot change
curl -X PATCH "$API/v1/supplier" \
-u "$CLIENT_ID:$CLIENT_SECRET" \
-H "Content-Type: application/json" \
-H "If-Match: W/\"6b0bdad3b902b9d4e44a2772\"" \
-d '{
"reg_nr": "40000000000"
}'const API = "https://api.boxlatvia.lv";
const auth = "Basic " + btoa(`${CLIENT_ID}:${CLIENT_SECRET}`);
const res = await fetch(`${API}/v1/supplier`, {
method: "PATCH",
headers: { Authorization: auth, "Content-Type": "application/json", "If-Match": "W/\"6b0bdad3b902b9d4e44a2772\"" },
body: JSON.stringify({
"reg_nr": "40000000000"
}),
});
console.log(res.status, await res.json());import requests
API = "https://api.boxlatvia.lv"
r = requests.patch(
f"{API}/v1/supplier",
auth=(CLIENT_ID, CLIENT_SECRET),
headers={"If-Match": "W/\"6b0bdad3b902b9d4e44a2772\""},
json={
"reg_nr": "40000000000",
},
)
print(r.status_code, r.json())422 Unprocessable Content
{
"type": "https://api.boxlatvia.lv/problems/validation-failed",
"title": "Validation failed",
"status": 422,
"detail": "One or more fields are invalid.",
"request_id": "cbdec2b6-9801-4029-b202-f8ec8edce88d",
"errors": [
{
"field": "reg_nr",
"message": "is read-only; ask BoxLatvia to change it"
}
]
}Errors
| Status | When |
|---|---|
| 412 | The profile changed since you read it. |
| 422 | A value is invalid, or the field is read-only. |
| 428 | If-Match is missing. |