# Addresses

## Retrieving customer addresses

> Retrieves a list of addresses for a specified customer.

```json
{"openapi":"3.0.0","info":{"title":"Customer Service (tenant-managed)","version":"0.0.1"},"tags":[{"name":"Addresses"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["customer.customer_read"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"refreshUrl":"","scopes":{"customer.customer_read":"Needed to retrieve customer profiles.","customer.customer_read_own":"Needed by customer to retrieve customer profiles from the same company.","customer.customer_manage":"Needed to manage customer profiles.","customer.customer_manage_own":"Needed by customer to manage customer profiles from the same company."},"tokenUrl":"https://api.emporix.io/oauth/token"}}}},"schemas":{"Address":{"type":"object","description":"Customer address information.","properties":{"id":{"type":"string","description":"Customer address unique identifier generated when the address is added to the customer account."},"contactName":{"type":"string"},"companyName":{"type":"string"},"street":{"type":"string"},"streetNumber":{"type":"string"},"streetAppendix":{"type":"string"},"extraLine1":{"type":"string"},"extraLine2":{"type":"string"},"extraLine3":{"type":"string"},"extraLine4":{"type":"string"},"zipCode":{"type":"string"},"city":{"type":"string"},"country":{"type":"string","maxLength":2,"minLength":2},"state":{"type":"string"},"contactPhone":{"type":"string"},"isDefault":{"type":"boolean","default":false,"description":"Flag indicating whether the address is the customer default address."},"tags":{"type":"array","description":"","items":{"type":"string"}},"metadata":{"$ref":"#/components/schemas/DefaultDtoMetadata"},"mixins":{"type":"object","description":"Customer address additional properties.","additionalProperties":true}},"required":["contactName"]},"DefaultDtoMetadata":{"title":"DefaultDtoMetadata","type":"object","allOf":[{"$ref":"#/components/schemas/BasicMetadataDto"},{"type":"object","properties":{"version":{"type":"integer"}}}]},"BasicMetadataDto":{"title":"DefaultDtoMetadata","type":"object","properties":{"mixins":{"type":"object","additionalProperties":true}},"description":"Links to mixin schemas."},"ErrorMessage":{"title":"","description":"Schema for API-specific errors.","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"Original HTTP error code. It should be consistent with the HTTP response code.","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"Classification of the error type.\n**Note:** The error type should be written in lowercase and include underscores, for example `validation_failure`.","type":"string"},"message":{"description":"Descriptive error message for debugging purposes.","type":"string"},"moreInfo":{"type":"string","description":"More information (such as a link to the documentation) for investigating further and getting support."},"details":{"description":"List of problems causing the error.","type":"array","items":{"title":"errorDetail","description":"Specific error cause.","type":"object","properties":{"field":{"description":"Element in request data which is causing the error, for example `category.name`.\nIf the violation was not field-specific, this field will be empty.","type":"string"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"Classification of the specific error cause. This value should always be interpreted within the context of the general error type.\n**Note:** The error type should be written in lowercase and include underscores, for example `missing_value`.","type":"string"},"message":{"description":"Descriptive error message for debugging purposes.","type":"string"},"moreInfo":{"type":"string","description":"More information (such as a link to the documentation) for investigating further and getting support."}}}}}}},"responses":{"400_bad_request":{"description":"Request was syntactically incorrect. Details will be provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"401_unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"403_forbidden":{"description":"Given authorization scopes are not sufficient and do not match scopes required by the endpoint.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}}},"paths":{"/customer/{tenant}/customers/{customerNumber}/addresses":{"get":{"summary":"Retrieving customer addresses","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Address"}}}}},"400":{"$ref":"#/components/responses/400_bad_request"},"401":{"$ref":"#/components/responses/401_unauthorized"},"403":{"$ref":"#/components/responses/403_forbidden"},"404":{"description":"Not Found"}},"description":"Retrieves a list of addresses for a specified customer.","operationId":"GET-customer-tenant-list-customer-addresses","parameters":[],"tags":["Addresses"]}}}}
```

## Adding a customer address

> Adds an address to a specified customer profile.<br>

```json
{"openapi":"3.0.0","info":{"title":"Customer Service (tenant-managed)","version":"0.0.1"},"tags":[{"name":"Addresses"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["customer.customer_manage"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"refreshUrl":"","scopes":{"customer.customer_read":"Needed to retrieve customer profiles.","customer.customer_read_own":"Needed by customer to retrieve customer profiles from the same company.","customer.customer_manage":"Needed to manage customer profiles.","customer.customer_manage_own":"Needed by customer to manage customer profiles from the same company."},"tokenUrl":"https://api.emporix.io/oauth/token"}}}},"schemas":{"ResourceLocation":{"type":"object","title":"Resource Location","description":"Schema for showing location of the new resource.","properties":{"id":{"description":"Resource identifier.","type":"string"}}},"ErrorMessage":{"title":"","description":"Schema for API-specific errors.","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"Original HTTP error code. It should be consistent with the HTTP response code.","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"Classification of the error type.\n**Note:** The error type should be written in lowercase and include underscores, for example `validation_failure`.","type":"string"},"message":{"description":"Descriptive error message for debugging purposes.","type":"string"},"moreInfo":{"type":"string","description":"More information (such as a link to the documentation) for investigating further and getting support."},"details":{"description":"List of problems causing the error.","type":"array","items":{"title":"errorDetail","description":"Specific error cause.","type":"object","properties":{"field":{"description":"Element in request data which is causing the error, for example `category.name`.\nIf the violation was not field-specific, this field will be empty.","type":"string"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"Classification of the specific error cause. This value should always be interpreted within the context of the general error type.\n**Note:** The error type should be written in lowercase and include underscores, for example `missing_value`.","type":"string"},"message":{"description":"Descriptive error message for debugging purposes.","type":"string"},"moreInfo":{"type":"string","description":"More information (such as a link to the documentation) for investigating further and getting support."}}}}}},"Address_2":{"type":"object","properties":{"id":{"type":"string","description":"Custom customer address identifier. If not provided, it is automatically generated."},"contactName":{"type":"string"},"companyName":{"type":"string"},"street":{"type":"string"},"streetNumber":{"type":"string"},"streetAppendix":{"type":"string"},"extraLine1":{"type":"string"},"extraLine2":{"type":"string"},"extraLine3":{"type":"string"},"extraLine4":{"type":"string"},"zipCode":{"type":"string"},"city":{"type":"string"},"country":{"type":"string","maxLength":2,"minLength":2},"state":{"type":"string"},"contactPhone":{"type":"string"},"isDefault":{"type":"boolean","default":false,"description":"Flag indicating whether the address is the customer default address."},"tags":{"type":"array","description":"","items":{"type":"string"}},"metadata":{"type":"object","additionalProperties":false,"description":"Links to mixin schemas.","properties":{"mixins":{"type":"object","additionalProperties":true}}},"mixins":{"type":"object","description":"Customer address additional properties.","additionalProperties":true}},"required":["contactName"],"description":""}},"responses":{"400_bad_request":{"description":"Request was syntactically incorrect. Details will be provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"401_unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"403_forbidden":{"description":"Given authorization scopes are not sufficient and do not match scopes required by the endpoint.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404_customer":{"description":"Customer with the specified `customerNumber` doesn't exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"409_conflict":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}}},"paths":{"/customer/{tenant}/customers/{customerNumber}/addresses":{"post":{"summary":"Adding a customer address","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceLocation"}}}},"400":{"$ref":"#/components/responses/400_bad_request"},"401":{"$ref":"#/components/responses/401_unauthorized"},"403":{"$ref":"#/components/responses/403_forbidden"},"404":{"$ref":"#/components/responses/404_customer"},"409":{"$ref":"#/components/responses/409_conflict"}},"description":"Adds an address to a specified customer profile.\n","operationId":"POST-customer-tenant-add-customer-address","parameters":[],"tags":["Addresses"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Address_2"}}},"description":""}}}}}
```

## Retrieving a customer address

> Retrieves a specified customer address and its details.<br>

```json
{"openapi":"3.0.0","info":{"title":"Customer Service (tenant-managed)","version":"0.0.1"},"tags":[{"name":"Addresses"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["customer.customer_read"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"refreshUrl":"","scopes":{"customer.customer_read":"Needed to retrieve customer profiles.","customer.customer_read_own":"Needed by customer to retrieve customer profiles from the same company.","customer.customer_manage":"Needed to manage customer profiles.","customer.customer_manage_own":"Needed by customer to manage customer profiles from the same company."},"tokenUrl":"https://api.emporix.io/oauth/token"}}}},"schemas":{"Address":{"type":"object","description":"Customer address information.","properties":{"id":{"type":"string","description":"Customer address unique identifier generated when the address is added to the customer account."},"contactName":{"type":"string"},"companyName":{"type":"string"},"street":{"type":"string"},"streetNumber":{"type":"string"},"streetAppendix":{"type":"string"},"extraLine1":{"type":"string"},"extraLine2":{"type":"string"},"extraLine3":{"type":"string"},"extraLine4":{"type":"string"},"zipCode":{"type":"string"},"city":{"type":"string"},"country":{"type":"string","maxLength":2,"minLength":2},"state":{"type":"string"},"contactPhone":{"type":"string"},"isDefault":{"type":"boolean","default":false,"description":"Flag indicating whether the address is the customer default address."},"tags":{"type":"array","description":"","items":{"type":"string"}},"metadata":{"$ref":"#/components/schemas/DefaultDtoMetadata"},"mixins":{"type":"object","description":"Customer address additional properties.","additionalProperties":true}},"required":["contactName"]},"DefaultDtoMetadata":{"title":"DefaultDtoMetadata","type":"object","allOf":[{"$ref":"#/components/schemas/BasicMetadataDto"},{"type":"object","properties":{"version":{"type":"integer"}}}]},"BasicMetadataDto":{"title":"DefaultDtoMetadata","type":"object","properties":{"mixins":{"type":"object","additionalProperties":true}},"description":"Links to mixin schemas."},"ErrorMessage":{"title":"","description":"Schema for API-specific errors.","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"Original HTTP error code. It should be consistent with the HTTP response code.","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"Classification of the error type.\n**Note:** The error type should be written in lowercase and include underscores, for example `validation_failure`.","type":"string"},"message":{"description":"Descriptive error message for debugging purposes.","type":"string"},"moreInfo":{"type":"string","description":"More information (such as a link to the documentation) for investigating further and getting support."},"details":{"description":"List of problems causing the error.","type":"array","items":{"title":"errorDetail","description":"Specific error cause.","type":"object","properties":{"field":{"description":"Element in request data which is causing the error, for example `category.name`.\nIf the violation was not field-specific, this field will be empty.","type":"string"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"Classification of the specific error cause. This value should always be interpreted within the context of the general error type.\n**Note:** The error type should be written in lowercase and include underscores, for example `missing_value`.","type":"string"},"message":{"description":"Descriptive error message for debugging purposes.","type":"string"},"moreInfo":{"type":"string","description":"More information (such as a link to the documentation) for investigating further and getting support."}}}}}}},"responses":{"400_bad_request":{"description":"Request was syntactically incorrect. Details will be provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"401_unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"403_forbidden":{"description":"Given authorization scopes are not sufficient and do not match scopes required by the endpoint.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404_address":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}}},"paths":{"/customer/{tenant}/customers/{customerNumber}/addresses/{addressId}":{"get":{"summary":"Retrieving a customer address","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Address"}}}},"400":{"$ref":"#/components/responses/400_bad_request"},"401":{"$ref":"#/components/responses/401_unauthorized"},"403":{"$ref":"#/components/responses/403_forbidden"},"404":{"$ref":"#/components/responses/404_address"}},"description":"Retrieves a specified customer address and its details.\n","operationId":"GET-customer-tenant-retrieve-customer-address-by-id","parameters":[],"tags":["Addresses"]}}}}
```

## Upserting a customer address

> Updates a specified customer address or creates a new one if it doesn't exist yet.<br>

```json
{"openapi":"3.0.0","info":{"title":"Customer Service (tenant-managed)","version":"0.0.1"},"tags":[{"name":"Addresses"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["customer.customer_manage"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"refreshUrl":"","scopes":{"customer.customer_read":"Needed to retrieve customer profiles.","customer.customer_read_own":"Needed by customer to retrieve customer profiles from the same company.","customer.customer_manage":"Needed to manage customer profiles.","customer.customer_manage_own":"Needed by customer to manage customer profiles from the same company."},"tokenUrl":"https://api.emporix.io/oauth/token"}}}},"schemas":{"ResourceLocation":{"type":"object","title":"Resource Location","description":"Schema for showing location of the new resource.","properties":{"id":{"description":"Resource identifier.","type":"string"}}},"ErrorMessage":{"title":"","description":"Schema for API-specific errors.","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"Original HTTP error code. It should be consistent with the HTTP response code.","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"Classification of the error type.\n**Note:** The error type should be written in lowercase and include underscores, for example `validation_failure`.","type":"string"},"message":{"description":"Descriptive error message for debugging purposes.","type":"string"},"moreInfo":{"type":"string","description":"More information (such as a link to the documentation) for investigating further and getting support."},"details":{"description":"List of problems causing the error.","type":"array","items":{"title":"errorDetail","description":"Specific error cause.","type":"object","properties":{"field":{"description":"Element in request data which is causing the error, for example `category.name`.\nIf the violation was not field-specific, this field will be empty.","type":"string"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"Classification of the specific error cause. This value should always be interpreted within the context of the general error type.\n**Note:** The error type should be written in lowercase and include underscores, for example `missing_value`.","type":"string"},"message":{"description":"Descriptive error message for debugging purposes.","type":"string"},"moreInfo":{"type":"string","description":"More information (such as a link to the documentation) for investigating further and getting support."}}}}}},"AddressUpdateDto":{"allOf":[{"$ref":"#/components/schemas/AddressCommonDto"},{"type":"object","properties":{"isDefault":{"type":"boolean","description":"Flag indicating whether the address is the customer default address."},"contactName":{"type":"string","description":"Required if address does not exist and should be created in upsert operation."}}}]},"AddressCommonDto":{"title":"AddressCommonDto","type":"object","properties":{"contactName":{"type":"string"},"companyName":{"type":"string"},"street":{"type":"string"},"streetNumber":{"type":"string"},"streetAppendix":{"type":"string"},"extraLine1":{"type":"string"},"extraLine2":{"type":"string"},"extraLine3":{"type":"string"},"extraLine4":{"type":"string"},"zipCode":{"type":"string"},"city":{"type":"string"},"country":{"type":"string","description":"2 letter country code compliant with the ISO 3166-1 alpha-2 standard."},"state":{"type":"string"},"contactPhone":{"type":"string"},"tags":{"type":"array","description":"","items":{"type":"string"}},"metadata":{"$ref":"#/components/schemas/DefaultDtoMetadata"},"mixins":{"type":"object","description":"Customer address additional properties.","additionalProperties":true}}},"DefaultDtoMetadata":{"title":"DefaultDtoMetadata","type":"object","allOf":[{"$ref":"#/components/schemas/BasicMetadataDto"},{"type":"object","properties":{"version":{"type":"integer"}}}]},"BasicMetadataDto":{"title":"DefaultDtoMetadata","type":"object","properties":{"mixins":{"type":"object","additionalProperties":true}},"description":"Links to mixin schemas."}},"responses":{"400_bad_request":{"description":"Request was syntactically incorrect. Details will be provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"401_unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"403_forbidden":{"description":"Given authorization scopes are not sufficient and do not match scopes required by the endpoint.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404_address":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}}},"paths":{"/customer/{tenant}/customers/{customerNumber}/addresses/{addressId}":{"put":{"summary":"Upserting a customer address","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceLocation"}}}},"204":{"description":"No Content - update has been successful"},"400":{"$ref":"#/components/responses/400_bad_request"},"401":{"$ref":"#/components/responses/401_unauthorized"},"403":{"$ref":"#/components/responses/403_forbidden"},"404":{"$ref":"#/components/responses/404_address"}},"description":"Updates a specified customer address or creates a new one if it doesn't exist yet.\n","operationId":"PUT-customer-tenant-update-customer-address","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddressUpdateDto"}}},"required":false,"description":""},"parameters":[],"tags":["Addresses"]}}}}
```

## Deleting a customer address

> Deletes a specified customer address.<br>

```json
{"openapi":"3.0.0","info":{"title":"Customer Service (tenant-managed)","version":"0.0.1"},"tags":[{"name":"Addresses"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["customer.customer_manage"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"refreshUrl":"","scopes":{"customer.customer_read":"Needed to retrieve customer profiles.","customer.customer_read_own":"Needed by customer to retrieve customer profiles from the same company.","customer.customer_manage":"Needed to manage customer profiles.","customer.customer_manage_own":"Needed by customer to manage customer profiles from the same company."},"tokenUrl":"https://api.emporix.io/oauth/token"}}}},"responses":{"400_bad_request":{"description":"Request was syntactically incorrect. Details will be provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"401_unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"403_forbidden":{"description":"Given authorization scopes are not sufficient and do not match scopes required by the endpoint.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404_address":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"schemas":{"ErrorMessage":{"title":"","description":"Schema for API-specific errors.","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"Original HTTP error code. It should be consistent with the HTTP response code.","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"Classification of the error type.\n**Note:** The error type should be written in lowercase and include underscores, for example `validation_failure`.","type":"string"},"message":{"description":"Descriptive error message for debugging purposes.","type":"string"},"moreInfo":{"type":"string","description":"More information (such as a link to the documentation) for investigating further and getting support."},"details":{"description":"List of problems causing the error.","type":"array","items":{"title":"errorDetail","description":"Specific error cause.","type":"object","properties":{"field":{"description":"Element in request data which is causing the error, for example `category.name`.\nIf the violation was not field-specific, this field will be empty.","type":"string"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"Classification of the specific error cause. This value should always be interpreted within the context of the general error type.\n**Note:** The error type should be written in lowercase and include underscores, for example `missing_value`.","type":"string"},"message":{"description":"Descriptive error message for debugging purposes.","type":"string"},"moreInfo":{"type":"string","description":"More information (such as a link to the documentation) for investigating further and getting support."}}}}}}}},"paths":{"/customer/{tenant}/customers/{customerNumber}/addresses/{addressId}":{"delete":{"summary":"Deleting a customer address","requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"required":false},"responses":{"204":{"description":"No Content"},"400":{"$ref":"#/components/responses/400_bad_request"},"401":{"$ref":"#/components/responses/401_unauthorized"},"403":{"$ref":"#/components/responses/403_forbidden"},"404":{"$ref":"#/components/responses/404_address"}},"description":"Deletes a specified customer address.\n","operationId":"DELETE-customer-tenant-remove-customer-address","parameters":[],"tags":["Addresses"]}}}}
```

## Partially updating a customer address

> Updates a specified customer address.<br>

```json
{"openapi":"3.0.0","info":{"title":"Customer Service (tenant-managed)","version":"0.0.1"},"tags":[{"name":"Addresses"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["customer.customer_manage"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"refreshUrl":"","scopes":{"customer.customer_read":"Needed to retrieve customer profiles.","customer.customer_read_own":"Needed by customer to retrieve customer profiles from the same company.","customer.customer_manage":"Needed to manage customer profiles.","customer.customer_manage_own":"Needed by customer to manage customer profiles from the same company."},"tokenUrl":"https://api.emporix.io/oauth/token"}}}},"responses":{"400_bad_request":{"description":"Request was syntactically incorrect. Details will be provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"401_unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"403_forbidden":{"description":"Given authorization scopes are not sufficient and do not match scopes required by the endpoint.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404_address":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"schemas":{"ErrorMessage":{"title":"","description":"Schema for API-specific errors.","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"Original HTTP error code. It should be consistent with the HTTP response code.","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"Classification of the error type.\n**Note:** The error type should be written in lowercase and include underscores, for example `validation_failure`.","type":"string"},"message":{"description":"Descriptive error message for debugging purposes.","type":"string"},"moreInfo":{"type":"string","description":"More information (such as a link to the documentation) for investigating further and getting support."},"details":{"description":"List of problems causing the error.","type":"array","items":{"title":"errorDetail","description":"Specific error cause.","type":"object","properties":{"field":{"description":"Element in request data which is causing the error, for example `category.name`.\nIf the violation was not field-specific, this field will be empty.","type":"string"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"Classification of the specific error cause. This value should always be interpreted within the context of the general error type.\n**Note:** The error type should be written in lowercase and include underscores, for example `missing_value`.","type":"string"},"message":{"description":"Descriptive error message for debugging purposes.","type":"string"},"moreInfo":{"type":"string","description":"More information (such as a link to the documentation) for investigating further and getting support."}}}}}},"AddressUpdateDto":{"allOf":[{"$ref":"#/components/schemas/AddressCommonDto"},{"type":"object","properties":{"isDefault":{"type":"boolean","description":"Flag indicating whether the address is the customer default address."},"contactName":{"type":"string","description":"Required if address does not exist and should be created in upsert operation."}}}]},"AddressCommonDto":{"title":"AddressCommonDto","type":"object","properties":{"contactName":{"type":"string"},"companyName":{"type":"string"},"street":{"type":"string"},"streetNumber":{"type":"string"},"streetAppendix":{"type":"string"},"extraLine1":{"type":"string"},"extraLine2":{"type":"string"},"extraLine3":{"type":"string"},"extraLine4":{"type":"string"},"zipCode":{"type":"string"},"city":{"type":"string"},"country":{"type":"string","description":"2 letter country code compliant with the ISO 3166-1 alpha-2 standard."},"state":{"type":"string"},"contactPhone":{"type":"string"},"tags":{"type":"array","description":"","items":{"type":"string"}},"metadata":{"$ref":"#/components/schemas/DefaultDtoMetadata"},"mixins":{"type":"object","description":"Customer address additional properties.","additionalProperties":true}}},"DefaultDtoMetadata":{"title":"DefaultDtoMetadata","type":"object","allOf":[{"$ref":"#/components/schemas/BasicMetadataDto"},{"type":"object","properties":{"version":{"type":"integer"}}}]},"BasicMetadataDto":{"title":"DefaultDtoMetadata","type":"object","properties":{"mixins":{"type":"object","additionalProperties":true}},"description":"Links to mixin schemas."}}},"paths":{"/customer/{tenant}/customers/{customerNumber}/addresses/{addressId}":{"patch":{"summary":"Partially updating a customer address","responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/400_bad_request"},"401":{"$ref":"#/components/responses/401_unauthorized"},"403":{"$ref":"#/components/responses/403_forbidden"},"404":{"$ref":"#/components/responses/404_address"}},"description":"Updates a specified customer address.\n","operationId":"PATCH-customer-tenant-update-customer-address","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddressUpdateDto"}}},"required":false,"description":""},"parameters":[],"tags":["Addresses"]}}}}
```

## Adding tags to a customer address

> Adds tags to a specified customer address.<br>

```json
{"openapi":"3.0.0","info":{"title":"Customer Service (tenant-managed)","version":"0.0.1"},"tags":[{"name":"Addresses"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":[]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"refreshUrl":"","scopes":{"customer.customer_read":"Needed to retrieve customer profiles.","customer.customer_read_own":"Needed by customer to retrieve customer profiles from the same company.","customer.customer_manage":"Needed to manage customer profiles.","customer.customer_manage_own":"Needed by customer to manage customer profiles from the same company."},"tokenUrl":"https://api.emporix.io/oauth/token"}}}},"responses":{"400_bad_request":{"description":"Request was syntactically incorrect. Details will be provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"401_unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"403_forbidden":{"description":"Given authorization scopes are not sufficient and do not match scopes required by the endpoint.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404_address":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"schemas":{"ErrorMessage":{"title":"","description":"Schema for API-specific errors.","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"Original HTTP error code. It should be consistent with the HTTP response code.","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"Classification of the error type.\n**Note:** The error type should be written in lowercase and include underscores, for example `validation_failure`.","type":"string"},"message":{"description":"Descriptive error message for debugging purposes.","type":"string"},"moreInfo":{"type":"string","description":"More information (such as a link to the documentation) for investigating further and getting support."},"details":{"description":"List of problems causing the error.","type":"array","items":{"title":"errorDetail","description":"Specific error cause.","type":"object","properties":{"field":{"description":"Element in request data which is causing the error, for example `category.name`.\nIf the violation was not field-specific, this field will be empty.","type":"string"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"Classification of the specific error cause. This value should always be interpreted within the context of the general error type.\n**Note:** The error type should be written in lowercase and include underscores, for example `missing_value`.","type":"string"},"message":{"description":"Descriptive error message for debugging purposes.","type":"string"},"moreInfo":{"type":"string","description":"More information (such as a link to the documentation) for investigating further and getting support."}}}}}}},"parameters":{"tags":{"name":"tags","in":"query","required":true,"schema":{"type":"string"},"description":"List of address tags, separated by commas."}}},"paths":{"/customer/{tenant}/customers/{customerNumber}/addresses/{addressId}/tags":{"post":{"summary":"Adding tags to a customer address","responses":{"204":{"description":"No Content"},"400":{"$ref":"#/components/responses/400_bad_request"},"401":{"$ref":"#/components/responses/401_unauthorized"},"403":{"$ref":"#/components/responses/403_forbidden"},"404":{"$ref":"#/components/responses/404_address"}},"description":"Adds tags to a specified customer address.\n","operationId":"POST-customer-tenant-add-address-tags","parameters":[{"$ref":"#/components/parameters/tags"}],"tags":["Addresses"]}}}}
```

## Deleting tags from a customer address

> Deletes tags from a specified customer address.<br>

```json
{"openapi":"3.0.0","info":{"title":"Customer Service (tenant-managed)","version":"0.0.1"},"tags":[{"name":"Addresses"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["customer.customer_manage"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"refreshUrl":"","scopes":{"customer.customer_read":"Needed to retrieve customer profiles.","customer.customer_read_own":"Needed by customer to retrieve customer profiles from the same company.","customer.customer_manage":"Needed to manage customer profiles.","customer.customer_manage_own":"Needed by customer to manage customer profiles from the same company."},"tokenUrl":"https://api.emporix.io/oauth/token"}}}},"responses":{"400_bad_request":{"description":"Request was syntactically incorrect. Details will be provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"401_unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"403_forbidden":{"description":"Given authorization scopes are not sufficient and do not match scopes required by the endpoint.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404_address":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"schemas":{"ErrorMessage":{"title":"","description":"Schema for API-specific errors.","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"Original HTTP error code. It should be consistent with the HTTP response code.","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"Classification of the error type.\n**Note:** The error type should be written in lowercase and include underscores, for example `validation_failure`.","type":"string"},"message":{"description":"Descriptive error message for debugging purposes.","type":"string"},"moreInfo":{"type":"string","description":"More information (such as a link to the documentation) for investigating further and getting support."},"details":{"description":"List of problems causing the error.","type":"array","items":{"title":"errorDetail","description":"Specific error cause.","type":"object","properties":{"field":{"description":"Element in request data which is causing the error, for example `category.name`.\nIf the violation was not field-specific, this field will be empty.","type":"string"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"Classification of the specific error cause. This value should always be interpreted within the context of the general error type.\n**Note:** The error type should be written in lowercase and include underscores, for example `missing_value`.","type":"string"},"message":{"description":"Descriptive error message for debugging purposes.","type":"string"},"moreInfo":{"type":"string","description":"More information (such as a link to the documentation) for investigating further and getting support."}}}}}}},"parameters":{"tags":{"name":"tags","in":"query","required":true,"schema":{"type":"string"},"description":"List of address tags, separated by commas."}}},"paths":{"/customer/{tenant}/customers/{customerNumber}/addresses/{addressId}/tags":{"delete":{"summary":"Deleting tags from a customer address","responses":{"204":{"description":"No Content"},"400":{"$ref":"#/components/responses/400_bad_request"},"401":{"$ref":"#/components/responses/401_unauthorized"},"403":{"$ref":"#/components/responses/403_forbidden"},"404":{"$ref":"#/components/responses/404_address"}},"description":"Deletes tags from a specified customer address.\n","operationId":"DELETE-customer-tenant-remove-address-tags","parameters":[{"$ref":"#/components/parameters/tags"}],"tags":["Addresses"]}}}}
```


---

# 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-13/addresses.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.
