location.create

Create a Location entity to capture detailed information about a location.

POST http://api.kompliant.com/location.create (OpenAPI specification)

Usage Info

The Location entity stores comprehensive information about location, including location type, name, owner details and address details. This entity can be associated with businesses as BusinessLocation or used independently within a Subject Record. Use this method to create a location profile for a subject record or to get a location that gets associated with location.

Request

Authentication: KSig1-HMAC-SHA256

Parameters

ParameterTypeRequiredDescription
subject_record_idstringYesThe Subject Record to add this Location to.
locationobjectNoThe location parameter is defined in the table below.

Location Parameters

ParameterTypeRequiredDescription
location_typeenumNoThe type of the location. Must be one of LOCATION_TYPES .
location_namestringNoThe name of a location.
owner_typeenumNoThe type of location owner. Must be one of LOCATION_OWNER_TYPES .
owner_namestringNoThe name of an owner of a location.
addressobjectNoThe address details for a location. The address parameter is defined in the table below.

Address Parameters

ParameterTypeRequiredDescription
line1stringNoPrimary street address information (building number, street name).
line2stringNoSecondary address information (apartment, suite, unit, etc.)
citystringNoCity or municipality name
statestringNoTwo character code for the state. Must be one of the STATES.
postal_codestringNoZIP or postal code for mail delivery
countrystringNoTwo character code for the country where the address is located. Must be one of the COUNTRIES.

Example

{
  "subject_record_id": "sr_57WfSCnafMnxDiWMKcy3EW",
  "person": {
    "location_type": "PROPERTY",
    "location_name": "Lake House",
    "owner_type": "BUSINESS",
    "owner_name": "Mark Johnson",
    "address": {
      "line1": "123 Maple Avenue",
      "line2": "Apartment 4B",
      "city": "Portland",
      "state": "OR",
      "postal_code": "97204",
      "country": "US"
    }
  }
}

Response

Data

ParameterTypeDescription
locationobjectThe location parameter defined in the tables below.

Location Parameters

ParameterTypeDescription
location_idstringThe identifier for the Location just created.

Example

{
  "meta": {
    "status": "SUCCESS",
    "trace_id": "trc_3XsPP17u8mU3k29x944ygx",
    "version": "2025-03-24"
  },
  "data": {
    "location": {
      "location_id": "l_4PYsekjAX8VMuAOfmW81C7"
    }
  }
}

Errors

Error CodeHTTP CodePossible Cause
BAD_REQUEST400Required parameters not provided.
Enum value provided does not correspond to an available type.
ENTITY_NOT_FOUND400The subject_record_id provided does not exist.
ACCOUNT_CONFIGURATION_VIOLATION400Account configuration rule violations are described below.
SYSTEM_RULE_VIOLATION400System rule violations are described below.

System Rule Violations

When a SYSTEM_RULE_VIOLATION error occurs, the response will include additional entity_type and sub_code fields to provide more specific information:

Entity TypeSub-codeDescription
Subject RecordMAX_LOCATION_LIMITThe maximum number of locations has been reached for this Subject Record.

ACCOUNT_CONFIGURATION_VIOLATION

When a ACCOUNT_CONFIGURATION_VIOLATION error occurs, the response will include additional entity_type and sub_code fields to provide more specific information:

Entity TypeSub-codeDescription
LocationFEATURE_NOT_ENABLEDLocation feature is not enabled for this account.