openapi: 3.0.0 info: title: Customer Management Service version: '' description: | The Customer Management service allows you to manage customers in your system. **Key Features**: * Upsert support that enables seamless updates and inserts. contact: name: Emporix url: 'https://emporix.com' email: documentation@emporix.com servers: - url: 'https://api.emporix.io/customer-management' tags: - name: Locations - name: Contact Assignments - name: Legal Entities paths: '/{tenant}/legal-entities': parameters: - $ref: '#/components/parameters/trait_tenant' post: summary: Creating legal entity description: |- Creates a new legal entity for the tenant. A legal entity represents a company or it's subsidiary in the system. *** ### Required scopes * `customermanagement.legalentity_manage` security: - OAuth2: - customermanagement.legalentity_manage requestBody: content: application/json: schema: $ref: '#/components/schemas/legalEntityCreate' examples: Create a company: value: 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 Create a subsidiary: value: name: Subsidiary name type: SUBSIDIARY parentId: 627e06ecf0452c2d6c0b81391 legalInfo: legalName: Some subsidiary name registrationDate: '2022-03-31T13:18:02.379Z' registrationAgency: Sub reg agency registrationId: 627e06ecf0452c2d6c0b81391 countryOfRegistration: DE taxRegistrationNumber: '4311' accountLimit: currency: EUR value: 1000.99 customerGroups: - id: 123e06ecf0452c2d6c0b81390 - id: 123e06ecf0452c2d6c0b12345 entitiesAddresses: - id: 123e123455452c2d6c0b81390 approvalGroup: - id: 123e061110acd223133333345 responses: '201': description: The request was successful. The legal entity has been created. content: application/json: schema: type: object properties: id: type: string examples: Legal entity created: value: id: 53ac81fd0cce8b26b36f3492 '400': $ref: '#/components/responses/BadRequest_400' '401': $ref: '#/components/responses/Unauthorized_401' '403': $ref: '#/components/responses/Forbidden_403' '409': $ref: '#/components/responses/Conflict_409' '500': $ref: '#/components/responses/InternalServiceError_500' operationId: POST-customer-mgmt-create-legal-entity tags: - Legal Entities get: summary: Retrieving all legal entities description: |- 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. *** ### Required scopes * `customermanagement.legalentity_read` * `customermanagement.legalentity_read_own` security: - OAuth2: - customermanagement.legalentity_read - customermanagement.legalentity_read_own parameters: - $ref: '#/components/parameters/trait_paged_pageNumber' - $ref: '#/components/parameters/trait_paged_pageSize' - $ref: '#/components/parameters/trait_XTotalCount_header' - $ref: '#/components/parameters/trait_sort' - $ref: '#/components/parameters/trait_q_param' - $ref: '#/components/parameters/trait_fields' - $ref: '#/components/parameters/trait_legalEntity_id_query_param' - $ref: '#/components/parameters/trait_legalEntity_name_query_param' - $ref: '#/components/parameters/trait_legalEntity_type_query_param' - $ref: '#/components/parameters/trait_legalEntity_parentId_query_param' - $ref: '#/components/parameters/trait_legalEntity_legalName_query_param' - $ref: '#/components/parameters/trait_legalEntity_registrationDate_query_param' - $ref: '#/components/parameters/trait_legalEntity_taxRegistrationNumber_query_param' - $ref: '#/components/parameters/trait_legalEntity_registrationAgency_query_param' - $ref: '#/components/parameters/trait_legalEntity_countryOfRegistration_query_param' - $ref: '#/components/parameters/trait_legalEntity_registrationId_query_param' responses: '200': $ref: '#/components/responses/GetLegalEntities' '400': $ref: '#/components/responses/BadRequest_400' '401': $ref: '#/components/responses/Unauthorized_401' '403': $ref: '#/components/responses/Forbidden_403' '500': $ref: '#/components/responses/InternalServiceError_500' operationId: GET-customer-mgmt-list-legal-entities tags: - Legal Entities '/{tenant}/legal-entities/search': parameters: - $ref: '#/components/parameters/trait_tenant' post: summary: Searching with parameters for legal entities description: |- 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. *** ### Required scopes * `customermanagement.legalentity_read` * `customermanagement.legalentity_read_own` security: - OAuth2: - customermanagement.legalentity_read - customermanagement.legalentity_read_own parameters: - $ref: '#/components/parameters/trait_paged_pageNumber' - $ref: '#/components/parameters/trait_paged_pageSize' - $ref: '#/components/parameters/trait_XTotalCount_header' - $ref: '#/components/parameters/trait_sort' - $ref: '#/components/parameters/trait_fields' - $ref: '#/components/parameters/trait_legalEntity_id_query_param' - $ref: '#/components/parameters/trait_legalEntity_name_query_param' - $ref: '#/components/parameters/trait_legalEntity_type_query_param' - $ref: '#/components/parameters/trait_legalEntity_parentId_query_param' - $ref: '#/components/parameters/trait_legalEntity_legalName_query_param' - $ref: '#/components/parameters/trait_legalEntity_registrationDate_query_param' - $ref: '#/components/parameters/trait_legalEntity_taxRegistrationNumber_query_param' - $ref: '#/components/parameters/trait_legalEntity_registrationAgency_query_param' - $ref: '#/components/parameters/trait_legalEntity_countryOfRegistration_query_param' - $ref: '#/components/parameters/trait_legalEntity_registrationId_query_param' requestBody: content: application/json: schema: title: qParam type: object properties: q: type: string description: Query param for filtering entities by specified type. examples: Search by type: value: q: "type:COMPANY" Search by date: value: q: "metadata.createdAt:(>\"2023-04-17T08:00:00.000Z\" AND <\"2024-04-17T17:30:00.000Z\")" Search by name: value: q: "name:\"Company Name\"" responses: '200': $ref: '#/components/responses/GetLegalEntities' '400': $ref: '#/components/responses/BadRequest_400' '401': $ref: '#/components/responses/Unauthorized_401' '403': $ref: '#/components/responses/Forbidden_403' '500': $ref: '#/components/responses/InternalServiceError_500' operationId: POST-customer-mgmt-search-legal-entities tags: - Legal Entities '/{tenant}/legal-entities/{legalEntityId}': parameters: - $ref: '#/components/parameters/trait_tenant' - $ref: '#/components/parameters/trait_legalEntity_id_path' get: summary: Retrieving a legal entity parameters: - $ref: '#/components/parameters/trait_fields' description: |- Retrieves a legal entity by the specified unique identifier. *** ### Required scopes * `customermanagement.legalentity_read` security: - OAuth2: - customermanagement.legalentity_read responses: '200': $ref: '#/components/responses/GetLegalEntity' '400': $ref: '#/components/responses/BadRequest_400' '401': $ref: '#/components/responses/Unauthorized_401' '403': $ref: '#/components/responses/Forbidden_403' '404': $ref: '#/components/responses/NotFound_404' '500': $ref: '#/components/responses/InternalServiceError_500' operationId: GET-customer-mgmt-retrieve-legal-entity tags: - Legal Entities put: summary: Upserting a legal entity description: |- 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. *** ### Required scopes * `customermanagement.legalentity_manage` security: - OAuth2: - customermanagement.legalentity_manage requestBody: content: application/json: schema: $ref: '#/components/schemas/legalEntityUpdate' examples: Update the legal entity: value: 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 responses: '201': description: The request was successful. The legal entity has been created. content: application/json: schema: type: object properties: id: type: string examples: Legal entity created: value: id: 53ac81fd0cce8b26b36f3492 '204': description: The legal entity has been updated successfully. '400': $ref: '#/components/responses/BadRequest_400_Update' '401': $ref: '#/components/responses/Unauthorized_401' '403': $ref: '#/components/responses/Forbidden_403' '404': $ref: '#/components/responses/NotFound_404' '409': $ref: '#/components/responses/Conflict_409' '500': $ref: '#/components/responses/InternalServiceError_500' operationId: PUT-customer-mgmt-update-legal-entity tags: - Legal Entities delete: summary: Delete a legal entity description: |- Deletes a legal entity. **Important**: This operation causes removal of all other entities exclusively subordinated to the requested legal entity in an async way *** ### Required scopes * `customermanagement.legalentity_manage` security: - OAuth2: - customermanagement.legalentity_manage responses: '204': description: The legal entity has been deleted successfully. '400': $ref: '#/components/responses/BadRequest_400_Update' '401': $ref: '#/components/responses/Unauthorized_401' '403': $ref: '#/components/responses/Forbidden_403' '404': $ref: '#/components/responses/NotFound_404' '500': $ref: '#/components/responses/InternalServiceError_500' operationId: DELETE-customer-mgmt-remove-legal-entity tags: - Legal Entities '/{tenant}/contact-assignments': parameters: - name: tenant in: path required: true description: | The tenant that the caller is acting upon. Please note that this value is always lowercase. schema: pattern: '^[a-z][a-z0-9]+$' minLength: 3 maxLength: 16 type: string post: summary: Creating contact assignment description: |- Creates a new contact assignment for the tenant. A contact assignment represents assignment of an employee of the Company to a legal entity. *** ### Required scopes * `customermanagement.contactassignment_manage` security: - OAuth2: - customermanagement.contactassignment_manage requestBody: content: application/json: schema: $ref: '#/components/schemas/contactAssignmentCreate' examples: Create a customer assignment: value: legalEntity: id: 612306ecf0452c2d6c0b81392 customer: id: 612306ecf0452c2d6c0b81123 type: BILLING primary: true responses: '201': description: The request was successful. The customer assignment has been created. content: application/json: schema: type: object properties: id: type: string examples: Customer assignment created: value: id: 53ac81fd0cce8b26b36f1234 '400': $ref: '#/components/responses/BadRequest_400' '401': $ref: '#/components/responses/Unauthorized_401' '403': $ref: '#/components/responses/Forbidden_403' '409': $ref: '#/components/responses/Conflict_409' '500': $ref: '#/components/responses/InternalServiceError_500' operationId: POST-customer-mgmt-create-contact-assignment tags: - Contact Assignments get: summary: Retrieving all contact assignments description: |- Retrieves all contact assignments assigned to the tenant. You can filter, sort and paginate the results with query parameters. *** ### Required scopes * `customermanagement.contactassignment_read` security: - OAuth2: - customermanagement.contactassignment_read parameters: - $ref: '#/components/parameters/trait_paged_pageNumber' - $ref: '#/components/parameters/trait_paged_pageSize' - $ref: '#/components/parameters/trait_XTotalCount_header' - $ref: '#/components/parameters/trait_sort' - $ref: '#/components/parameters/trait_q_param' - $ref: '#/components/parameters/trait_fields' - $ref: '#/components/parameters/trait_contactAssignment_legalEntity_query_param' - $ref: '#/components/parameters/trait_contactAssignment_customer_query_param' - $ref: '#/components/parameters/trait_contactAssignment_type_query_param' - $ref: '#/components/parameters/trait_contactAssignment_primary_query_param' responses: '200': $ref: '#/components/responses/GetContactAssignments' '400': $ref: '#/components/responses/BadRequest_400' '401': $ref: '#/components/responses/Unauthorized_401' '403': $ref: '#/components/responses/Forbidden_403' '500': $ref: '#/components/responses/InternalServiceError_500' operationId: GET-customer-mgmt-list-contact-assignments tags: - Contact Assignments '/{tenant}/contact-assignments/{contactAssignmentId}': parameters: - name: tenant in: path required: true description: | The tenant that the caller is acting upon. Please note that this value is always lowercase. schema: pattern: '^[a-z][a-z0-9]+$' minLength: 3 maxLength: 16 type: string - schema: type: string name: contactAssignmentId in: path required: true description: The identifier of the customer assignment get: summary: Retrieving a contact assignment parameters: - in: query name: fields required: false description: 'Comma-separated list of fields to return in the response. If not specified, all fields are returned.' schema: type: string example: 'name,type' description: |- Retrieves a contact assignment by the specified unique identifier. *** ### Required scopes * `customermanagement.contactassignment_read` security: - OAuth2: - customermanagement.contactassignment_read responses: '200': $ref: '#/components/responses/GetContactAssignment' '400': $ref: '#/components/responses/BadRequest_400' '401': $ref: '#/components/responses/Unauthorized_401' '403': $ref: '#/components/responses/Forbidden_403' '404': $ref: '#/components/responses/NotFound_404' '500': $ref: '#/components/responses/InternalServiceError_500' operationId: GET-customer-mgmt-retrieve-contact-assignment tags: - Contact Assignments put: summary: Upserting a contact assignment description: |- Updates or creates a contact assignment with given contact assignment id. You can omit the `metadata.version`, but then optimistic locking is not enabled. *** ### Required scopes * `customermanagement.contactassignment_manage` security: - OAuth2: - customermanagement.contactassignment_manage requestBody: content: application/json: schema: $ref: '#/components/schemas/contactAssignmentUpdate' examples: Update the customer assignment: value: legalEntity: id: 612306ecf0452c2d6c0b82222 customer: id: 111106ecf0452c2d6c0b81123 type: LOGISTICS primary: false metadata: version: 1 responses: '201': description: The request was successful. The contact assignment has been created. content: application/json: schema: type: object properties: id: type: string examples: Contact assignment created: value: id: 53ac81fd0cce8b26b36f3492 '204': description: The customer assignment has been updated successfully. '400': $ref: '#/components/responses/BadRequest_400_Update' '401': $ref: '#/components/responses/Unauthorized_401' '403': $ref: '#/components/responses/Forbidden_403' '404': $ref: '#/components/responses/NotFound_404' '409': $ref: '#/components/responses/Conflict_409' '500': $ref: '#/components/responses/InternalServiceError_500' operationId: PUT-customer-mgmt-update-contact-assignment tags: - Contact Assignments delete: summary: Delete a contact assignment description: |- Deletes a contact assignment. *** ### Required scopes * `customermanagement.contactassignment_manage` security: - OAuth2: - customermanagement.contactassignment_manage responses: '204': description: The customer assignment has been deleted successfully. '400': $ref: '#/components/responses/BadRequest_400' '401': $ref: '#/components/responses/Unauthorized_401' '403': $ref: '#/components/responses/Forbidden_403' '404': $ref: '#/components/responses/NotFound_404' '500': $ref: '#/components/responses/InternalServiceError_500' operationId: DELETE-customer-mgmt-remove-contact-assignment tags: - Contact Assignments '/{tenant}/locations': parameters: - $ref: '#/components/parameters/trait_tenant' post: summary: Creating location description: |- Creates a new location for the tenant. A location represents address information about a legal entity of the Company. *** ### Required scopes * `customermanagement.location_manage` security: - OAuth2: - customermanagement.location_manage requestBody: content: application/json: schema: $ref: '#/components/schemas/locationCreate' examples: Create a location: value: 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 responses: '201': description: The request was successful. The location has been created. content: application/json: schema: type: object properties: id: type: string examples: Location created: value: id: 53ac81fd0cce8b26b36f1234 '400': $ref: '#/components/responses/BadRequest_400' '401': $ref: '#/components/responses/Unauthorized_401' '403': $ref: '#/components/responses/Forbidden_403' '409': $ref: '#/components/responses/Conflict_409' '500': $ref: '#/components/responses/InternalServiceError_500' operationId: POST-customer-mgmt-create-location tags: - Locations get: summary: Retrieving all locations description: |- Retrieves all locations assigned to the tenant. You can filter, sort and paginate the results with query parameters. *** ### Required scopes * `customermanagement.location_read` security: - OAuth2: - customermanagement.location_read parameters: - $ref: '#/components/parameters/trait_paged_pageNumber' - $ref: '#/components/parameters/trait_paged_pageSize' - $ref: '#/components/parameters/trait_XTotalCount_header' - $ref: '#/components/parameters/trait_sort' - $ref: '#/components/parameters/trait_q_param' - $ref: '#/components/parameters/trait_fields' - $ref: '#/components/parameters/trait_location_name_query_param' - $ref: '#/components/parameters/trait_location_type_query_param' - $ref: '#/components/parameters/trait_location_contactDetails_email_query_param' - $ref: '#/components/parameters/trait_location_contactDetails_phone_query_param' - $ref: '#/components/parameters/trait_location_contactDetails_address_query_param' - $ref: '#/components/parameters/trait_location_contactDetails_city_query_param' - $ref: '#/components/parameters/trait_location_contactDetails_state_query_param' - $ref: '#/components/parameters/trait_location_contactDetails_postcode_query_param' - $ref: '#/components/parameters/trait_location_contactDetails_countryCode_query_param' responses: '200': $ref: '#/components/responses/GetLocations' '400': $ref: '#/components/responses/BadRequest_400' '401': $ref: '#/components/responses/Unauthorized_401' '403': $ref: '#/components/responses/Forbidden_403' '500': $ref: '#/components/responses/InternalServiceError_500' operationId: GET-customer-mgmt-list-all-locations tags: - Locations '/{tenant}/locations/{locationId}': parameters: - $ref: '#/components/parameters/trait_tenant' - $ref: '#/components/parameters/trait_location_id_path' get: parameters: - $ref: '#/components/parameters/trait_fields' summary: Retrieving a location description: |- Retrieves a location by the specified unique identifier. *** ### Required scopes * `customermanagement.location_read` security: - OAuth2: - customermanagement.location_read responses: '200': $ref: '#/components/responses/GetLocation' '400': $ref: '#/components/responses/BadRequest_400' '401': $ref: '#/components/responses/Unauthorized_401' '403': $ref: '#/components/responses/Forbidden_403' '404': $ref: '#/components/responses/NotFound_404' '500': $ref: '#/components/responses/InternalServiceError_500' operationId: GET-customer-mgmt-retrieve-location tags: - Locations put: summary: Upserting a location description: |- Updates or creates a location with given location id. You can omit the `metadata.version`, but then optimistic locking is not enabled. *** ### Required scopes * `customermanagement.location_manage` security: - OAuth2: - customermanagement.location_manage requestBody: content: application/json: schema: $ref: '#/components/schemas/locationUpdate' examples: Update the location: value: 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 responses: '201': description: The request was successful. The location has been created. content: application/json: schema: type: object properties: id: type: string examples: Location created: value: id: 53ac81fd0cce8b26b36f3492 '204': description: The location has been updated successfully. '400': $ref: '#/components/responses/BadRequest_400_Update' '401': $ref: '#/components/responses/Unauthorized_401' '403': $ref: '#/components/responses/Forbidden_403' '404': $ref: '#/components/responses/NotFound_404' '409': $ref: '#/components/responses/Conflict_409' '500': $ref: '#/components/responses/InternalServiceError_500' operationId: PUT-customer-mgmt-update-location tags: - Locations delete: summary: Delete a location description: |- Deletes a location. *** ### Required scopes * `customermanagement.location_manage` security: - OAuth2: - customermanagement.location_manage responses: '204': description: The location has been deleted successfully. '400': $ref: '#/components/responses/BadRequest_400' '401': $ref: '#/components/responses/Unauthorized_401' '403': $ref: '#/components/responses/Forbidden_403' '404': $ref: '#/components/responses/NotFound_404' '500': $ref: '#/components/responses/InternalServiceError_500' operationId: DELETE-customer-mgmt-remove-location tags: - Locations components: schemas: errorMessage: title: Error description: Schema for API specified errors. type: object properties: code: minimum: 100 maximum: 599 description: 'Original HTTP error code, should be consistent with the response HTTP code.' type: integer status: description: Original HTTP error name. type: string message: description: Descriptive error message for debugging. type: string resourceId: type: string description: Id of the resource. details: description: List of problems causing this error. type: array items: description: Details for specific error cause. type: string required: - status - code metadataUpdate: type: object properties: version: minimum: 1 type: integer description: Version of the document. mixins: type: object description: Links to the mixin schemas. A map where the keys represent mixins set attributes and the values represent url to a schema for a particular set. additionalProperties: true metadata: type: object allOf: - $ref: '#/components/schemas/metadataUpdate' - type: object properties: createdAt: description: Date and time when the document was created. type: string modifiedAt: description: Date and time when the document was last modified. type: string customerGroup: title: Customer group type: object properties: id: type: string description: The unique identifier of the customer group. name: additionalProperties: type: string description: Localized name of a customer group. required: - id resourceId: title: Resource type: object properties: id: type: string description: Id of a resource. legalEntity: title: Legal Entity type: object properties: id: type: string description: The legal entity unique identifier. name: type: string description: The name of the legal entity. type: type: string enum: - COMPANY - SUBSIDIARY description: The type of the legal entity. parentId: type: string description: The id of the parent legal entity. accountLimit: $ref: '#/components/schemas/accountLimit' legalInfo: $ref: '#/components/schemas/legalInfo' customerGroups: type: array description: The list of customer groups assigned to the legal entity. items: $ref: '#/components/schemas/customerGroup' entitiesAddresses: type: array description: The list of locations assigned to the legal entity. items: $ref: '#/components/schemas/location' approvalGroup: type: array description: The list of customer assignment of the approval group of the legal entity. items: $ref: '#/components/schemas/contactAssignmentWithoutExpandedLegalEntity' metadata: $ref: '#/components/schemas/metadata' mixins: type: object description: Mixins request. A map where a key represent mixins set name and a value represent a map with key-value pairs. additionalProperties: true accountLimit: title: Account Limit additional information type: object properties: currency: type: string description: The account limit currency. value: type: number description: The purchasing limit for account in the legal entity. minimum: 0 legalInfo: title: Legal Entity additional information type: object properties: legalName: type: string description: The legal name of the entity. registrationDate: type: string description: 'The registration date of the legal entity in the ISO 8601 format, e.g. 2020-04-30T04:00:00.000Z.' taxRegistrationNumber: type: string description: The tax registration number of the legal entity. registrationAgency: type: string description: The registration agency of the legal entity. countryOfRegistration: type: string description: The country in which the legal entity has been registered. The country needs to be defined and active in the Country Service. registrationId: type: string description: The unique identifier of the legal entity registration. legalEntityCreate: title: Legal Entity create payload type: object properties: id: type: string description: Custom legal entity identifier. If not provided, it is automatically generated. minLength: 1 maxLength: 66 pattern: ^[a-zA-Z0-9_-]$ name: type: string description: The name of the legal entity. type: type: string enum: - COMPANY - SUBSIDIARY description: 'The type of the legal entity. Default value if not provided is: `COMPANY`' parentId: type: string description: The id of the parent legal entity. accountLimit: $ref: '#/components/schemas/accountLimit' legalInfo: $ref: '#/components/schemas/legalInfo' customerGroups: type: array description: The list of customer group IDs assigned to the legal entity. items: $ref: '#/components/schemas/customerGroup' entitiesAddresses: type: array description: The list of location IDs assigned to the legal entity. items: $ref: '#/components/schemas/resourceId' approvalGroup: type: array description: The list of customer assignment IDs of an approval group of the legal entity. items: $ref: '#/components/schemas/resourceId' metadata: $ref: '#/components/schemas/metadata_create' mixins: type: object description: Mixins request. A map where a key represent mixins set name and a value represent a map with key-value pairs. additionalProperties: true required: - name legalEntityUpdate: title: Legal Entity update payload type: object properties: name: type: string description: The name of the legal entity. type: type: string enum: - COMPANY - SUBSIDIARY description: The type of the legal entity. parentId: type: string description: The id of the parent legal entity. accountLimit: $ref: '#/components/schemas/accountLimit' legalInfo: $ref: '#/components/schemas/legalInfo' customerGroups: type: array description: The list of customer group IDs assigned to the legal entity. items: $ref: '#/components/schemas/resourceId' entitiesAddresses: type: array description: The list of location IDs assigned to the legal entity. items: $ref: '#/components/schemas/resourceId' approvalGroup: type: array description: The list of customer assignment IDs of an approval user group of the legal entity. items: $ref: '#/components/schemas/resourceId' metadata: $ref: '#/components/schemas/metadataUpdate' mixins: type: object description: Mixins request. A map where a key represent mixins set name and a value represent a map with key-value pairs. additionalProperties: true required: - name - type customer: title: Customer properties: id: type: string description: The customer unique identifier. name: type: string description: The name of the customer. surname: type: string description: The surname of the customer. email: type: string description: The email of the customer. phone: type: string description: The phone number of the customer. contactAssignment: title: Contact Assignment type: object properties: id: type: string description: The customer assignment unique identifier. legalEntity: $ref: '#/components/schemas/legalEntity' customer: $ref: '#/components/schemas/customer' type: type: string enum: - PRIMARY - BILLING - LOGISTICS description: The type of the customer assignment. primary: type: boolean description: Indicates whether the customer is primary. metadata: $ref: '#/components/schemas/metadata' mixins: type: object description: Mixins request. A map where a key represent mixins set name and a value represent a map with key-value pairs. additionalProperties: true contactAssignmentWithoutExpandedLegalEntity: title: Contact Assignment type: object properties: id: type: string description: The customer assignment unique identifier. legalEntity: type: object description: Assigned legal entity. properties: id: type: string description: The legal entity unique identifier. customer: $ref: '#/components/schemas/customer' type: type: string enum: - PRIMARY - BILLING - LOGISTICS description: The type of the customer assignment. primary: type: boolean description: Indicates whether the customer is primary. metadata: $ref: '#/components/schemas/metadata' contactAssignmentCreate: title: Contact Assignment create payload type: object properties: id: type: string description: Custom assignment identifier. If not provided, it is automatically generated. minLength: 1 maxLength: 66 pattern: ^[a-zA-Z0-9_-]$ legalEntity: type: object description: The legal entity unique identifier. required: - id properties: id: type: string description: The unique identifier of the legal entity. customer: type: object description: The customer unique identifier. required: - id properties: id: type: string description: The unique identifier of the customer. type: type: string enum: - PRIMARY - BILLING - LOGISTICS description: The type of the customer assignment. primary: type: boolean default: false description: Indicates whether the customer is primary. metadata: $ref: '#/components/schemas/metadata_create' mixins: type: object description: Mixins request. A map where a key represent mixins set name and a value represent a map with key-value pairs. additionalProperties: true required: - legalEntity - customer - type contactAssignmentUpdate: title: Contact Assignment update payload type: object properties: legalEntity: type: object description: The legal entity unique identifier. required: - id properties: id: type: string description: The unique identifier of the legal entity. customer: type: object description: The customer unique identifier. required: - id properties: id: type: string description: The unique identifier of the customer. type: type: string enum: - PRIMARY - BILLING - LOGISTICS description: The type of the customer assignment. primary: type: boolean default: false description: Indicates whether the customer is primary. metadata: $ref: '#/components/schemas/metadataUpdate' mixins: type: object description: Mixins request. A map where a key represent mixins set name and a value represent a map with key-value pairs. additionalProperties: true required: - legalEntity - customer - type location: title: Location type: object properties: id: type: string description: The location unique identifier. name: type: string description: The name of the location type: type: string enum: - HEADQUARTER - WAREHOUSE - OFFICE description: The type of the location. contactDetails: $ref: '#/components/schemas/contactDetails' metadata: $ref: '#/components/schemas/metadata' mixins: type: object description: Mixins request. A map where a key represent mixins set name and a value represent a map with key-value pairs. additionalProperties: true locationCreate: title: Location create payload type: object properties: id: type: string description: Custom location identifier. If not provided, it is automatically generated. minLength: 1 maxLength: 66 pattern: ^[a-zA-Z0-9_-]$ name: type: string description: 'The name of the location,' type: type: string enum: - HEADQUARTER - WAREHOUSE - OFFICE description: The type of the location. contactDetails: $ref: '#/components/schemas/contactDetails' metadata: $ref: '#/components/schemas/metadata_create' mixins: type: object description: Mixins request. A map where a key represent mixins set name and a value represent a map with key-value pairs. additionalProperties: true required: - type - contactDetails locationUpdate: title: Location update payload type: object properties: name: type: string description: The name of the location type: type: string enum: - HEADQUARTER - WAREHOUSE - OFFICE description: The type of the location. contactDetails: $ref: '#/components/schemas/contactDetails' metadata: $ref: '#/components/schemas/metadataUpdate' mixins: type: object description: Mixins request. A map where a key represent mixins set name and a value represent a map with key-value pairs. additionalProperties: true required: - type - contactDetails contactDetails: title: Contact Details type: object properties: emails: type: array items: type: string description: The list of contact emails. phones: type: array items: type: string description: The list of contact phone numbers. addressLine1: type: string description: The first address line of the contact. addressLine2: type: string description: The second address line of the contact. city: type: string description: The city of the contact. state: type: string description: The state of the contact. postcode: type: string description: The post code of the contact. countryCode: type: string description: The country code of the contact. tags: type: array items: type: string description: Allows to tag the location. metadata_create: title: metadata_create type: object description: Metadata request. properties: mixins: type: object description: Links to the mixin schemas. A map where the keys represent mixins set attributes and the values represent url to a schema for a particular set. additionalProperties: true responses: GetLegalEntity: description: The request was successful. The requested legal entity is returned. content: application/json: schema: $ref: '#/components/schemas/legalEntity' examples: Requested legal entity: value: 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 GetLegalEntities: description: The request was successful. A list of legal entities is returned. headers: X-Total-Count: description: |- 'The total number of entities in the database matching the specified query criteria. Returned if request X-Total-Count header has been set to true.' schema: type: number example: 69 content: application/json: schema: type: array items: $ref: '#/components/schemas/legalEntity' examples: List of legal entities: value: - 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 GetContactAssignment: description: The request was successful. The requested customer assignment is returned. content: application/json: schema: $ref: '#/components/schemas/contactAssignment' examples: Requested customer assignment: value: 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 GetContactAssignments: description: The request was successful. A list of customer assignments is returned. headers: X-Total-Count: description: |- 'The total number of entities in the database matching the specified query criteria. Returned if request X-Total-Count header has been set to true.' schema: type: number example: 69 content: application/json: schema: type: array items: $ref: '#/components/schemas/contactAssignment' examples: List of customer assignments: value: - 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 GetLocation: description: The request was successful. The requested location is returned. content: application/json: schema: $ref: '#/components/schemas/location' examples: Requested location: value: 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 GetLocations: description: The request was successful. A list of locations is returned. headers: X-Total-Count: description: Total amount of locations. schema: type: integer format: int32 content: application/json: schema: type: array items: $ref: '#/components/schemas/location' examples: List of locations: value: - 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 BadRequest_400: description: Request was syntactically incorrect. Details will be provided in the response payload. content: application/json: schema: $ref: '#/components/schemas/errorMessage' examples: Ambiguous tenant: $ref: '#/components/examples/BadRequest400_AmbiguousTenant' BadRequest_400_Update: description: Request was syntactically incorrect. Details will be provided in the response payload. content: application/json: schema: $ref: '#/components/schemas/errorMessage' examples: Ambiguous tenant: $ref: '#/components/examples/BadRequest400_AmbiguousTenant' Document version not specified: $ref: '#/components/examples/BadRequest400_VersionNotSpecified' Unauthorized_401: description: Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload. content: application/json: schema: type: object properties: fault: type: object properties: faultstring: type: string detail: type: object properties: errorcode: type: string examples: Invalid access token: value: fault: faultstring: Invalid access token detail: errorcode: oauth.v2.InvalidAccessToken Access token expired: value: fault: faultstring: Access Token expired detail: errorcode: keymanagement.service.access_token_expired Forbidden_403: description: Given authorization scopes are not sufficient and do not match scopes required by the endpoint. content: application/json: schema: $ref: '#/components/schemas/errorMessage' examples: Access to resource is forbidden: $ref: '#/components/examples/Forbidden403_Example' NotFound_404: description: The requested resource does not exist. content: application/json: schema: $ref: '#/components/schemas/errorMessage' examples: Legal Entity not found: $ref: '#/components/examples/NotFound404_LegalEntityNotFound' Conflict_409: description: Given resource already exists content: application/json: schema: $ref: '#/components/schemas/errorMessage' examples: Access to resource is forbidden: $ref: '#/components/examples/Conflict409_Example' InternalServiceError_500: description: Internal Service Error occurred. content: application/json: schema: $ref: '#/components/schemas/errorMessage' examples: Internal service error: $ref: '#/components/examples/InternalServiceError500_Example' parameters: trait_tenant: name: tenant in: path required: true description: | The tenant that the caller is acting upon. Please note that this value is always lowercase. schema: pattern: '^[a-z][a-z0-9]+$' minLength: 3 maxLength: 16 type: string trait_paged_pageNumber: name: pageNumber in: query description: | 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. schema: default: 1 minimum: 1 type: integer trait_sort: in: query name: sort required: false description: "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." schema: type: string example: 'name,metadata.createdAt:desc' trait_paged_pageSize: name: pageSize in: query description: | The number of documents being retrieved on the page. schema: default: 16 minimum: 1 type: integer trait_XTotalCount_header: in: header name: X-Total-Count required: false description: '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.' schema: default: false type: boolean trait_q_param: in: query name: q required: false description: | Query 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` | schema: type: string example: 'name:~john' trait_fields: in: query name: fields required: false description: 'Comma-separated list of fields to return in the response. If not specified, all fields are returned.' schema: type: string example: 'name,type' trait_legalEntity_id_path: name: legalEntityId in: path required: true schema: type: string description: The legal entity unique identifier. trait_legalEntity_id_query_param: name: id in: query required: false schema: type: string description: | Legal 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. trait_legalEntity_name_query_param: name: name in: query required: false schema: type: string description: | 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. trait_legalEntity_type_query_param: name: type in: query required: false schema: type: string enum: - COMPANY - SUBSIDIARY description: | 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. trait_legalEntity_parentId_query_param: name: parentId in: query required: false schema: type: string description: | 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. trait_contactAssignment_legalEntity_query_param: name: legalEntity.id in: query required: false schema: type: string description: | 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 `equals` operator is used. trait_legalEntity_legalName_query_param: name: legalInfo.legalName in: query required: false schema: type: string description: | 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. trait_legalEntity_registrationDate_query_param: name: legalInfo.registrationDate in: query required: false schema: type: string description: | 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. trait_legalEntity_taxRegistrationNumber_query_param: name: legalInfo.taxRegistrationNumber in: query required: false schema: type: string description: | 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. trait_legalEntity_registrationAgency_query_param: name: legalInfo.registrationAgency in: query required: false schema: type: string description: | 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. trait_legalEntity_countryOfRegistration_query_param: name: legalInfo.countryOfRegistration in: query required: false schema: type: string description: | 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. trait_legalEntity_registrationId_query_param: name: legalInfo.registrationId in: query required: false schema: type: string description: | 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. trait_contactAssignment_customer_query_param: name: customer.id in: query required: false schema: type: string description: | 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. trait_contactAssignment_type_query_param: name: type in: query required: false schema: type: string enum: - PRIMARY - BILLING - LOGISTICS description: | 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. trait_contactAssignment_primary_query_param: name: primary in: query required: false schema: type: boolean description: | 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. trait_location_id_path: name: locationId in: path required: true schema: type: string description: The location unique identifier. trait_location_name_query_param: name: name in: query required: false schema: type: string description: | Location 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. trait_location_type_query_param: name: type in: query required: false schema: type: string enum: - HEADQUARTER - WAREHOUSE - OFFICE description: | 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. trait_location_contactDetails_email_query_param: name: contactDetails.email in: query required: false schema: type: string description: | 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. trait_location_contactDetails_phone_query_param: name: contactDetails.phone in: query required: false schema: type: string description: | 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. trait_location_contactDetails_address_query_param: name: contactDetails.address in: query required: false schema: type: string description: | 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. trait_location_contactDetails_city_query_param: name: contactDetails.city in: query required: false schema: type: string description: | 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. trait_location_contactDetails_state_query_param: name: contactDetails.state in: query required: false schema: type: string description: | 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. trait_location_contactDetails_postcode_query_param: name: contactDetails.postcode in: query required: false schema: type: string description: | 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. trait_location_contactDetails_countryCode_query_param: name: contactDetails.countryCode in: query required: false schema: type: string description: | 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. securitySchemes: OAuth2: type: oauth2 flows: clientCredentials: tokenUrl: 'https://api.emporix.io/oauth/token' scopes: customermanagement.legalentity_read: Needed to read legal entities customermanagement.legalentity_read_own: Needed to read legal entities by customer customermanagement.legalentity_manage: Needed to manage legal entities customermanagement.contactassignment_read: Needed to read contact assignments customermanagement.contactassignment_manage: Needed to manage contact assignments customermanagement.location_read: Needed to read locations customermanagement.location_manage: Needed to manage locations examples: BadRequest400_AmbiguousTenant: value: code: 400 status: Bad Request message: Tenant in the header is not matching with the one provided in the URI. BadRequest400_VersionNotSpecified: value: code: 400 status: Bad Request message: The document version has to be provided on update operations. Forbidden403_Example: value: code: 403 status: Forbidden message: The access to the given resource is forbidden. NotFound404_LegalEntityNotFound: value: code: 404 status: Not Found message: The legal entity with the requested code does not exist. Conflict409_Example: value: code: 409 status: Conflict message: Given resource already exists. InternalServiceError500_Example: value: code: 500 status: Internal Server Error message: A server-side exception occurred that prevented the system from correctly returning the result. requestBodies: {} security: - OAuth2: - customermanagement.legalentity_read - customermanagement.legalentity_read_own - customermanagement.legalentity_manage - customermanagement.contactassignment_read - customermanagement.contactassignment_manage - customermanagement.location_read - customermanagement.location_manage