The Customer Management service allows you to manage customers in your system.
Supports upsert operations, enabling seamless updates and inserts for customer information
Enables management of locations, including creation, retrieval, updates, and deletion of location data
Allows for the creation, retrieval, updating, and deletion of contact assignments for customer relationships
Facilitates legal entity management
Provides search functionality for legal entities based on customizable parameters
Streamlines the handling of customer data, ensuring efficient customer management processes
Take a look at the relationships between objects in the Customer Management Service and other resources in the Emporix Commerce Engine. Click the diagram to enlarge it:
Setting up a business customer's information is a process made up of two steps:
Make sure you have marked the country in which the company operates as active. You can do it by sending a request to the endpoint in the Emporix API Country Service.
A location is a physical address where a company operates, such as its headquarters, office, or warehouse. To add a new location, send a request to the endpoint.
The id from the response is further referred to as locationId.
A legal entity is a representation of a company. To add a new legal entity, send a request to the endpoint.
Subsidiaries are companies legally owned or controlled by other companies. In the Emporix Commerce Engine, subsidiaries are structured the same way as regular companies — the only difference is that a subsidiary must have its parent company specified.
Make sure you have already finished the tutorial.
To find out what a company ID is, send a request to the endpoint and use the q query parameter to find the desired company.
The id from the response is further referred to as parentId.
Subsidiaries are added similarly to their parent companies. To add a new subsidiary, send a request to the endpoint. In the request body, set the type field to SUBSIDIARY and provide the parentId.
You can offer personalized pricing to your business customers' employees by adding them to company customer groups. A company customer group is automatically created when that company data is added to the system.
When added to a subsidiary customer group, the employee is also automatically assigned to customer groups of all the subsidiary parent companies.
Make sure the following requirements are fulfilled:
You have already finished the tutorial.
The employee has their customer account set up.
A customer account can be created by the employee themselves or from your Emporix tenant's side. For more information, check out the following endpoints in the Emporix API Reference:
To find out what a company ID is, send a request to the endpoint and use the q query parameter to find the desired company.
The id from the response is further referred to as legalEntityId.
To retrieve an employee's customer ID, send a request to the endpoint and use the q query parameter. For example, you can search for a customer with a specific email address with q=contactEmail:employeeEmail.
The id from the response is further referred to as customerId.
A contact represents an employee of one or more business customers. To assign a contact to a legal entity (in this case, the desired company), send a request to the endpoint and provide legalEntityId and customerId in the request body.
Once desired employees are added to appropriate customer groups, you can — for example — create personalized price lists for them. For instructions, check out in the Price Service guide.
Emporix platform enforces rules when assigning customers to predefined groups to ensure role assignments remain valid and avoid conflicts. Within a single company, a user can belong to only one predefined group. Validation applies within the scope of a single company (legal entity) only. It does not extend across different companies or any subsidiaries.
Examples:
If a customer is already assigned to one predefined group (for example, Emporix Admin Group), then it's not possible to assign that same customer to another predefined group within the same company.
If a customer is assigned to an Admin group in one company (for example, Company A), then the same customer may also be assigned to an Admin group in another company (for example, Company B).
If a customer is assigned to an Admin group in a parent company (for example, Company A), then that same customer may also be assigned to another role such as Buyer in the parent company’s subsidiary.
The exception is the Contact group, which can always be assigned.
As a part of the group assignment you can decide how the contact assignments are shared within a company hierarchy. You can choose from the following options:
UPWARD: Contacts assigned to a subsidiary are also visible at the parent company level. This is a default setting.
DOWNWARD: Contacts assigned to a parent company are also visible in all subsidiaries.
DISABLED: Contacts remain only in the company where they were assigned, with no propagation.
Propagation happens only at the moment of assignment - creating the contact in the selected company also creates corresponding contacts in related companies according to the chosen direction.
curl -i -X POST
'https://api.emporix.io/customer-management/{tenant}/locations'
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
-H 'Content-Type: application/json'
-d '{
"name": "Main HQ",
"type": "HEADQUARTER",
"contactDetails": {
"emails": [
"[email protected]",
"[email protected]"
],
"phones": [
"1234567890",
"123456789"
],
"addressLine1": "W Sample St",
"addressLine2": "3601-3799",
"city": "South Bend",
"state": "Indiana",
"postcode": "46619",
"countryCode": "US",
"tags": [
"shipping"
]
}
}'curl -i -X POST
'https://api.emporix.io/customer-management/{tenant}/legal-entities'
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
-H 'Content-Type: application/json'
-d '{
"name": "ABC Company",
"type": "COMPANY",
"legalInfo": {
"legalName": "ABC Company",
"registrationDate": "2022-03-31T13:18:02.379Z",
"registrationAgency": "Comp reg agency",
"registrationId": "627e06ecf0452c2d6c0b81391",
"countryOfRegistration": "DE",
"taxRegistrationNumber": "1234"
},
"accountLimit": {
"currency": "EUR",
"value": 1000.99
},
"customerGroups": [
{
"id": "123e06ecf0452c2d6c0b81390",
"name": {
"en": "En customer group name",
"de": "De customer group name"
}
}
],
"entitiesAddresses": [
{
"id": "123e123455452c2d6c0b81390"
},
{
"id": "123e06ecf0acd223140b12345"
}
],
"approvalGroup": [
{
"id": "123e121111452c12330b81390"
},
{
"id": "123e061110acd223133333345"
}
]
}'curl -i -X GET
'https://api.emporix.io/customer-management/{tenant}/legal-entities?pageNumber=1&pageSize=16&sort=name%2Cmetadata.createdAt%3Adesc&q=name%3A~john&fields=name%2Ctype&id=string&name=string&type=COMPANY&parentId=string&legalInfo.legalName=string&legalInfo.registrationDate=string&legalInfo.taxRegistrationNumber=string&legalInfo.registrationAgency=string&legalInfo.countryOfRegistration=string&legalInfo.registrationId=string'
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
-H 'X-Total-Count: false'curl -i -X POST
'https://api.emporix.io/customer-management/{tenant}/legal-entities'
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
-H 'Content-Type: application/json'
-d '{
"name": "ABC Subsidiary",
"type": "SUBSIDIARY",
"legalInfo": {
"legalName": "ABC Subsidiary",
"registrationDate": "2022-03-31T13:18:02.379Z",
"registrationAgency": "Comp reg agency",
"registrationId": "627e06ecf0452c2d6c0b81391",
"countryOfRegistration": "DE",
"taxRegistrationNumber": "1234"
},
"accountLimit": {
"currency": "EUR",
"value": 1000.99
},
"customerGroups": [
{
"id": "123e06ecf0452c2d6c0b81390",
"name": {
"en": "En customer group name",
"de": "De customer group name"
}
}
],
"entitiesAddresses": [
{
"id": "123e123455452c2d6c0b81390"
},
{
"id": "123e06ecf0acd223140b12345"
}
],
"approvalGroup": [
{
"id": "123e121111452c12330b81390"
},
{
"id": "123e061110acd223133333345"
}
]
}'curl -i -X GET
'https://api.emporix.io/customer-management/{tenant}/legal-entities?pageNumber=1&pageSize=16&sort=name%2Cmetadata.createdAt%3Adesc&q=name%3A~john&fields=name%2Ctype&id=string&name=string&type=COMPANY&parentId=string&legalInfo.legalName=string&legalInfo.registrationDate=string&legalInfo.taxRegistrationNumber=string&legalInfo.registrationAgency=string&legalInfo.countryOfRegistration=string&legalInfo.registrationId=string'
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
-H 'X-Total-Count: false'curl -i -X GET
'https://api.emporix.io/customer/{tenant}/customers?q=contactEmail%3A{email}&sort=string&pageNumber=1&pageSize=60&expand=string'
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'curl -i -X POST
'https://api.emporix.io/customer-management/{tenant}/contact-assignments'
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
-H 'Content-Type: application/json'
-d '{
"legalEntity": {
"id": "612306ecf0452c2d6c0b81392"
},
"customer": {
"id": "612306ecf0452c2d6c0b81123"
},
"type": "BILLING",
"primary": true
}'To test the endpoint, open the API reference or check the example of a curl request.
To test the endpoint, open the API reference or check the example of a curl request.
To test the endpoint, open the API reference or check the example of a curl request.
To test the endpoint, open the API reference or check the example of a curl request.
To test the endpoint, open the API reference or check the example of a curl request.
To test the endpoint, open the API reference or check the example of a curl request.
To test the endpoint, open the API reference or check the example of a curl request.
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
^[a-z][a-z0-9]+$The page number to be retrieved where the size of the pages must be specified by the pageSize parameter. The number of the first page is 1.
1The number of documents being retrieved on the page.
16Fields to sort the response data by following order of the parameters from left to right. Can contain multiple fields in format: field name:sort direction separated by a comma. The colon with sort direction parameter is redundant and descending order is taken only if it is equal to desc or DESC. Ascending order is considered in any other case.
name,metadata.createdAt:descQuery param for filtering entities by specified type. Examples of query params which are supported:
| Q Param | Description |
|---|---|
name:"Exact match" |
find an entity with name field with Exact match value |
name:~John |
find an entity with name field containing John value |
locDescription.fr:"Description traduction française 02" |
find an entity with localized locDescription field with Description traduction française 02 value in french language |
primary:true |
find an entity with primary field with true value |
metadata.createdAt:(>"2019-01-06T10:29:30.602Z" AND <"2020-01-07T10:29:30.602Z") |
find an entity with metadata.createdAt field with value between 2019-01-06T10:29:30.602Z and 2020-01-07T10:29:30.602Z |
name:exists |
find an entity with existing name field |
name:null |
find an entity with non-existing name field |
name:missing |
find an entity with non-existing name field |
name:"John" surname:~Smith |
find an entity with name exactly equals to John and surname containing Smith value |
name:("John","Jack","James") |
find an entity with name field with one of the following value: John or Jack or James |
name:~johnComma-separated list of fields to return in the response. If not specified, all fields are returned.
name,typeLocation name. When specified, only locations containing the specified name will be returned.
Note: When filtering the results with this field, the contains operator is used. The operator is case-insensitive.
The type of the location. When specified, only locations of the specified type will be returned.
Note: When filtering the results with this field, the equals operator is used.
The email of the contact details of the location. When specified, only locations with contact details containing the specified email will be returned.
Note: When filtering the results with this field, the contains operator is used. The operator is case-insensitive.
The phone number of the contact details of the location. When specified, only locations with contact details containing the specified phone number will be returned.
Note: When filtering the results with this field, the contains operator is used. The operator is case-insensitive.
The address of the contact details of the location. When specified, only locations with contact details containing the specified address will be returned.
Note: When filtering the results with this field, the contains operator is used. The operator is case-insensitive.
The address of the contact details of the location. When specified, only locations with contact details containing the specified city will be returned.
Note: When filtering the results with this field, the contains operator is used. The operator is case-insensitive.
The address of the contact details of the location. When specified, only locations with contact details containing the specified state will be returned.
Note: When filtering the results with this field, the contains operator is used. The operator is case-insensitive.
The postcode of the contact details of the location. When specified, only locations with contact details containing the specified postcode will be returned.
Note: When filtering the results with this field, the contains operator is used. The operator is case-insensitive.
The country code of the contact details of the location. When specified, only locations with contact details having the specified country code will be returned.
Note: When filtering the results with this field, the equals operator is used.
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
^[a-z][a-z0-9]+$Custom location identifier. If not provided, it is automatically generated.
^[a-zA-Z0-9_-]$The name of the location,
The type of the location.
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
^[a-z][a-z0-9]+$The location unique identifier.
Comma-separated list of fields to return in the response. If not specified, all fields are returned.
name,typeThe request was successful. The requested location is returned.
Request was syntactically incorrect. Details will be provided in the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
Internal Service Error occurred.
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
^[a-z][a-z0-9]+$The location unique identifier.
The name of the location
The type of the location.
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
^[a-z][a-z0-9]+$The location unique identifier.
The location has been deleted successfully.
Request was syntactically incorrect. Details will be provided in the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
Internal Service Error occurred.
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
^[a-z][a-z0-9]+$The page number to be retrieved where the size of the pages must be specified by the pageSize parameter. The number of the first page is 1.
1The number of documents being retrieved on the page.
16Fields to sort the response data by following order of the parameters from left to right. Can contain multiple fields in format: field name:sort direction separated by a comma. The colon with sort direction parameter is redundant and descending order is taken only if it is equal to desc or DESC. Ascending order is considered in any other case.
name,metadata.createdAt:descQuery param for filtering entities by specified type. Examples of query params which are supported:
| Q Param | Description |
|---|---|
name:"Exact match" |
find an entity with name field with Exact match value |
name:~John |
find an entity with name field containing John value |
locDescription.fr:"Description traduction française 02" |
find an entity with localized locDescription field with Description traduction française 02 value in french language |
primary:true |
find an entity with primary field with true value |
metadata.createdAt:(>"2019-01-06T10:29:30.602Z" AND <"2020-01-07T10:29:30.602Z") |
find an entity with metadata.createdAt field with value between 2019-01-06T10:29:30.602Z and 2020-01-07T10:29:30.602Z |
name:exists |
find an entity with existing name field |
name:null |
find an entity with non-existing name field |
name:missing |
find an entity with non-existing name field |
name:"John" surname:~Smith |
find an entity with name exactly equals to John and surname containing Smith value |
name:("John","Jack","James") |
find an entity with name field with one of the following value: John or Jack or James |
name:~johnComma-separated list of fields to return in the response. If not specified, all fields are returned.
name,typeThe id of the legal entity. When specified, only customer assignments attached to the specified legal entity will be returned.
Note: When filtering the results with this field, the equals operator is used.
The id of the customer. When specified, only customer assignments attached to the specified customer will be returned.
Note: When filtering the results with this field, the equals operator is used.
The type of the customer assignment. When specified, only customer assignments with the specified type will be returned.
Note: When filtering the results with this field, the equals operator is used.
The primary customer flag. When specified, only customers with the specified primary flag value will be returned.
Note: When filtering the results with this field, the equals operator is used.
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
^[a-z][a-z0-9]+$Custom assignment identifier. If not provided, it is automatically generated.
^[a-zA-Z0-9_-]$The type of the customer assignment. If not provided, it is set to Contact by default.
Indicates whether the customer is primary.
falseThe tenant that the caller is acting upon.
Please note that this value is always lowercase.
^[a-z][a-z0-9]+$The identifier of the customer assignment
Comma-separated list of fields to return in the response. If not specified, all fields are returned.
name,typeThe request was successful. The requested customer assignment is returned.
Request was syntactically incorrect. Details will be provided in the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
Internal Service Error occurred.
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
^[a-z][a-z0-9]+$The identifier of the customer assignment
The type of the customer assignment.
Indicates whether the customer is primary.
falseThe tenant that the caller is acting upon.
Please note that this value is always lowercase.
^[a-z][a-z0-9]+$The identifier of the customer assignment
The customer assignment has been deleted successfully.
Request was syntactically incorrect. Details will be provided in the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
Internal Service Error occurred.
In order to get information how many entities meet a filter requirements, X-Total-Count header has been introduced. The header is optional and its default value is false. It the header is provided and it is true then total count is returned in the X-Total-Count response header. In both cases (X-Total-Count true, false or not provided), the response body has the same format (array of entities). In other words, the information about total count is returned on demand, depending of an existence of X-Total-Count header in a request. Therefore, the X-Total-Count header is not returned if an API consumer didn't ask for it.
falseThe request was successful. A list of locations is returned.
Request was syntactically incorrect. Details will be provided in the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
Internal Service Error occurred.
The request was successful. The location has been created.
Request was syntactically incorrect. Details will be provided in the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
Given resource already exists
Internal Service Error occurred.
The request was successful. The location has been created.
The location has been updated successfully.
Request was syntactically incorrect. Details will be provided in the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
Given resource already exists
Internal Service Error occurred.
No content
In order to get information how many entities meet a filter requirements, X-Total-Count header has been introduced. The header is optional and its default value is false. It the header is provided and it is true then total count is returned in the X-Total-Count response header. In both cases (X-Total-Count true, false or not provided), the response body has the same format (array of entities). In other words, the information about total count is returned on demand, depending of an existence of X-Total-Count header in a request. Therefore, the X-Total-Count header is not returned if an API consumer didn't ask for it.
falseThe request was successful. A list of customer assignments is returned.
Request was syntactically incorrect. Details will be provided in the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
Internal Service Error occurred.
The request was successful. The customer assignment has been created.
Request was syntactically incorrect. Details will be provided in the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
Given resource already exists
Internal Service Error occurred.
The request was successful. The contact assignment has been created.
The customer assignment has been updated successfully.
Request was syntactically incorrect. Details will be provided in the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
Given resource already exists
Internal Service Error occurred.
No content
[
{
"id": "627e06ecf0452c2d6c0b81391",
"name": "Main HQ",
"type": "HEADQUARTER",
"contactDetails": {
"emails": [
"[email protected]",
"[email protected]"
],
"phones": [
"1234567890",
"123456789"
],
"addressLine1": "W Sample St",
"addressLine2": "3601-3799",
"city": "South Bend",
"state": "Indiana",
"postcode": "46619",
"countryCode": "US",
"tags": [
"shipping"
]
},
"metadata": {
"createdAt": "2022-03-31T13:18:02.379Z",
"modifiedAt": "2022-03-31T13:18:02.379Z",
"version": 1
}
},
{
"id": "627e06ecf0452c2d6c0b81311",
"name": "Main Warehouse",
"type": "WAREHOUSE",
"contactDetails": {
"emails": [
"[email protected]",
"[email protected]"
],
"phones": [
"6475837467",
"987654321"
],
"addressLine1": "Dircksenstraße",
"addressLine2": "136",
"city": "Berlin",
"state": "Berlin",
"postcode": "10178",
"countryCode": "DE",
"tags": [
"billing"
]
},
"metadata": {
"createdAt": "2022-04-31T13:18:02.379Z",
"modifiedAt": "2022-05-31T13:18:02.379Z",
"version": 2
}
}
]{
"id": "53ac81fd0cce8b26b36f1234"
}{
"id": "627e06ecf0452c2d6c0b81391",
"name": "Main HQ",
"type": "HEADQUARTER",
"contactDetails": {
"emails": [
"[email protected]",
"[email protected]"
],
"phones": [
"1234567890",
"123456789"
],
"addressLine1": "W Sample St",
"addressLine2": "3601-3799",
"city": "South Bend",
"state": "Indiana",
"postcode": "46619",
"countryCode": "US",
"tags": [
"shipping"
]
},
"metadata": {
"createdAt": "2022-03-31T13:18:02.379Z",
"modifiedAt": "2022-03-31T13:18:02.379Z",
"version": 1
}
}PUT /customer-management/{tenant}/locations/{locationId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 333
{
"name": "Main Warehouse",
"type": "WAREHOUSE",
"contactDetails": {
"emails": [
"[email protected]",
"[email protected]"
],
"phones": [
"1234567890",
"123456789"
],
"addressLine1": "W Sample St",
"addressLine2": "3601-3799",
"city": "South Bend",
"state": "Indiana",
"postcode": "46619",
"countryCode": "US",
"tags": [
"shipping"
]
},
"metadata": {
"version": 1
}
}{
"id": "53ac81fd0cce8b26b36f3492"
}GET /customer-management/{tenant}/locations/{locationId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
DELETE /customer-management/{tenant}/locations/{locationId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
GET /customer-management/{tenant}/locations HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
POST /customer-management/{tenant}/locations HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 303
{
"name": "Main HQ",
"type": "HEADQUARTER",
"contactDetails": {
"emails": [
"[email protected]",
"[email protected]"
],
"phones": [
"1234567890",
"123456789"
],
"addressLine1": "W Sample St",
"addressLine2": "3601-3799",
"city": "South Bend",
"state": "Indiana",
"postcode": "46619",
"countryCode": "US",
"tags": [
"shipping"
]
}
}[
{
"id": "627e06ecf0452c2d6c0b81391",
"legalEntity": {
"id": "123e06ecf0452c2d6c0b12391",
"name": "ABC Subsidiary",
"type": "SUBSIDIARY",
"parentId": "627e06ecf0452c2d6c0b81391",
"accountLimit": {
"currency": "EUR",
"value": 1000.99
},
"legalInfo": {
"legalName": "ABC Subsidiary",
"registrationDate": "2022-03-31T13:18:02.379Z",
"taxRegistrationNumber": "4311",
"registrationAgency": "Sub reg agency",
"countryOfRegistration": "DE",
"registrationId": "627e06ecf0452c2d6c0b81399"
},
"customerGroups": [
{
"id": "123e06ecf0452c2d6c0b81390",
"name": {
"en": "Customer group 1",
"fr": "Groupe de clients 1"
}
}
]
},
"customer": {
"id": "627e06ecf0452c2d6c0b81391",
"name": "John",
"surname": "Doe"
},
"type": "BILLING",
"primary": true,
"metadata": {
"createdAt": "2022-03-31T13:18:02.379Z",
"modifiedAt": "2022-03-31T13:18:02.379Z",
"version": 1
}
},
{
"id": "627e06ecf0452c2d6c0b81311",
"legalEntity": {
"id": "123e06ecf0452c2d6c0b81390",
"name": "ABC Company",
"type": "COMPANY",
"legalInfo": {
"legalName": "ABC Company",
"registrationDate": "2022-03-31T13:18:02.379Z",
"registrationAgency": "Comp reg agency",
"registrationId": "627e06ecf0452c2d6c0b81391",
"countryOfRegistration": "DE",
"taxRegistrationNumber": "1234",
"accountLimit": {
"currency": "EUR",
"value": 1000.99
}
},
"customerGroups": [
{
"id": "123e06ecf0452c2d6c0b81390",
"name": {
"en": "Customer group 1",
"fr": "Groupe de clients 1"
}
},
{
"id": "123e06ecf0452c2d6c0b12345",
"name": {
"en": "Customer group 2",
"fr": "Groupe de clients 2"
}
}
],
"entitiesAddresses": [
{
"id": "627e06ecf0452c2d6c0b81391",
"name": "Main HQ",
"type": "HEADQUARTER",
"contactDetails": {
"emails": [
"[email protected]",
"[email protected]"
],
"phones": [
"1234567890",
"123456789"
],
"addressLine1": "W Sample St",
"addressLine2": "3601-3799",
"city": "South Bend",
"state": "Indiana",
"postcode": "46619",
"countryCode": "US",
"tags": [
"shipping"
]
},
"metadata": {
"createdAt": "2022-03-31T13:18:02.379Z",
"modifiedAt": "2022-03-31T13:18:02.379Z",
"version": 1
}
},
{
"id": "123e06ecf0acd223140b12345",
"name": "Main Warehouse",
"type": "WAREHOUSE",
"metadata": {
"createdAt": "2022-03-31T13:22:31.112Z",
"modifiedAt": "2022-03-31T13:22:31.112Z",
"version": 1
}
}
],
"approvalGroup": [
{
"id": "627e06ecf0452c2d6c0b81391",
"name": "John",
"surname": "Doe"
},
{
"id": "123e06ecf0452c2d6c0b81390",
"name": "Adam",
"surname": "Smith"
}
],
"metadata": {
"createdAt": "2022-03-31T13:18:02.379Z",
"modifiedAt": "2022-03-31T13:18:02.379Z",
"version": 1
}
},
"contact": {
"id": "627e06ecf0452c2d6c0b81391",
"name": "John",
"surname": "Doe"
},
"type": "PRIMARY",
"primary": false,
"metadata": {
"createdAt": "2022-04-31T13:18:02.379Z",
"modifiedAt": "2022-05-31T13:18:02.379Z",
"version": 2
}
}
]{
"id": "53ac81fd0cce8b26b36f1234"
}{
"id": "627e06ecf0452c2d6c0b81391",
"legalEntity": {
"id": "123e06ecf0452c2d6c0b81390",
"name": "ABC Company",
"type": "COMPANY",
"legalInfo": {
"legalName": "ABC Company",
"registrationDate": "2022-03-31T13:18:02.379Z",
"registrationAgency": "Comp reg agency",
"registrationId": "627e06ecf0452c2d6c0b81391",
"countryOfRegistration": "DE",
"taxRegistrationNumber": "1234",
"accountLimit": {
"currency": "EUR",
"value": 1000.99
}
},
"customerGroups": [
{
"id": "123e06ecf0452c2d6c0b81390",
"name": {
"en": "Customer group 1",
"fr": "Groupe de clients 1"
}
},
{
"id": "123e06ecf0452c2d6c0b12345",
"name": {
"en": "Customer group 2",
"fr": "Groupe de clients 2"
}
}
],
"entitiesAddresses": [
{
"id": "627e06ecf0452c2d6c0b81391",
"name": "Main HQ",
"type": "HEADQUARTER",
"contactDetails": {
"emails": [
"[email protected]",
"[email protected]"
],
"phones": [
"1234567890",
"123456789"
],
"addressLine1": "W Sample St",
"addressLine2": "3601-3799",
"city": "South Bend",
"state": "Indiana",
"postcode": "46619",
"countryCode": "US",
"tags": [
"shipping"
]
},
"metadata": {
"createdAt": "2022-03-31T13:18:02.379Z",
"modifiedAt": "2022-03-31T13:18:02.379Z",
"version": 1
}
},
{
"id": "123e06ecf0acd223140b12345",
"name": "Main Warehouse",
"type": "WAREHOUSE",
"metadata": {
"createdAt": "2022-03-31T13:22:31.112Z",
"modifiedAt": "2022-03-31T13:22:31.112Z",
"version": 1
}
}
],
"approvalGroup": [
{
"id": "627e06ecf0452c2d6c0b81391",
"name": "John",
"surname": "Doe"
},
{
"id": "123e06ecf0452c2d6c0b81390",
"name": "Adam",
"surname": "Smith"
}
],
"metadata": {
"createdAt": "2022-03-31T13:18:02.379Z",
"modifiedAt": "2022-03-31T13:18:02.379Z",
"version": 1
}
},
"customer": {
"id": "627e06ecf0452c2d6c0b81391",
"name": "John",
"surname": "Doe"
},
"type": "BILLING",
"primary": true,
"metadata": {
"createdAt": "2022-03-31T13:18:02.379Z",
"modifiedAt": "2022-03-31T13:18:02.379Z",
"version": 1
}
}PUT /customer-management/{tenant}/contact-assignments/{contactAssignmentId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 156
{
"legalEntity": {
"id": "612306ecf0452c2d6c0b82222"
},
"customer": {
"id": "111106ecf0452c2d6c0b81123"
},
"type": "LOGISTICS",
"primary": false,
"metadata": {
"version": 1
}
}{
"id": "53ac81fd0cce8b26b36f3492"
}GET /customer-management/{tenant}/contact-assignments/{contactAssignmentId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
DELETE /customer-management/{tenant}/contact-assignments/{contactAssignmentId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
GET /customer-management/{tenant}/contact-assignments HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
POST /customer-management/{tenant}/contact-assignments HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 128
{
"legalEntity": {
"id": "612306ecf0452c2d6c0b81392"
},
"customer": {
"id": "612306ecf0452c2d6c0b81123"
},
"type": "BILLING",
"primary": true
}Retrieves all legal entities. You can filter, sort and paginate the results with query parameters.
If the customermanagement.legalentity_read scope is used, then all legal entities assigned to the tenant are returned.
If the customermanagement.legalentity_read_own scope is used, then all legal entities assigned to the customer are returned.
customermanagement.legalentity_read
customermanagement.legalentity_read_own
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
^[a-z][a-z0-9]+$The page number to be retrieved where the size of the pages must be specified by the pageSize parameter. The number of the first page is 1.
1The number of documents being retrieved on the page.
16Fields to sort the response data by following order of the parameters from left to right. Can contain multiple fields in format: field name:sort direction separated by a comma. The colon with sort direction parameter is redundant and descending order is taken only if it is equal to desc or DESC. Ascending order is considered in any other case.
name,metadata.createdAt:descQuery param for filtering entities by specified type. Examples of query params which are supported:
| Q Param | Description |
|---|---|
name:"Exact match" |
find an entity with name field with Exact match value |
name:~John |
find an entity with name field containing John value |
locDescription.fr:"Description traduction française 02" |
find an entity with localized locDescription field with Description traduction française 02 value in french language |
primary:true |
find an entity with primary field with true value |
metadata.createdAt:(>"2019-01-06T10:29:30.602Z" AND <"2020-01-07T10:29:30.602Z") |
find an entity with metadata.createdAt field with value between 2019-01-06T10:29:30.602Z and 2020-01-07T10:29:30.602Z |
name:exists |
find an entity with existing name field |
name:null |
find an entity with non-existing name field |
name:missing |
find an entity with non-existing name field |
name:"John" surname:~Smith |
find an entity with name exactly equals to John and surname containing Smith value |
name:("John","Jack","James") |
find an entity with name field with one of the following value: John or Jack or James |
name:~johnComma-separated list of fields to return in the response. If not specified, all fields are returned.
name,typeLegal entity id. When specified, only legal entity with the specified id will be returned.
Note: When filtering the results with this field, the equals operator is used. The operator is case-insensitive.
Legal entity name. When specified, only legal entities containing the specified name will be returned.
Note: When filtering the results with this field, the contains operator is used. The operator is case-insensitive.
Legal entity type. When specified, only legal entities with the specified type will be returned.
Note: When filtering the results with this field, the equals operator is used.
The id of the parent legal entity. When specified, only legal entities with the specified parent will be returned.
Note: When filtering the results with this field, the equals operator is used.
The legal name of the entity. When specified, only legal entities containing the specified name will be returned.
Note: When filtering the results with this field, the contains operator is used. The operator is case-insensitive.
Legal entity registration date. When specified, only legal entities registered in the specified date will be returned.
Note: When filtering the results with this field, the equals operator is used.
Legal entity tax registration number. When specified, only legal entities with the specified tax registration number will be returned.
Note: When filtering the results with this field, the equals operator is used.
Legal entity registration agency. When specified, only legal entities containing the specified registration agency will be returned.
Note: When filtering the results with this field, the contains operator is used. The operator is case-insensitive.
Legal entity registration country. When specified, only legal entities containing the specified registration country will be returned.
Note: When filtering the results with this field, the contains operator is used. The operator is case-insensitive.
The id of the legal entity registration. When specified, only legal entities with the specified registration ID will be returned.
Note: When filtering the results with this field, the equals operator is used.
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
^[a-z][a-z0-9]+$Custom legal entity identifier. If not provided, it is automatically generated.
^[a-zA-Z0-9_-]$The name of the legal entity.
The type of the legal entity. Default value if not provided is: COMPANY
The id of the parent legal entity.
Retrieves all legal entities that match provided criteria.
If the customermanagement.legalentity_read scope is used, then all legal entities assigned to the tenant are returned. If the customermanagement.legalentity_read_own scope is used, then all legal entities assigned to the customer are returned.
customermanagement.legalentity_read
customermanagement.legalentity_read_own
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
^[a-z][a-z0-9]+$The page number to be retrieved where the size of the pages must be specified by the pageSize parameter. The number of the first page is 1.
1The number of documents being retrieved on the page.
16Fields to sort the response data by following order of the parameters from left to right. Can contain multiple fields in format: field name:sort direction separated by a comma. The colon with sort direction parameter is redundant and descending order is taken only if it is equal to desc or DESC. Ascending order is considered in any other case.
name,metadata.createdAt:descComma-separated list of fields to return in the response. If not specified, all fields are returned.
name,typeLegal entity id. When specified, only legal entity with the specified id will be returned.
Note: When filtering the results with this field, the equals operator is used. The operator is case-insensitive.
Legal entity name. When specified, only legal entities containing the specified name will be returned.
Note: When filtering the results with this field, the contains operator is used. The operator is case-insensitive.
Legal entity type. When specified, only legal entities with the specified type will be returned.
Note: When filtering the results with this field, the equals operator is used.
The id of the parent legal entity. When specified, only legal entities with the specified parent will be returned.
Note: When filtering the results with this field, the equals operator is used.
The legal name of the entity. When specified, only legal entities containing the specified name will be returned.
Note: When filtering the results with this field, the contains operator is used. The operator is case-insensitive.
Legal entity registration date. When specified, only legal entities registered in the specified date will be returned.
Note: When filtering the results with this field, the equals operator is used.
Legal entity tax registration number. When specified, only legal entities with the specified tax registration number will be returned.
Note: When filtering the results with this field, the equals operator is used.
Legal entity registration agency. When specified, only legal entities containing the specified registration agency will be returned.
Note: When filtering the results with this field, the contains operator is used. The operator is case-insensitive.
Legal entity registration country. When specified, only legal entities containing the specified registration country will be returned.
Note: When filtering the results with this field, the contains operator is used. The operator is case-insensitive.
The id of the legal entity registration. When specified, only legal entities with the specified registration ID will be returned.
Note: When filtering the results with this field, the equals operator is used.
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
^[a-z][a-z0-9]+$The legal entity unique identifier.
Comma-separated list of fields to return in the response. If not specified, all fields are returned.
name,typeThe request was successful. The requested legal entity is returned.
Request was syntactically incorrect. Details will be provided in the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
Internal Service Error occurred.
Updates or creates a legal entity with given legal entity id. You can omit the metadata.version, but then optimistic locking is not enabled.
Important: If automatically generated customer group is not present in customerGroups list, this group will be removed from iam.
customermanagement.legalentity_manage
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
^[a-z][a-z0-9]+$The legal entity unique identifier.
The name of the legal entity.
The type of the legal entity.
The id of the parent legal entity.
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
^[a-z][a-z0-9]+$The legal entity unique identifier.
The legal entity has been deleted successfully.
Request was syntactically incorrect. Details will be provided in the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
Internal Service Error occurred.
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
^[a-z][a-z0-9]+$The legal entity unique identifier.
The request was successful. A list of legal entities is returned.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
Internal Service Error occurred.
In order to get information how many entities meet a filter requirements, X-Total-Count header has been introduced. The header is optional and its default value is false. It the header is provided and it is true then total count is returned in the X-Total-Count response header. In both cases (X-Total-Count true, false or not provided), the response body has the same format (array of entities). In other words, the information about total count is returned on demand, depending of an existence of X-Total-Count header in a request. Therefore, the X-Total-Count header is not returned if an API consumer didn't ask for it.
falseThe request was successful. A list of legal entities is returned.
Request was syntactically incorrect. Details will be provided in the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
Internal Service Error occurred.
The request was successful. The legal entity has been created.
Request was syntactically incorrect. Details will be provided in the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
Given resource already exists
Internal Service Error occurred.
In order to get information how many entities meet a filter requirements, X-Total-Count header has been introduced. The header is optional and its default value is false. It the header is provided and it is true then total count is returned in the X-Total-Count response header. In both cases (X-Total-Count true, false or not provided), the response body has the same format (array of entities). In other words, the information about total count is returned on demand, depending of an existence of X-Total-Count header in a request. Therefore, the X-Total-Count header is not returned if an API consumer didn't ask for it.
falseQuery param for filtering entities by specified type.
The request was successful. A list of legal entities is returned.
Request was syntactically incorrect. Details will be provided in the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
Internal Service Error occurred.
The request was successful. The legal entity has been created.
The legal entity has been updated successfully.
Request was syntactically incorrect. Details will be provided in the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
Given resource already exists
Internal Service Error occurred.
No content
[
{
"id": "123e06ecf0452c2d6c0b81390",
"name": "ABC Company",
"type": "COMPANY",
"legalInfo": {
"legalName": "ABC Company",
"registrationDate": "2022-03-31T13:18:02.379Z",
"registrationAgency": "Comp reg agency",
"registrationId": "627e06ecf0452c2d6c0b81391",
"countryOfRegistration": "DE",
"taxRegistrationNumber": "1234"
},
"metadata": {
"createdAt": "2022-03-31T13:18:02.379Z",
"modifiedAt": "2022-03-31T13:18:02.379Z",
"version": 1
}
},
{
"id": "123e06ecf0452c2d6c0b12391",
"name": "ABC Subsidiary",
"type": "SUBSIDIARY",
"parentId": "627e06ecf0452c2d6c0b81391",
"accountLimit": {
"currency": "EUR",
"value": 1000.99
},
"legalInfo": {
"legalName": "ABC Subsidiary",
"registrationDate": "2022-03-31T13:18:02.379Z",
"taxRegistrationNumber": "4311",
"registrationAgency": "Sub reg agency",
"countryOfRegistration": "DE",
"registrationId": "627e06ecf0452c2d6c0b81399"
},
"customerGroups": [
{
"id": "123e06ecf0452c2d6c0b81390",
"name": {
"en": "Customer group 1",
"fr": "Groupe de clients 1"
}
}
],
"approvalGroup": [
{
"id": "321e06ecf0452c2d6c0b81390",
"type": "BILLING",
"primary": true,
"legalEntity": {
"id": "627e06ecf0452c2d6c0b81391"
},
"customer": {
"id": "123e06ecf0452c2d6c0b81390",
"name": "Adam",
"surname": "Smith"
},
"metadata": {
"createdAt": "2022-02-31T13:18:01.379Z",
"modifiedAt": "2022-02-31T13:18:01.379Z",
"version": 1
}
}
],
"entitiesAddresses": [
{
"id": "627e06ecf0452c2d6c0b81391",
"name": "Main HQ",
"type": "HEADQUARTER",
"contactDetails": {
"emails": [
"[email protected]",
"[email protected]"
],
"phones": [
"1234567890",
"123456789"
],
"addressLine1": "W Sample St",
"addressLine2": "3601-3799",
"city": "South Bend",
"state": "Indiana",
"postcode": "46619",
"countryCode": "US",
"tags": [
"shipping"
]
},
"metadata": {
"createdAt": "2022-03-31T13:18:02.379Z",
"modifiedAt": "2022-03-31T13:18:02.379Z",
"version": 1
}
},
{
"id": "123e06ecf0acd223140b12345",
"name": "Main Warehouse",
"type": "WAREHOUSE",
"metadata": {
"createdAt": "2022-03-31T13:22:31.112Z",
"modifiedAt": "2022-03-31T13:22:31.112Z",
"version": 1
}
}
],
"metadata": {
"createdAt": "2022-03-31T13:18:02.379Z",
"modifiedAt": "2022-04-31T13:18:02.379Z",
"version": 2
}
}
]{
"id": "53ac81fd0cce8b26b36f3492"
}POST /customer-management/{tenant}/legal-entities/search HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 20
{
"q": "type:COMPANY"
}[
{
"id": "123e06ecf0452c2d6c0b81390",
"name": "ABC Company",
"type": "COMPANY",
"legalInfo": {
"legalName": "ABC Company",
"registrationDate": "2022-03-31T13:18:02.379Z",
"registrationAgency": "Comp reg agency",
"registrationId": "627e06ecf0452c2d6c0b81391",
"countryOfRegistration": "DE",
"taxRegistrationNumber": "1234"
},
"metadata": {
"createdAt": "2022-03-31T13:18:02.379Z",
"modifiedAt": "2022-03-31T13:18:02.379Z",
"version": 1
}
},
{
"id": "123e06ecf0452c2d6c0b12391",
"name": "ABC Subsidiary",
"type": "SUBSIDIARY",
"parentId": "627e06ecf0452c2d6c0b81391",
"accountLimit": {
"currency": "EUR",
"value": 1000.99
},
"legalInfo": {
"legalName": "ABC Subsidiary",
"registrationDate": "2022-03-31T13:18:02.379Z",
"taxRegistrationNumber": "4311",
"registrationAgency": "Sub reg agency",
"countryOfRegistration": "DE",
"registrationId": "627e06ecf0452c2d6c0b81399"
},
"customerGroups": [
{
"id": "123e06ecf0452c2d6c0b81390",
"name": {
"en": "Customer group 1",
"fr": "Groupe de clients 1"
}
}
],
"approvalGroup": [
{
"id": "321e06ecf0452c2d6c0b81390",
"type": "BILLING",
"primary": true,
"legalEntity": {
"id": "627e06ecf0452c2d6c0b81391"
},
"customer": {
"id": "123e06ecf0452c2d6c0b81390",
"name": "Adam",
"surname": "Smith"
},
"metadata": {
"createdAt": "2022-02-31T13:18:01.379Z",
"modifiedAt": "2022-02-31T13:18:01.379Z",
"version": 1
}
}
],
"entitiesAddresses": [
{
"id": "627e06ecf0452c2d6c0b81391",
"name": "Main HQ",
"type": "HEADQUARTER",
"contactDetails": {
"emails": [
"[email protected]",
"[email protected]"
],
"phones": [
"1234567890",
"123456789"
],
"addressLine1": "W Sample St",
"addressLine2": "3601-3799",
"city": "South Bend",
"state": "Indiana",
"postcode": "46619",
"countryCode": "US",
"tags": [
"shipping"
]
},
"metadata": {
"createdAt": "2022-03-31T13:18:02.379Z",
"modifiedAt": "2022-03-31T13:18:02.379Z",
"version": 1
}
},
{
"id": "123e06ecf0acd223140b12345",
"name": "Main Warehouse",
"type": "WAREHOUSE",
"metadata": {
"createdAt": "2022-03-31T13:22:31.112Z",
"modifiedAt": "2022-03-31T13:22:31.112Z",
"version": 1
}
}
],
"metadata": {
"createdAt": "2022-03-31T13:18:02.379Z",
"modifiedAt": "2022-04-31T13:18:02.379Z",
"version": 2
}
}
]{
"id": "123e06ecf0452c2d6c0b81390",
"name": "ABC Company",
"type": "COMPANY",
"legalInfo": {
"legalName": "ABC Company",
"registrationDate": "2022-03-31T13:18:02.379Z",
"registrationAgency": "Comp reg agency",
"registrationId": "627e06ecf0452c2d6c0b81391",
"countryOfRegistration": "DE",
"taxRegistrationNumber": "1234"
},
"accountLimit": {
"currency": "EUR",
"value": 1000.99
},
"customerGroups": [
{
"id": "123e06ecf0452c2d6c0b81390",
"name": {
"en": "Customer group 1",
"fr": "Groupe de clients 1"
}
},
{
"id": "123e06ecf0452c2d6c0b12345",
"name": {
"en": "Customer group 2",
"fr": "Groupe de clients 2"
}
}
],
"entitiesAddresses": [
{
"id": "627e06ecf0452c2d6c0b81391",
"name": "Main HQ",
"type": "HEADQUARTER",
"contactDetails": {
"emails": [
"[email protected]",
"[email protected]"
],
"phones": [
"1234567890",
"123456789"
],
"addressLine1": "W Sample St",
"addressLine2": "3601-3799",
"city": "South Bend",
"state": "Indiana",
"postcode": "46619",
"countryCode": "US",
"tags": [
"shipping"
]
},
"metadata": {
"createdAt": "2022-03-31T13:18:02.379Z",
"modifiedAt": "2022-03-31T13:18:02.379Z",
"version": 1
}
},
{
"id": "123e06ecf0acd223140b12345",
"name": "Main Warehouse",
"type": "WAREHOUSE",
"metadata": {
"createdAt": "2022-03-31T13:22:31.112Z",
"modifiedAt": "2022-03-31T13:22:31.112Z",
"version": 1
}
}
],
"approvalGroup": [
{
"id": "627e06ecf0452c2d6c0b81391",
"type": "BILLING",
"primary": true,
"legalEntity": {
"id": "123e06ecf0452c2d6c0b81390"
},
"customer": {
"id": "627e06ecf0452c2d6c0b80000",
"name": "John",
"surname": "Doe"
},
"metadata": {
"createdAt": "2022-03-11T13:18:03.379Z",
"modifiedAt": "2022-03-11T13:18:04.379Z",
"version": 2
}
},
{
"id": "123e06ecf0452c2d6c0b81390",
"type": "LOGISTICS",
"primary": false,
"legalEntity": {
"id": "123e06ecf0452c2d6c0b81390"
},
"customer": {
"id": "123e06ecf0452c2d6c0b80000",
"name": "Adam",
"surname": "Smith"
},
"metadata": {
"createdAt": "2022-04-11T13:18:52.379Z",
"modifiedAt": "2022-05-12T15:13:12.379Z",
"version": 3
}
}
],
"metadata": {
"createdAt": "2022-03-31T13:18:02.379Z",
"modifiedAt": "2022-03-31T13:18:02.379Z",
"version": 1
}
}PUT /customer-management/{tenant}/legal-entities/{legalEntityId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 660
{
"name": "ABC Subsidiary",
"type": "SUBSIDIARY",
"parentId": "627e06ecf0452c2d6c0b81391",
"accountLimit": {
"currency": "EUR",
"value": 1000.99
},
"legalInfo": {
"legalName": "ABC Subsidiary",
"registrationDate": "2022-03-31T13:18:02.379Z",
"registrationAgency": "Sub reg agency",
"registrationId": "627e06ecf0452c2d6c0b81391",
"countryOfRegistration": "DE",
"taxRegistrationNumber": "4311"
},
"customerGroups": [
{
"id": "123e06ecf0452c2d6c0b81390"
},
{
"id": "123e06ecf0452c2d6c0b12345"
}
],
"entitiesAddresses": [
{
"id": "123e123455452c2d6c0b81390"
},
{
"id": "123e06ecf0acd223140b12345"
}
],
"approvalGroup": [
{
"id": "123e121111452c12330b81390"
},
{
"id": "123e061110acd223133333345"
}
],
"metadata": {
"version": 1
}
}{
"id": "53ac81fd0cce8b26b36f3492"
}[
{
"id": "company_c",
"name": "Company C",
"type": "SUBSIDIARY",
"parentId": "company_b",
"metadata": {
"createdAt": "2022-03-31T13:18:02.379Z",
"modifiedAt": "2022-03-31T13:18:02.379Z",
"version": 1
}
},
{
"id": "company_b",
"name": "Company B",
"type": "SUBSIDIARY",
"parentId": "company_a",
"metadata": {
"createdAt": "2022-03-18T14:22:07.321Z",
"modifiedAt": "2022-03-18T14:22:07.321Z",
"version": 1
}
},
{
"id": "company_a",
"name": "Company A",
"type": "COMPANY",
"metadata": {
"createdAt": "2022-03-31T13:18:02.379Z",
"modifiedAt": "2022-03-31T13:18:02.379Z",
"version": 1
}
}
]POST /customer-management/{tenant}/legal-entities HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 622
{
"name": "ABC Company",
"type": "COMPANY",
"legalInfo": {
"legalName": "ABC Company",
"registrationDate": "2022-03-31T13:18:02.379Z",
"registrationAgency": "Comp reg agency",
"registrationId": "627e06ecf0452c2d6c0b81391",
"countryOfRegistration": "DE",
"taxRegistrationNumber": "1234"
},
"accountLimit": {
"currency": "EUR",
"value": 1000.99
},
"customerGroups": [
{
"id": "123e06ecf0452c2d6c0b81390",
"name": {
"en": "En customer group name",
"de": "De customer group name"
}
}
],
"entitiesAddresses": [
{
"id": "123e123455452c2d6c0b81390"
},
{
"id": "123e06ecf0acd223140b12345"
}
],
"approvalGroup": [
{
"id": "123e121111452c12330b81390"
},
{
"id": "123e061110acd223133333345"
}
]
}GET /customer-management/{tenant}/legal-entities/{legalEntityId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
DELETE /customer-management/{tenant}/legal-entities/{legalEntityId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
GET /customer-management/{tenant}/legal-entities/{legalEntityId}/parent-hierarchy HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
GET /customer-management/{tenant}/legal-entities HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*