# Models

## The errorMessage object

```json
{"openapi":"3.0.0","info":{"title":"Customer Management Service","version":"0.0.1"},"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"]}}}}
```

## The metadataUpdate object

```json
{"openapi":"3.0.0","info":{"title":"Customer Management Service","version":"0.0.1"},"components":{"schemas":{"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}}}}}}
```

## The metadata object

```json
{"openapi":"3.0.0","info":{"title":"Customer Management Service","version":"0.0.1"},"components":{"schemas":{"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"}}}]},"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}}}}}}
```

## The customerGroup object

```json
{"openapi":"3.0.0","info":{"title":"Customer Management Service","version":"0.0.1"},"components":{"schemas":{"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."},"role":{"type":"string","description":"The customer group role."}},"required":["id"]}}}}
```

## The resourceId object

```json
{"openapi":"3.0.0","info":{"title":"Customer Management Service","version":"0.0.1"},"components":{"schemas":{"resourceId":{"title":"Resource","type":"object","properties":{"id":{"type":"string","description":"Id of a resource."}}}}}}
```

## The legalEntity object

```json
{"openapi":"3.0.0","info":{"title":"Customer Management Service","version":"0.0.1"},"components":{"schemas":{"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"}},"restrictions":{"$ref":"#/components/schemas/restrictions"},"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."}}},"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."},"role":{"type":"string","description":"The customer group role."}},"required":["id"]},"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}}},"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":{"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"}}}]},"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}}},"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","CONTACT"],"description":"The type of the customer assignment."},"primary":{"type":"boolean","description":"Indicates whether the customer is primary."},"metadata":{"$ref":"#/components/schemas/metadata"}}},"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."}}},"restrictions":{"title":"Restriction","type":"array","maximum":1,"nullable":true,"description":"List of restrictions which determine who can view or manage the Legal Entity.","items":{"type":"string","description":"Access control identifier that determines who can view or manage the Legal Entity.\n\n**Purpose**: Restricts Legal Entity visibility based on scope permissions. Only users/applications \nwith matching restrictions scopes can access Legal Entities with a specific restrictions value.\n\n**Access Control**:\n- *Reading*: Users can only query and view Legal Entities whose `restrictions` value matches one of their authorized restrictions.\n\n**Validation**: The value must exist in the tenant's configured list of valid restrictions.\n"}}}}}
```

## The accountLimit object

```json
{"openapi":"3.0.0","info":{"title":"Customer Management Service","version":"0.0.1"},"components":{"schemas":{"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}}}}}}
```

## The legalInfo object

```json
{"openapi":"3.0.0","info":{"title":"Customer Management Service","version":"0.0.1"},"components":{"schemas":{"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."}}}}}}
```

## The restrictions object

```json
{"openapi":"3.0.0","info":{"title":"Customer Management Service","version":"0.0.1"},"components":{"schemas":{"restrictions":{"title":"Restriction","type":"array","maximum":1,"nullable":true,"description":"List of restrictions which determine who can view or manage the Legal Entity.","items":{"type":"string","description":"Access control identifier that determines who can view or manage the Legal Entity.\n\n**Purpose**: Restricts Legal Entity visibility based on scope permissions. Only users/applications \nwith matching restrictions scopes can access Legal Entities with a specific restrictions value.\n\n**Access Control**:\n- *Reading*: Users can only query and view Legal Entities whose `restrictions` value matches one of their authorized restrictions.\n\n**Validation**: The value must exist in the tenant's configured list of valid restrictions.\n"}}}}}
```

## The legalEntityCreate object

```json
{"openapi":"3.0.0","info":{"title":"Customer Management Service","version":"0.0.1"},"components":{"schemas":{"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"}},"restrictions":{"$ref":"#/components/schemas/restrictions"},"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"]},"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."}}},"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."},"role":{"type":"string","description":"The customer group role."}},"required":["id"]},"resourceId":{"title":"Resource","type":"object","properties":{"id":{"type":"string","description":"Id of a resource."}}},"restrictions":{"title":"Restriction","type":"array","maximum":1,"nullable":true,"description":"List of restrictions which determine who can view or manage the Legal Entity.","items":{"type":"string","description":"Access control identifier that determines who can view or manage the Legal Entity.\n\n**Purpose**: Restricts Legal Entity visibility based on scope permissions. Only users/applications \nwith matching restrictions scopes can access Legal Entities with a specific restrictions value.\n\n**Access Control**:\n- *Reading*: Users can only query and view Legal Entities whose `restrictions` value matches one of their authorized restrictions.\n\n**Validation**: The value must exist in the tenant's configured list of valid restrictions.\n"}},"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}}}}}}
```

## The legalEntityUpdate object

```json
{"openapi":"3.0.0","info":{"title":"Customer Management Service","version":"0.0.1"},"components":{"schemas":{"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"}},"restrictions":{"$ref":"#/components/schemas/restrictions"},"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"]},"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."}}},"resourceId":{"title":"Resource","type":"object","properties":{"id":{"type":"string","description":"Id of a resource."}}},"restrictions":{"title":"Restriction","type":"array","maximum":1,"nullable":true,"description":"List of restrictions which determine who can view or manage the Legal Entity.","items":{"type":"string","description":"Access control identifier that determines who can view or manage the Legal Entity.\n\n**Purpose**: Restricts Legal Entity visibility based on scope permissions. Only users/applications \nwith matching restrictions scopes can access Legal Entities with a specific restrictions value.\n\n**Access Control**:\n- *Reading*: Users can only query and view Legal Entities whose `restrictions` value matches one of their authorized restrictions.\n\n**Validation**: The value must exist in the tenant's configured list of valid restrictions.\n"}},"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}}}}}}
```

## The customer object

```json
{"openapi":"3.0.0","info":{"title":"Customer Management Service","version":"0.0.1"},"components":{"schemas":{"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."}}}}}}
```

## The contactAssignment object

```json
{"openapi":"3.0.0","info":{"title":"Customer Management Service","version":"0.0.1"},"components":{"schemas":{"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","CONTACT"],"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}}},"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"}},"restrictions":{"$ref":"#/components/schemas/restrictions"},"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."}}},"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."},"role":{"type":"string","description":"The customer group role."}},"required":["id"]},"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}}},"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":{"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"}}}]},"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}}},"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","CONTACT"],"description":"The type of the customer assignment."},"primary":{"type":"boolean","description":"Indicates whether the customer is primary."},"metadata":{"$ref":"#/components/schemas/metadata"}}},"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."}}},"restrictions":{"title":"Restriction","type":"array","maximum":1,"nullable":true,"description":"List of restrictions which determine who can view or manage the Legal Entity.","items":{"type":"string","description":"Access control identifier that determines who can view or manage the Legal Entity.\n\n**Purpose**: Restricts Legal Entity visibility based on scope permissions. Only users/applications \nwith matching restrictions scopes can access Legal Entities with a specific restrictions value.\n\n**Access Control**:\n- *Reading*: Users can only query and view Legal Entities whose `restrictions` value matches one of their authorized restrictions.\n\n**Validation**: The value must exist in the tenant's configured list of valid restrictions.\n"}}}}}
```

## The contactAssignmentWithoutExpandedLegalEntity object

```json
{"openapi":"3.0.0","info":{"title":"Customer Management Service","version":"0.0.1"},"components":{"schemas":{"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","CONTACT"],"description":"The type of the customer assignment."},"primary":{"type":"boolean","description":"Indicates whether the customer is primary."},"metadata":{"$ref":"#/components/schemas/metadata"}}},"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."}}},"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"}}}]},"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}}}}}}
```

## The contactAssignmentCreate object

```json
{"openapi":"3.0.0","info":{"title":"Customer Management Service","version":"0.0.1"},"components":{"schemas":{"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","CONTACT"],"description":"The type of the customer assignment. If not provided, it is set to `Contact` by default."},"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"]},"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}}}}}}
```

## The contactAssignmentUpdate object

```json
{"openapi":"3.0.0","info":{"title":"Customer Management Service","version":"0.0.1"},"components":{"schemas":{"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","CONTACT"],"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"]},"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}}}}}}
```

## The location object

```json
{"openapi":"3.0.0","info":{"title":"Customer Management Service","version":"0.0.1"},"components":{"schemas":{"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}}},"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":{"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"}}}]},"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}}}}}}
```

## The locationCreate object

```json
{"openapi":"3.0.0","info":{"title":"Customer Management Service","version":"0.0.1"},"components":{"schemas":{"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"]},"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}}}}}}
```

## The locationUpdate object

```json
{"openapi":"3.0.0","info":{"title":"Customer Management Service","version":"0.0.1"},"components":{"schemas":{"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."}}},"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}}}}}}
```

## The contactDetails object

```json
{"openapi":"3.0.0","info":{"title":"Customer Management Service","version":"0.0.1"},"components":{"schemas":{"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."}}}}}}
```

## The metadata\_create object

```json
{"openapi":"3.0.0","info":{"title":"Customer Management Service","version":"0.0.1"},"components":{"schemas":{"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}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.emporix.io/api-references-1/readme/api-reference-14/models.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
