Retrieving all legal entities

GET {{api-url}}/customer-management/{{tenant}}/legal-entities?pageNumber=1&pageSize=16&sort=name,metadata.createdAt:asc&id=proident&name=proident&type=SUBSIDIARY&parentId=proident&legalInfo.legalName=proident&legalInfo.registrationDate=proident&legalInfo.taxRegistrationNumber=proident&legalInfo.registrationAgency=proident&legalInfo.countryOfRegistration=DE&legalInfo.registrationId=proident

Preview Retrieves all legal entities assigned to the tenant. You can filter, sort and paginate the results with query parameters.


### Required scopes * clientmanagement.legalentity_read

Request Params

KeyDatatypeRequiredDescription
pageNumbernumberThe 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.
pageSizenumberThe number of documents being retrieved on the page.
sortstringFields 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.
idstringLegal 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. | | 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 contains operator is used. The operator is case-insensitive. | | 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 equals operator is used. | | 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 equals operator is used. | | 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 contains operator is used. The operator is case-insensitive. | | 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 equals operator is used. | | 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 equals operator is used. | | 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 contains operator is used. The operator is case-insensitive. | | 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 contains operator is used. The operator is case-insensitive. | | 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 equals operator is used. |

HEADERS

KeyDatatypeRequiredDescription
X-Total-CountbooleanIn 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.
Acceptstring

RESPONSES

status: OK

[{"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":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":"123e06ecf0452c2d6c0b81390","name":"Adam","surname":"Smith","customer":{"id":"adam-smith-customer","name":"AdamCustomer","surname":"SmithCustomer"},"contactDetails":{"emails":["adam.klein@email.com","dirk.davis@mail.org"],"phones":[6475837467,"0987654321"],"addressLine1":"Dircksenstraße","addressLine2":136,"city":"Berlin","state":"Berlin","postcode":10178,"countryCode":"DE"},"metadata":{"createdAt":"2022-04-31T13:18:02.379Z","modifiedAt":"2022-05-31T13:18:02.379Z","version":2}}],"entitiesAddresses":[{"id":"123e123455452c2d6c0b81390"},{"id":"123e06ecf0acd223140b12345"}],"documents":[{"id":"123e121111452c2d6c0b81390"},{"id":"123e06ecf0acd223133333345"}],"metadata":{"createdAt":"2022-03-31T13:18:02.379Z","modifiedAt":"2022-04-31T13:18:02.379Z","version":2}}]