Download OpenAPI specification:Download
The Customer Management service allows you to manage customers in your system.
Key Features:
Creates a new location for the tenant. A location represents address information about a legal entity of the Company.
customermanagement.location_manage
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.
{- "name": "Main HQ",
- "type": "HEADQUARTER",
- "contactDetails": {
- "emails": [
- "jon.doe@example.com",
- "adam.smith@sample.org"
], - "phones": [
- "1234567890",
- "123456789"
], - "addressLine1": "W Sample St",
- "addressLine2": "3601-3799",
- "city": "South Bend",
- "state": "Indiana",
- "postcode": "46619",
- "countryCode": "US",
- "tags": [
- "shipping"
]
}
}
{- "id": "53ac81fd0cce8b26b36f1234"
}
Retrieves all locations assigned to the tenant. You can filter, sort and paginate the results with query parameters.
customermanagement.location_read
X-Total-Count | boolean Default: false 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. |
The 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.
[- {
- "id": "627e06ecf0452c2d6c0b81391",
- "name": "Main HQ",
- "type": "HEADQUARTER",
- "contactDetails": {
- "emails": [
- "jon.doe@example.com",
- "adam.smith@sample.org"
], - "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": [
- "adam.klein@email.com",
- "dirk.davis@mail.org"
], - "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
}
}
]
Retrieves a location by the specified unique identifier.
customermanagement.location_read
The 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.
{- "id": "627e06ecf0452c2d6c0b81391",
- "name": "Main HQ",
- "type": "HEADQUARTER",
- "contactDetails": {
- "emails": [
- "jon.doe@example.com",
- "adam.smith@sample.org"
], - "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
}
}
Updates or creates a location with given location id. You can omit the metadata.version
, but then optimistic locking is not enabled.
customermanagement.location_manage
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.
{- "name": "Main Warehouse",
- "type": "WAREHOUSE",
- "contactDetails": {
- "emails": [
- "jon.doe@example.com",
- "adam.smith@sample.org"
], - "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"
}
Deletes a location.
customermanagement.location_manage
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.
{- "code": 400,
- "status": "Bad Request",
- "message": "Tenant in the header is not matching with the one provided in the URI."
}
Creates a new contact assignment for the tenant. A contact assignment represents assignment of an employee of the Company to a legal entity.
customermanagement.contactassignment_manage
id | string [ 1 .. 66 ] characters ^[a-zA-Z0-9_-]$ Custom assignment identifier. If not provided, it is automatically generated. |
required | object The legal entity unique identifier. |
required | object The customer unique identifier. |
type required | string The type of the customer assignment. |
primary | boolean Default: false Indicates whether the customer is primary. |
object (metadata_create) Metadata request. | |
mixins | object Mixins request. A map where a key represent mixins set name and a value represent a map with key-value pairs. |
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.
{- "legalEntity": {
- "id": "612306ecf0452c2d6c0b81392"
}, - "customer": {
- "id": "612306ecf0452c2d6c0b81123"
}, - "type": "BILLING",
- "primary": true
}
{- "id": "53ac81fd0cce8b26b36f1234"
}
Retrieves all contact assignments assigned to the tenant. You can filter, sort and paginate the results with query parameters.
customermanagement.contactassignment_read
pageNumber | integer >= 1 Default: 1 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. | ||||||||||||||||||||||
pageSize | integer >= 1 Default: 16 The number of documents being retrieved on the page. | ||||||||||||||||||||||
sort | string Fields 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. Example: sort=name,metadata.createdAt:desc | ||||||||||||||||||||||
q | string Query param for filtering entities by specified type. Examples of query params which are supported:
Example: q=name:~john | ||||||||||||||||||||||
fields | string Comma-separated list of fields to return in the response. If not specified, all fields are returned. Example: fields=name,type | ||||||||||||||||||||||
legalEntity.id | string The 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 | ||||||||||||||||||||||
customer.id | string 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 | ||||||||||||||||||||||
type | string 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 | ||||||||||||||||||||||
primary | boolean 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 |
X-Total-Count | boolean Default: false 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. |
The 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.
[- {
- "id": "627e06ecf0452c2d6c0b81391",
- "legalEntity": {
- "id": "123e06ecf0452c2d6c0b12391",
- "name": "Subsidiary name",
- "type": "SUBSIDIARY",
- "parentId": "627e06ecf0452c2d6c0b81391",
- "accountLimit": {
- "currency": "EUR",
- "value": 1000.99
}, - "legalInfo": {
- "legalName": "Some subsidiary name",
- "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": "Company name",
- "type": "COMPANY",
- "legalInfo": {
- "legalName": "Some company name",
- "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": [
- "jon.doe@example.com",
- "adam.smith@sample.org"
], - "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
}
}
]
Retrieves a contact assignment by the specified unique identifier.
customermanagement.contactassignment_read
The 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.
{- "id": "627e06ecf0452c2d6c0b81391",
- "legalEntity": {
- "id": "123e06ecf0452c2d6c0b81390",
- "name": "Company name",
- "type": "COMPANY",
- "legalInfo": {
- "legalName": "Some company name",
- "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": [
- "jon.doe@example.com",
- "adam.smith@sample.org"
], - "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
}
}
Updates or creates a contact assignment with given contact assignment id. You can omit the metadata.version
, but then optimistic locking is not enabled.
customermanagement.contactassignment_manage
required | object The legal entity unique identifier. |
required | object The customer unique identifier. |
type required | string The type of the customer assignment. |
primary | boolean Default: false Indicates whether the customer is primary. |
object (metadataUpdate) | |
mixins | object Mixins request. A map where a key represent mixins set name and a value represent a map with key-value pairs. |
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.
{- "legalEntity": {
- "id": "612306ecf0452c2d6c0b82222"
}, - "customer": {
- "id": "111106ecf0452c2d6c0b81123"
}, - "type": "LOGISTICS",
- "primary": false,
- "metadata": {
- "version": 1
}
}
{- "id": "53ac81fd0cce8b26b36f3492"
}
Deletes a contact assignment.
customermanagement.contactassignment_manage
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.
{- "code": 400,
- "status": "Bad Request",
- "message": "Tenant in the header is not matching with the one provided in the URI."
}
Creates a new legal entity for the tenant. A legal entity represents a company or it's subsidiary in the system.
customermanagement.legalentity_manage
id | string [ 1 .. 66 ] characters ^[a-zA-Z0-9_-]$ Custom legal entity identifier. If not provided, it is automatically generated. |
name required | string The name of the legal entity. |
type | string The type of the legal entity. Default value if not provided is: |
parentId | string The id of the parent legal entity. |
object (Account Limit additional information) | |
object (Legal Entity additional information) | |
Array of objects (Customer group) The list of customer group IDs assigned to the legal entity. | |
Array of objects (Resource) The list of location IDs assigned to the legal entity. | |
Array of objects (Resource) The list of customer assignment IDs of an approval group of the legal entity. | |
object (metadata_create) Metadata request. | |
mixins | object Mixins request. A map where a key represent mixins set name and a value represent a map with key-value pairs. |
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.
{- "name": "Company name",
- "type": "COMPANY",
- "legalInfo": {
- "legalName": "Some company name",
- "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"
}
]
}
{- "id": "53ac81fd0cce8b26b36f3492"
}
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
pageNumber | integer >= 1 Default: 1 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. | ||||||||||||||||||||||
pageSize | integer >= 1 Default: 16 The number of documents being retrieved on the page. | ||||||||||||||||||||||
sort | string Fields 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. Example: sort=name,metadata.createdAt:desc | ||||||||||||||||||||||
q | string Query param for filtering entities by specified type. Examples of query params which are supported:
Example: q=name:~john | ||||||||||||||||||||||
fields | string Comma-separated list of fields to return in the response. If not specified, all fields are returned. Example: fields=name,type | ||||||||||||||||||||||
id | string Legal entity id. When specified, only legal entity with the specified id will be returned. Note: When filtering the results with this field, the | ||||||||||||||||||||||
name | string Legal entity name. When specified, only legal entities containing the specified name will be returned. Note: When filtering the results with this field, the | ||||||||||||||||||||||
type | string Legal entity type. When specified, only legal entities with the specified type will be returned. Note: When filtering the results with this field, the | ||||||||||||||||||||||
parentId | string 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 | ||||||||||||||||||||||
legalInfo.legalName | string 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 | ||||||||||||||||||||||
legalInfo.registrationDate | string 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 | ||||||||||||||||||||||
legalInfo.taxRegistrationNumber | string 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 | ||||||||||||||||||||||
legalInfo.registrationAgency | string 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 | ||||||||||||||||||||||
legalInfo.countryOfRegistration | string 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 | ||||||||||||||||||||||
legalInfo.registrationId | string 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 |
X-Total-Count | boolean Default: false 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. |
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.
[- {
- "id": "123e06ecf0452c2d6c0b81390",
- "name": "Company name",
- "type": "COMPANY",
- "legalInfo": {
- "legalName": "Some company name",
- "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": "Subsidiary name",
- "type": "SUBSIDIARY",
- "parentId": "627e06ecf0452c2d6c0b81391",
- "accountLimit": {
- "currency": "EUR",
- "value": 1000.99
}, - "legalInfo": {
- "legalName": "Some subsidiary name",
- "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": [
- "jon.doe@example.com",
- "adam.smith@sample.org"
], - "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
}
}
]
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
pageNumber | integer >= 1 Default: 1 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. |
pageSize | integer >= 1 Default: 16 The number of documents being retrieved on the page. |
sort | string Fields 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. Example: sort=name,metadata.createdAt:desc |
fields | string Comma-separated list of fields to return in the response. If not specified, all fields are returned. Example: fields=name,type |
id | string Legal entity id. When specified, only legal entity with the specified id will be returned. Note: When filtering the results with this field, the |
name | string Legal entity name. When specified, only legal entities containing the specified name will be returned. Note: When filtering the results with this field, the |
type | string Legal entity type. When specified, only legal entities with the specified type will be returned. Note: When filtering the results with this field, the |
parentId | string 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 |
legalInfo.legalName | string 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 |
legalInfo.registrationDate | string 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 |
legalInfo.taxRegistrationNumber | string 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 |
legalInfo.registrationAgency | string 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 |
legalInfo.countryOfRegistration | string 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 |
legalInfo.registrationId | string 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 |
X-Total-Count | boolean Default: false 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. |
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.
{- "q": "type:COMPANY"
}
[- {
- "id": "123e06ecf0452c2d6c0b81390",
- "name": "Company name",
- "type": "COMPANY",
- "legalInfo": {
- "legalName": "Some company name",
- "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": "Subsidiary name",
- "type": "SUBSIDIARY",
- "parentId": "627e06ecf0452c2d6c0b81391",
- "accountLimit": {
- "currency": "EUR",
- "value": 1000.99
}, - "legalInfo": {
- "legalName": "Some subsidiary name",
- "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": [
- "jon.doe@example.com",
- "adam.smith@sample.org"
], - "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
}
}
]
Retrieves a legal entity by the specified unique identifier.
customermanagement.legalentity_read
The 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.
{- "id": "123e06ecf0452c2d6c0b81390",
- "name": "Company name",
- "type": "COMPANY",
- "legalInfo": {
- "legalName": "Some company name",
- "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": [
- "jon.doe@example.com",
- "adam.smith@sample.org"
], - "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
}
}
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
name required | string The name of the legal entity. |
type required | string The type of the legal entity. |
parentId | string The id of the parent legal entity. |
object (Account Limit additional information) | |
object (Legal Entity additional information) | |
Array of objects (Resource) The list of customer group IDs assigned to the legal entity. | |
Array of objects (Resource) The list of location IDs assigned to the legal entity. | |
Array of objects (Resource) The list of customer assignment IDs of an approval user group of the legal entity. | |
object (metadataUpdate) | |
mixins | object Mixins request. A map where a key represent mixins set name and a value represent a map with key-value pairs. |
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.
{- "name": "Subsidiary name",
- "type": "SUBSIDIARY",
- "parentId": "627e06ecf0452c2d6c0b81391",
- "accountLimit": {
- "currency": "EUR",
- "value": 1000.99
}, - "legalInfo": {
- "legalName": "Some subsidiary name",
- "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"
}
Deletes a legal entity.
Important: This operation causes removal of all other entities exclusively subordinated to the requested legal entity in an async way
customermanagement.legalentity_manage
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.
{- "code": 400,
- "status": "Bad Request",
- "message": "Tenant in the header is not matching with the one provided in the URI."
}