Companies

Add a location to a company

POST
https://api.searchsoftware.nl/v4/records/companies/{id}/locations

Creates a location for the company. Address fields: street, city, state, zip, country, country_code. formatted is always derived from them (street, city, zip, state, then country or country_code) and cannot be set. At least one address field must be non-empty, otherwise 422 EMPTY_LOCATION. When is_primary is omitted, the location becomes primary only if the company has no primary location yet; true makes it the only primary location, false keeps it non-primary. Requires companies:write.

Body

application/json
streetstring

Street address

citystring

City name

statestring

State, province or region

zipstring

Postal code

countrystring

Country name

country_codestring

ISO 3166-1 alpha-2 country code

is_primaryboolean

Make this the primary location

Parameters

idstringrequiredpath

Company ID

Response

Location created

Response fields application/json
statusstringrequired
Example
ok
dataLocationObjectrequired
Show child attributes
idstringrequired

Identifier

Example
vM7Lp2q
typestringrequired
Example
location
attributesLocationAttributesrequired
Show child attributes
streetstring | null

Street address

Example
Oudegracht 1
citystring | null
Example
Utrecht
statestring | null

State, province or region

Example
Utrecht
zipstring | null
Example
3511 AB
countrystring | null
Example
Netherlands
country_codestring | null
Example
NL
formattedstring | null

Derived from the address fields; read-only

Example
Oudegracht 1, Utrecht, 3511 AB, Utrecht, Netherlands
latstring | null

Read-only

lngstring | null

Read-only

is_primarybooleanrequired
Example
true
created_atstring<date-time> | null
Example
2026-01-15T09:00:00Z
updated_atstring<date-time> | null
Example
2026-01-15T09:00:00Z
400Bad RequestErrorResponse

Invalid id or body

Response fields application/json
statusstringerrorrequired
Example
error
errorErrorBodyrequired
Show child attributes
codestringrequired

Stable machine-readable error code.

status_codeinteger<int32>required

HTTP status code for this response.

messagestringrequired

Human-readable error message.

Example
{
  "status": "error",
  "error": {
    "code": "INVALID_BODY",
    "status_code": 400,
    "message": "Invalid request body"
  }
}
401UnauthorizedErrorResponse

Invalid API key

Response fields application/json
statusstringerrorrequired
Example
error
errorErrorBodyrequired
Show child attributes
codestringrequired

Stable machine-readable error code.

status_codeinteger<int32>required

HTTP status code for this response.

messagestringrequired

Human-readable error message.

Example
{
  "status": "error",
  "error": {
    "code": "INVALID_API_KEY",
    "status_code": 401,
    "message": "Invalid API key"
  }
}
403ForbiddenErrorResponse

Insufficient scope

Response fields application/json
statusstringerrorrequired
Example
error
errorErrorBodyrequired
Show child attributes
codestringrequired

Stable machine-readable error code.

status_codeinteger<int32>required

HTTP status code for this response.

messagestringrequired

Human-readable error message.

Example
{
  "status": "error",
  "error": {
    "code": "FORBIDDEN",
    "status_code": 403,
    "message": "Insufficient scope"
  }
}
404Not FoundErrorResponse

Company not found

Response fields application/json
statusstringerrorrequired
Example
error
errorErrorBodyrequired
Show child attributes
codestringrequired

Stable machine-readable error code.

status_codeinteger<int32>required

HTTP status code for this response.

messagestringrequired

Human-readable error message.

Example
{
  "status": "error",
  "error": {
    "code": "NOT_FOUND",
    "status_code": 404,
    "message": "Record not found"
  }
}
422Unprocessable EntityErrorResponse

EMPTY_LOCATION or validation error

Response fields application/json
statusstringerrorrequired
Example
error
errorErrorBodyrequired
Show child attributes
codestringrequired

Stable machine-readable error code.

status_codeinteger<int32>required

HTTP status code for this response.

messagestringrequired

Human-readable error message.

Example
{
  "status": "error",
  "error": {
    "code": "VALIDATION_FAILED",
    "status_code": 422,
    "message": "Validation failed"
  }
}
500Internal Server ErrorErrorResponse

Internal server error

Response fields application/json
statusstringerrorrequired
Example
error
errorErrorBodyrequired
Show child attributes
codestringrequired

Stable machine-readable error code.

status_codeinteger<int32>required

HTTP status code for this response.

messagestringrequired

Human-readable error message.

Example
{
  "status": "error",
  "error": {
    "code": "INTERNAL_ERROR",
    "status_code": 500,
    "message": "Internal server error"
  }
}

Authorization

bearer_authhttp (bearer) in header

API key or OAuth access token in Authorization header

Scopes: companies:write

oauth2_authoauth2

OAuth authorization code flow with mandatory S256 PKCE.

Scopes: companies:write

apikey_authapiKey in query

API key in query string

Scopes: companies:write