BoxLatviaDevelopers
Get access
API reference

Supplier profile

Your company record and the credentials you are using.

#The Supplier object

NameTypeDescription
iduuidBoxLatvia's identifier.
namestringCompany name.
reg_nrstring | nullRegistration number. Read-only: managed by BoxLatvia.
vat_reg_nrstring | nullVAT number.
address address_city address_country countrystring | nullCompany address; country is the country code, for example LV.
person_typestring | nulllegal or natural. Read-only.
contact_person_name contact_person_email contact_person_phonestring | nullWho BoxLatvia contacts about your listings.
created_at updated_atdatetimeWhen 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:read

The 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"
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

StatusWhen
401Wrong or missing credentials.

#Retrieve your profile

GET/v1/suppliersupplier:read

Your company record, with the ETag needed to change it.

Example

Retrieve
curl "$API/v1/supplier" \
  -u "$CLIENT_ID:$CLIENT_SECRET"
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:write

Changes contact and address fields. The registration number, person type and anything commercial are managed by BoxLatvia and cannot be changed here.

Query parameters

NameTypeDescription
validate_onlybooleantrue runs every check and returns what would happen, but saves nothing. See dry runs.

Headers

NameTypeDescription
If-Match requiredstringThe 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)

NameTypeDescription
namestringCompany name, up to 255 characters.
vat_reg_nrstring | nullUp to 50 characters.
addressstring | nullUp to 255 characters.
address_citystring | nullUp to 50 characters.
address_countrystring | nullUp to 100 characters.
countrystring | nullCountry code, up to 10 characters.
contact_person_namestring | nullUp to 255 characters.
contact_person_emailstring | nullA valid e-mail address.
contact_person_phonestring | nullUp 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"
}'
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"
}'
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

StatusWhen
412The profile changed since you read it.
422A value is invalid, or the field is read-only.
428If-Match is missing.