business.addLocation
Associate a Location entity as a BusinessLocation for a specific Business entity.
POST http://api.kompliant.com/business.addLocation (OpenAPI specification)
Usage Info
This method establishes an association between a Location and a Business entity. Multiple locations can be associated with a single business entity. Use this method when associating location profiles to a existing business.
Request
Authentication: KSig1-HMAC-SHA256
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| business_id | string | Yes | The Business to add this Location to. |
| business_location | object | Yes | The business_location parameters are defined in the table below. |
Business_Location Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| location_id | string | Yes | The identifier of the Location Entity to be added to the Business. |
Example
{
"business_id": "b_7eobHllxknr7mfqbjnX2Pp",
"business_location": {
"location_id": "l_4PYsekjAX8VMuAOfmW81C7"
}
}
Response
Data
| Parameter | Type | Description |
|---|---|---|
| business_location | object | The business_location parameter defined in the tables below. |
Business Location Parameters
| Parameter | Type | Description |
|---|---|---|
| business_location_id | string | The identifier for the BusinessLocation just created. |
Example
{
"meta": {
"status": "SUCCESS",
"trace_id": "trc_2h1MG0xRq9dPAPWLuygFk5",
"version": "2025-03-24"
},
"data": {
"business_location": {
"business_location_id": "bl_5nCWRq51h3ILIJvOOhfF4i"
}
}
}
Errors
| Error Code | HTTP Code | Possible Cause |
|---|---|---|
| ACCOUNT_CONFIGURATION_VIOLATION | 400 | Account configuration rule violations are described below. |
| BAD_REQUEST | 400 | Required parameters not provided. Invalid values provided. Enum value provided does not correspond to an available type. |
| ENTITY_NOT_FOUND | 400 | The business_id provided does not exist. |
| SYSTEM_RULE_VIOLATION | 400 | System rule violations are described below. |
Account Configuration Violations
When a ACCOUNT_CONFIGURATION_VIOLATION error occurs, the response will include additional entity_type and sub_code fields to provide more specific information:
| Entity Type | Sub-code | Description |
|---|---|---|
| Location | FEATURE_NOT_ENABLED | Location feature is not enabled for this account. |
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 Type | Sub-code | Description |
|---|---|---|
| SubjectRecord | CROSS_SUBJECT_RECORD_REFERENCE | The referenced entities must belong to the same subject record. Associations cannot be created between entities that exist in different subject records. |
| Business | DUPLICATE_LOCATION_ASSOCIATION | This Location is already registered with this Business entity. |
| Business | MAX_LOCATION_LIMIT | The maximum number of locations has been reached for this Business entity. |
Updated 6 months ago