> For the complete documentation index, see [llms.txt](https://hub.equipme.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hub.equipme.io/development/api-reference-pro/sales-or-customer-locations.md).

# Sales | Customer Locations

## List locations of a customer

> Retrieve a list of locations related to the customer specified in the url parameter.\
> \
> You can only access customers of your provider entity.

```json
{"openapi":"3.0.4","info":{"title":"Equipme Supplier API","version":"v1"},"tags":[{"name":"Sales | Customer Locations"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"Required for authorization in every request. You can request an API-Key for your tenant in the integrations section of the equipme App.","name":"X-API-KEY","in":"header"}},"schemas":{"LocationSortParameter":{"enum":["name"],"type":"string","description":"Parameters according to which a location can be sorted."},"SortOrder":{"enum":["asc","desc"],"type":"string","description":"Order in which the result of a list request is sorted."},"LocationList":{"required":["items","self","total"],"type":"object","properties":{"previous":{"$ref":"#/components/schemas/ResourceLink"},"next":{"$ref":"#/components/schemas/ResourceLink"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Location"},"description":"The list of result items."},"total":{"type":"integer","description":"The total number of items.","format":"int32"},"self":{"$ref":"#/components/schemas/ResourceLink"}},"additionalProperties":false},"ResourceLink":{"required":["href"],"type":"object","properties":{"href":{"minLength":1,"type":"string","description":"The target resource URI."},"method":{"type":"string","description":"The HTTP method to use for the request.","nullable":true}},"additionalProperties":false},"Location":{"required":["id","name","self","type"],"type":"object","properties":{"created":{"type":"string","description":"The date and time the data record was created.","format":"date-time"},"address":{"$ref":"#/components/schemas/Address"},"managers":{"type":"array","items":{"$ref":"#/components/schemas/LocationManger"},"description":"Current location managers.","nullable":true},"metadataItems":{"type":"array","items":{"$ref":"#/components/schemas/MetadataItem"},"description":"Additional Metadata attributes for the location.","nullable":true},"costCenter":{"$ref":"#/components/schemas/CostCenter"},"id":{"type":"integer","description":"The identifier of the company location.","format":"int32"},"name":{"maxLength":100,"minLength":0,"type":"string","description":"The name of the company location."},"type":{"$ref":"#/components/schemas/LocationType"},"self":{"$ref":"#/components/schemas/ResourceLink"}},"additionalProperties":false},"Address":{"required":["id","self"],"type":"object","properties":{"line1":{"maxLength":100,"minLength":0,"type":"string","description":"First line of the address. e.g. company name or P.O. box.","nullable":true},"street":{"maxLength":100,"minLength":0,"type":"string","description":"The street name of the address.","nullable":true},"number":{"maxLength":30,"minLength":0,"type":"string","description":"The alphanumeric house number in the street.","nullable":true},"addition":{"maxLength":1500,"minLength":0,"type":"string","description":"Addition to the address (line 3) to provide further information for delivery.","nullable":true},"city":{"maxLength":100,"minLength":0,"type":"string","description":"The city name of the address.","nullable":true},"postalCode":{"maxLength":30,"minLength":0,"type":"string","description":"The alphanumeric postal code or zip of the address.","nullable":true},"countryCode":{"maxLength":2,"minLength":0,"type":"string","description":"ISO-3166-1 code of the country.","nullable":true},"regionCode":{"maxLength":10,"minLength":0,"type":"string","description":"ISO-3166-2 code of the region / administrative area. Required e.g. in USA, Canada, Australia or Italy.","nullable":true},"regionName":{"maxLength":100,"minLength":0,"type":"string","description":"Name of the region / administrative area (if no ISO code is given/existing).","nullable":true},"dependentLocality":{"maxLength":200,"minLength":0,"type":"string","description":"A dependent locality is an address element that distinguishes a premise when an address thoroughfare appears more than once in the same post town. PAF holds details of approximately 30,000 localities within the UK.","nullable":true},"phoneNumber":{"maxLength":50,"minLength":0,"type":"string","description":"Phone number of the address. Used primarily for delivery purposes.","nullable":true},"id":{"type":"integer","description":"The id to identify the address in the system.","format":"int64"},"self":{"$ref":"#/components/schemas/ResourceLink"}},"additionalProperties":false,"description":"Postal address for the shipment of goods or invoices."},"LocationManger":{"required":["id","self","username"],"type":"object","properties":{"managerPolicy":{"type":"string","nullable":true},"id":{"type":"integer","description":"The identifier of the employee.","format":"int32"},"firstName":{"maxLength":100,"minLength":0,"type":"string","description":"The first/given name of the employee.","nullable":true},"lastName":{"maxLength":100,"minLength":0,"type":"string","description":"The last/family name of the employee.","nullable":true},"fullName":{"maxLength":150,"minLength":0,"type":"string","description":"Combination of last and firstname","nullable":true,"readOnly":true},"email":{"maxLength":100,"minLength":0,"type":"string","description":"The contact and login mail address.","nullable":true},"username":{"maxLength":100,"minLength":0,"pattern":"^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*\\.[a-zA-Z]{2,}$","type":"string","description":"The username to log in to the app. The value has to be an e-mail address."},"costCenter":{"maxLength":100,"minLength":0,"type":"string","description":"The cost center of the employee.","nullable":true},"costCenterId":{"type":"integer","description":"The identifier of the cost center.","format":"int32","nullable":true},"self":{"$ref":"#/components/schemas/ResourceLink"}},"additionalProperties":false},"MetadataItem":{"required":["key","self"],"type":"object","properties":{"value":{"maxLength":500,"minLength":0,"type":"string","description":"Metadata value","nullable":true},"scope":{"type":"string","description":"Metadata scope. Can be Customer or Supplier to indicate the metadata is specific to a customer or supplier.","nullable":true},"key":{"maxLength":150,"minLength":0,"type":"string","description":"Metadata key used as a unique identifier for the metadata item."},"self":{"$ref":"#/components/schemas/ResourceLink"}},"additionalProperties":false},"CostCenter":{"required":["self"],"type":"object","properties":{"description":{"type":"string","nullable":true},"id":{"type":"integer","format":"int32"},"code":{"type":"string","nullable":true},"self":{"$ref":"#/components/schemas/ResourceLink"}},"additionalProperties":false},"LocationType":{"enum":["location","warehouse","remoteWork"],"type":"string","description":"The type of location."},"ErrorResponse":{"type":"object","properties":{"errorCode":{"type":"string","nullable":true},"errorDescription":{"type":"string","nullable":true},"data":{"nullable":true}},"additionalProperties":false}}},"paths":{"/v1/sales/customers/{customerId}/locations":{"get":{"tags":["Sales | Customer Locations"],"summary":"List locations of a customer","description":"Retrieve a list of locations related to the customer specified in the url parameter.\n\nYou can only access customers of your provider entity.","parameters":[{"name":"customerId","in":"path","description":"The identifier of the customer which owns the locations.","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"search","in":"query","description":"Filter the result by searching for name","schema":{"type":"string"}},{"name":"sortBy","in":"query","description":"Sort the items by a given criterion.","schema":{"$ref":"#/components/schemas/LocationSortParameter"}},{"name":"sortOrder","in":"query","description":"Sort the items in a given order (asc|desc).","schema":{"$ref":"#/components/schemas/SortOrder"}},{"name":"offset","in":"query","description":"Specifies the index of the first item to return","schema":{"type":"integer","format":"int32","default":0}},{"name":"limit","in":"query","description":"Specifies the maximum number of items to return (min: 1; max: 1000)","schema":{"type":"integer","format":"int32","default":100}}],"responses":{"200":{"description":"OK: The requested locations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationList"}}}},"400":{"description":"Bad request: See response message for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized: Invalid api key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden: Resource access denied or resource does not exist anymore.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"NotFound: Requested customer could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Create a location for a customer

> The location will be related to the customer given in the url parameter. \
> \
> You can only create locations for customers of your provider entity. \
> \
> Creating an office location will also create a warehouse location with the same name and address. \
> \
> If you have activated "system products/services" for your provider tenant, an instance of the "Site Management" system service will be added to the customer's approval cart. <br>

```json
{"openapi":"3.0.4","info":{"title":"Equipme Supplier API","version":"v1"},"tags":[{"name":"Sales | Customer Locations"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"Required for authorization in every request. You can request an API-Key for your tenant in the integrations section of the equipme App.","name":"X-API-KEY","in":"header"}},"schemas":{"LocationCreateModel":{"required":["address","name"],"type":"object","properties":{"name":{"maxLength":100,"minLength":0,"type":"string","description":"The name of the location."},"address":{"$ref":"#/components/schemas/AddressCreateModel"},"managers":{"type":"array","items":{"$ref":"#/components/schemas/LocationManagerCreateModel"},"description":"The location managers.","nullable":true},"costCenterId":{"type":"integer","description":"Location cost center","format":"int32","nullable":true}},"additionalProperties":false},"AddressCreateModel":{"required":["city","countryCode"],"type":"object","properties":{"line1":{"maxLength":100,"minLength":0,"type":"string","description":"First line of the address. e.g. company name or P.O. box.","nullable":true},"street":{"maxLength":100,"minLength":0,"type":"string","description":"The street name of the address.","nullable":true},"number":{"maxLength":30,"minLength":0,"type":"string","description":"The alphanumeric house number in the street.","nullable":true},"addition":{"maxLength":1500,"minLength":0,"type":"string","description":"Addition to the address (line 3) to provide further information for delivery.","nullable":true},"city":{"maxLength":100,"minLength":0,"type":"string","description":"The city name of the address."},"postalCode":{"maxLength":30,"minLength":0,"type":"string","description":"The alphanumeric postal code or zip of the address.","nullable":true},"countryCode":{"maxLength":2,"minLength":0,"type":"string","description":"ISO-3166-1 code of the country."},"regionCode":{"maxLength":10,"minLength":0,"type":"string","description":"ISO-3166-2 code of the region / administrative area. Required e.g. in USA, Canada, Australia or Italy.","nullable":true},"regionName":{"maxLength":100,"minLength":0,"type":"string","description":"Name of the region / administrative area (if no ISO code is given/existing).","nullable":true},"dependentLocality":{"maxLength":200,"minLength":0,"type":"string","description":"A dependent locality is an address element that distinguishes a premise when an address thoroughfare appears more than once in the same post town. PAF holds details of approximately 30,000 localities within the UK.","nullable":true},"phoneNumber":{"maxLength":50,"minLength":0,"type":"string","description":"Phone number of the address. Used primarily for delivery purposes.","nullable":true}},"additionalProperties":false},"LocationManagerCreateModel":{"required":["employeeId","role"],"type":"object","properties":{"employeeId":{"maximum":2147483647,"minimum":1,"type":"integer","description":"The identifier of the user who is the manager of the location.","format":"int32"},"role":{"minLength":1,"type":"string","description":"The role of the manager at the location. Can be either 'location-manager' or 'location-executive'."}},"additionalProperties":false},"Location":{"required":["id","name","self","type"],"type":"object","properties":{"created":{"type":"string","description":"The date and time the data record was created.","format":"date-time"},"address":{"$ref":"#/components/schemas/Address"},"managers":{"type":"array","items":{"$ref":"#/components/schemas/LocationManger"},"description":"Current location managers.","nullable":true},"metadataItems":{"type":"array","items":{"$ref":"#/components/schemas/MetadataItem"},"description":"Additional Metadata attributes for the location.","nullable":true},"costCenter":{"$ref":"#/components/schemas/CostCenter"},"id":{"type":"integer","description":"The identifier of the company location.","format":"int32"},"name":{"maxLength":100,"minLength":0,"type":"string","description":"The name of the company location."},"type":{"$ref":"#/components/schemas/LocationType"},"self":{"$ref":"#/components/schemas/ResourceLink"}},"additionalProperties":false},"Address":{"required":["id","self"],"type":"object","properties":{"line1":{"maxLength":100,"minLength":0,"type":"string","description":"First line of the address. e.g. company name or P.O. box.","nullable":true},"street":{"maxLength":100,"minLength":0,"type":"string","description":"The street name of the address.","nullable":true},"number":{"maxLength":30,"minLength":0,"type":"string","description":"The alphanumeric house number in the street.","nullable":true},"addition":{"maxLength":1500,"minLength":0,"type":"string","description":"Addition to the address (line 3) to provide further information for delivery.","nullable":true},"city":{"maxLength":100,"minLength":0,"type":"string","description":"The city name of the address.","nullable":true},"postalCode":{"maxLength":30,"minLength":0,"type":"string","description":"The alphanumeric postal code or zip of the address.","nullable":true},"countryCode":{"maxLength":2,"minLength":0,"type":"string","description":"ISO-3166-1 code of the country.","nullable":true},"regionCode":{"maxLength":10,"minLength":0,"type":"string","description":"ISO-3166-2 code of the region / administrative area. Required e.g. in USA, Canada, Australia or Italy.","nullable":true},"regionName":{"maxLength":100,"minLength":0,"type":"string","description":"Name of the region / administrative area (if no ISO code is given/existing).","nullable":true},"dependentLocality":{"maxLength":200,"minLength":0,"type":"string","description":"A dependent locality is an address element that distinguishes a premise when an address thoroughfare appears more than once in the same post town. PAF holds details of approximately 30,000 localities within the UK.","nullable":true},"phoneNumber":{"maxLength":50,"minLength":0,"type":"string","description":"Phone number of the address. Used primarily for delivery purposes.","nullable":true},"id":{"type":"integer","description":"The id to identify the address in the system.","format":"int64"},"self":{"$ref":"#/components/schemas/ResourceLink"}},"additionalProperties":false,"description":"Postal address for the shipment of goods or invoices."},"ResourceLink":{"required":["href"],"type":"object","properties":{"href":{"minLength":1,"type":"string","description":"The target resource URI."},"method":{"type":"string","description":"The HTTP method to use for the request.","nullable":true}},"additionalProperties":false},"LocationManger":{"required":["id","self","username"],"type":"object","properties":{"managerPolicy":{"type":"string","nullable":true},"id":{"type":"integer","description":"The identifier of the employee.","format":"int32"},"firstName":{"maxLength":100,"minLength":0,"type":"string","description":"The first/given name of the employee.","nullable":true},"lastName":{"maxLength":100,"minLength":0,"type":"string","description":"The last/family name of the employee.","nullable":true},"fullName":{"maxLength":150,"minLength":0,"type":"string","description":"Combination of last and firstname","nullable":true,"readOnly":true},"email":{"maxLength":100,"minLength":0,"type":"string","description":"The contact and login mail address.","nullable":true},"username":{"maxLength":100,"minLength":0,"pattern":"^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*\\.[a-zA-Z]{2,}$","type":"string","description":"The username to log in to the app. The value has to be an e-mail address."},"costCenter":{"maxLength":100,"minLength":0,"type":"string","description":"The cost center of the employee.","nullable":true},"costCenterId":{"type":"integer","description":"The identifier of the cost center.","format":"int32","nullable":true},"self":{"$ref":"#/components/schemas/ResourceLink"}},"additionalProperties":false},"MetadataItem":{"required":["key","self"],"type":"object","properties":{"value":{"maxLength":500,"minLength":0,"type":"string","description":"Metadata value","nullable":true},"scope":{"type":"string","description":"Metadata scope. Can be Customer or Supplier to indicate the metadata is specific to a customer or supplier.","nullable":true},"key":{"maxLength":150,"minLength":0,"type":"string","description":"Metadata key used as a unique identifier for the metadata item."},"self":{"$ref":"#/components/schemas/ResourceLink"}},"additionalProperties":false},"CostCenter":{"required":["self"],"type":"object","properties":{"description":{"type":"string","nullable":true},"id":{"type":"integer","format":"int32"},"code":{"type":"string","nullable":true},"self":{"$ref":"#/components/schemas/ResourceLink"}},"additionalProperties":false},"LocationType":{"enum":["location","warehouse","remoteWork"],"type":"string","description":"The type of location."},"ErrorResponse":{"type":"object","properties":{"errorCode":{"type":"string","nullable":true},"errorDescription":{"type":"string","nullable":true},"data":{"nullable":true}},"additionalProperties":false}}},"paths":{"/v1/sales/customers/{customerId}/locations":{"post":{"tags":["Sales | Customer Locations"],"summary":"Create a location for a customer","description":"The location will be related to the customer given in the url parameter. \n\nYou can only create locations for customers of your provider entity. \n\nCreating an office location will also create a warehouse location with the same name and address. \n\nIf you have activated \"system products/services\" for your provider tenant, an instance of the \"Site Management\" system service will be added to the customer's approval cart. \n","parameters":[{"name":"customerId","in":"path","description":"The identifier of the customer which owns the location.","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"The location to be created for the customer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationCreateModel"}}}},"responses":{"201":{"description":"Created: The created location.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Location"}}}},"400":{"description":"Bad request: See response message for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized: Invalid api key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden: Resource access denied or resource does not exist anymore.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Retrieve a single location by its id

> The requested location must be related to the customer given in the url parameter otherwise it can not be found.\
> \
> You can only access locations of customers of your provider entity.

```json
{"openapi":"3.0.4","info":{"title":"Equipme Supplier API","version":"v1"},"tags":[{"name":"Sales | Customer Locations"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"Required for authorization in every request. You can request an API-Key for your tenant in the integrations section of the equipme App.","name":"X-API-KEY","in":"header"}},"schemas":{"Location":{"required":["id","name","self","type"],"type":"object","properties":{"created":{"type":"string","description":"The date and time the data record was created.","format":"date-time"},"address":{"$ref":"#/components/schemas/Address"},"managers":{"type":"array","items":{"$ref":"#/components/schemas/LocationManger"},"description":"Current location managers.","nullable":true},"metadataItems":{"type":"array","items":{"$ref":"#/components/schemas/MetadataItem"},"description":"Additional Metadata attributes for the location.","nullable":true},"costCenter":{"$ref":"#/components/schemas/CostCenter"},"id":{"type":"integer","description":"The identifier of the company location.","format":"int32"},"name":{"maxLength":100,"minLength":0,"type":"string","description":"The name of the company location."},"type":{"$ref":"#/components/schemas/LocationType"},"self":{"$ref":"#/components/schemas/ResourceLink"}},"additionalProperties":false},"Address":{"required":["id","self"],"type":"object","properties":{"line1":{"maxLength":100,"minLength":0,"type":"string","description":"First line of the address. e.g. company name or P.O. box.","nullable":true},"street":{"maxLength":100,"minLength":0,"type":"string","description":"The street name of the address.","nullable":true},"number":{"maxLength":30,"minLength":0,"type":"string","description":"The alphanumeric house number in the street.","nullable":true},"addition":{"maxLength":1500,"minLength":0,"type":"string","description":"Addition to the address (line 3) to provide further information for delivery.","nullable":true},"city":{"maxLength":100,"minLength":0,"type":"string","description":"The city name of the address.","nullable":true},"postalCode":{"maxLength":30,"minLength":0,"type":"string","description":"The alphanumeric postal code or zip of the address.","nullable":true},"countryCode":{"maxLength":2,"minLength":0,"type":"string","description":"ISO-3166-1 code of the country.","nullable":true},"regionCode":{"maxLength":10,"minLength":0,"type":"string","description":"ISO-3166-2 code of the region / administrative area. Required e.g. in USA, Canada, Australia or Italy.","nullable":true},"regionName":{"maxLength":100,"minLength":0,"type":"string","description":"Name of the region / administrative area (if no ISO code is given/existing).","nullable":true},"dependentLocality":{"maxLength":200,"minLength":0,"type":"string","description":"A dependent locality is an address element that distinguishes a premise when an address thoroughfare appears more than once in the same post town. PAF holds details of approximately 30,000 localities within the UK.","nullable":true},"phoneNumber":{"maxLength":50,"minLength":0,"type":"string","description":"Phone number of the address. Used primarily for delivery purposes.","nullable":true},"id":{"type":"integer","description":"The id to identify the address in the system.","format":"int64"},"self":{"$ref":"#/components/schemas/ResourceLink"}},"additionalProperties":false,"description":"Postal address for the shipment of goods or invoices."},"ResourceLink":{"required":["href"],"type":"object","properties":{"href":{"minLength":1,"type":"string","description":"The target resource URI."},"method":{"type":"string","description":"The HTTP method to use for the request.","nullable":true}},"additionalProperties":false},"LocationManger":{"required":["id","self","username"],"type":"object","properties":{"managerPolicy":{"type":"string","nullable":true},"id":{"type":"integer","description":"The identifier of the employee.","format":"int32"},"firstName":{"maxLength":100,"minLength":0,"type":"string","description":"The first/given name of the employee.","nullable":true},"lastName":{"maxLength":100,"minLength":0,"type":"string","description":"The last/family name of the employee.","nullable":true},"fullName":{"maxLength":150,"minLength":0,"type":"string","description":"Combination of last and firstname","nullable":true,"readOnly":true},"email":{"maxLength":100,"minLength":0,"type":"string","description":"The contact and login mail address.","nullable":true},"username":{"maxLength":100,"minLength":0,"pattern":"^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*\\.[a-zA-Z]{2,}$","type":"string","description":"The username to log in to the app. The value has to be an e-mail address."},"costCenter":{"maxLength":100,"minLength":0,"type":"string","description":"The cost center of the employee.","nullable":true},"costCenterId":{"type":"integer","description":"The identifier of the cost center.","format":"int32","nullable":true},"self":{"$ref":"#/components/schemas/ResourceLink"}},"additionalProperties":false},"MetadataItem":{"required":["key","self"],"type":"object","properties":{"value":{"maxLength":500,"minLength":0,"type":"string","description":"Metadata value","nullable":true},"scope":{"type":"string","description":"Metadata scope. Can be Customer or Supplier to indicate the metadata is specific to a customer or supplier.","nullable":true},"key":{"maxLength":150,"minLength":0,"type":"string","description":"Metadata key used as a unique identifier for the metadata item."},"self":{"$ref":"#/components/schemas/ResourceLink"}},"additionalProperties":false},"CostCenter":{"required":["self"],"type":"object","properties":{"description":{"type":"string","nullable":true},"id":{"type":"integer","format":"int32"},"code":{"type":"string","nullable":true},"self":{"$ref":"#/components/schemas/ResourceLink"}},"additionalProperties":false},"LocationType":{"enum":["location","warehouse","remoteWork"],"type":"string","description":"The type of location."},"ErrorResponse":{"type":"object","properties":{"errorCode":{"type":"string","nullable":true},"errorDescription":{"type":"string","nullable":true},"data":{"nullable":true}},"additionalProperties":false}}},"paths":{"/v1/sales/customers/{customerId}/locations/{locationId}":{"get":{"tags":["Sales | Customer Locations"],"summary":"Retrieve a single location by its id","description":"The requested location must be related to the customer given in the url parameter otherwise it can not be found.\n\nYou can only access locations of customers of your provider entity.","parameters":[{"name":"customerId","in":"path","description":"The identifier of the customer which owns the location.","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"locationId","in":"path","description":"The identifier of the location.","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK: The requested location.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Location"}}}},"400":{"description":"Bad request: See response message for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized: Invalid api key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden: Resource access denied or resource does not exist anymore.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"NotFound: Requested resource could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Update an existing location (deprecated - please use the PATCH route instead)

> Overwrites all existing data with that from the request body.

```json
{"openapi":"3.0.4","info":{"title":"Equipme Supplier API","version":"v1"},"tags":[{"name":"Sales | Customer Locations"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"Required for authorization in every request. You can request an API-Key for your tenant in the integrations section of the equipme App.","name":"X-API-KEY","in":"header"}},"schemas":{"LocationPatch":{"required":["name"],"type":"object","properties":{"name":{"maxLength":100,"minLength":0,"type":"string","description":"The name of the location."},"address":{"$ref":"#/components/schemas/AddressPatchModel"},"managers":{"type":"array","items":{"$ref":"#/components/schemas/LocationManagerPatchModel"},"description":"The location managers.","nullable":true},"addressId":{"type":"integer","format":"int32","nullable":true},"costCenterId":{"type":"integer","description":"Location Cost Center","format":"int32","nullable":true}},"additionalProperties":false},"AddressPatchModel":{"required":["city","countryCode"],"type":"object","properties":{"line1":{"maxLength":100,"minLength":0,"type":"string","description":"First line of the address. e.g. company name or P.O. box.","nullable":true},"street":{"maxLength":100,"minLength":0,"type":"string","description":"The street name of the address.","nullable":true},"number":{"maxLength":30,"minLength":0,"type":"string","description":"The alphanumeric house number in the street.","nullable":true},"addition":{"maxLength":1500,"minLength":0,"type":"string","description":"Addition to the address (line 3) to provide further information for delivery.","nullable":true},"city":{"maxLength":100,"minLength":0,"type":"string","description":"The city name of the address."},"postalCode":{"maxLength":30,"minLength":0,"type":"string","description":"The alphanumeric postal code or zip of the address.","nullable":true},"countryCode":{"maxLength":2,"minLength":0,"type":"string","description":"ISO-3166-1 code of the country."},"regionCode":{"maxLength":10,"minLength":0,"type":"string","description":"ISO-3166-2 code of the region / administrative area. Required e.g. in USA, Canada, Australia or Italy.","nullable":true},"regionName":{"maxLength":100,"minLength":0,"type":"string","description":"Name of the region / administrative area (if no ISO code is given/existing).","nullable":true},"dependentLocality":{"maxLength":200,"minLength":0,"type":"string","description":"A dependent locality is an address element that distinguishes a premise when an address thoroughfare appears more than once in the same post town. PAF holds details of approximately 30,000 localities within the UK.","nullable":true},"phoneNumber":{"maxLength":50,"minLength":0,"type":"string","description":"Phone number of the address. Used primarily for delivery purposes.","nullable":true}},"additionalProperties":false},"LocationManagerPatchModel":{"required":["employeeId","role"],"type":"object","properties":{"employeeId":{"type":"integer","description":"The identifier of the user who is the manager of the location.","format":"int32"},"role":{"minLength":1,"type":"string","description":"The role of the manager at the location. Can be either 'location-manager' or 'location-executive'."}},"additionalProperties":false},"ErrorResponse":{"type":"object","properties":{"errorCode":{"type":"string","nullable":true},"errorDescription":{"type":"string","nullable":true},"data":{"nullable":true}},"additionalProperties":false}}},"paths":{"/v1/sales/customers/{customerId}/locations/{locationId}":{"put":{"tags":["Sales | Customer Locations"],"summary":"Update an existing location (deprecated - please use the PATCH route instead)","description":"Overwrites all existing data with that from the request body.","parameters":[{"name":"customerId","in":"path","description":"The identifier of the customer which owns the location.","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"locationId","in":"path","description":"The identifier of the location to be updated.","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"The location data to process the updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationPatch"}}}},"responses":{"204":{"description":"NoContent: Request has succeeded."},"400":{"description":"Bad request: See response message for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized: Invalid api key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden: Resource access denied or resource does not exist anymore.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"NotFound: Requested resource could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"deprecated":true}}}}
```

## Delete a location

> Deletes the location entity with its instance in the approval cart.\
> \
> The delete operation can only be executed as long as the related system service instance is not ordered nor processed and there are no other relations depending on the location (e.g. employees).

```json
{"openapi":"3.0.4","info":{"title":"Equipme Supplier API","version":"v1"},"tags":[{"name":"Sales | Customer Locations"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"Required for authorization in every request. You can request an API-Key for your tenant in the integrations section of the equipme App.","name":"X-API-KEY","in":"header"}},"schemas":{"ErrorResponse":{"type":"object","properties":{"errorCode":{"type":"string","nullable":true},"errorDescription":{"type":"string","nullable":true},"data":{"nullable":true}},"additionalProperties":false}}},"paths":{"/v1/sales/customers/{customerId}/locations/{locationId}":{"delete":{"tags":["Sales | Customer Locations"],"summary":"Delete a location","description":"Deletes the location entity with its instance in the approval cart.\n\nThe delete operation can only be executed as long as the related system service instance is not ordered nor processed and there are no other relations depending on the location (e.g. employees).","parameters":[{"name":"customerId","in":"path","description":"The identifier of the customer which owns the location.","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"locationId","in":"path","description":"The identifier of the location to be deleted.","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"204":{"description":"NoContent: Request has succeeded."},"400":{"description":"Bad request: See response message for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized: Invalid api key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden: Resource access denied or resource does not exist anymore.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"NotFound: Requested resource could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict: The location has relations due to which the deletion operation cannot be executed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## PATCH /v1/sales/customers/{customerId}/locations/{locationId}

>

```json
{"openapi":"3.0.4","info":{"title":"Equipme Supplier API","version":"v1"},"tags":[{"name":"Sales | Customer Locations"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"Required for authorization in every request. You can request an API-Key for your tenant in the integrations section of the equipme App.","name":"X-API-KEY","in":"header"}},"schemas":{"Operation":{"type":"object","properties":{"value":{"nullable":true},"path":{"type":"string","nullable":true},"op":{"type":"string","nullable":true},"from":{"type":"string","nullable":true}},"additionalProperties":false},"ErrorResponse":{"type":"object","properties":{"errorCode":{"type":"string","nullable":true},"errorDescription":{"type":"string","nullable":true},"data":{"nullable":true}},"additionalProperties":false}}},"paths":{"/v1/sales/customers/{customerId}/locations/{locationId}":{"patch":{"tags":["Sales | Customer Locations"],"parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"locationId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"updateInstancesCostCenter","in":"query","schema":{"type":"boolean","default":true}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Operation"}}}}},"responses":{"204":{"description":"No Content"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## GET /v1/sales/customers/{customerId}/locations/{locationId}/metadata

> Get all metadata entries for a location

```json
{"openapi":"3.0.4","info":{"title":"Equipme Supplier API","version":"v1"},"tags":[{"name":"Sales | Customer Locations"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"Required for authorization in every request. You can request an API-Key for your tenant in the integrations section of the equipme App.","name":"X-API-KEY","in":"header"}},"schemas":{"MetadataList":{"required":["items","self","total"],"type":"object","properties":{"previous":{"$ref":"#/components/schemas/ResourceLink"},"next":{"$ref":"#/components/schemas/ResourceLink"},"items":{"type":"array","items":{"$ref":"#/components/schemas/MetadataItem"},"description":"The list of result items."},"total":{"type":"integer","description":"The total number of items.","format":"int32"},"self":{"$ref":"#/components/schemas/ResourceLink"}},"additionalProperties":false},"ResourceLink":{"required":["href"],"type":"object","properties":{"href":{"minLength":1,"type":"string","description":"The target resource URI."},"method":{"type":"string","description":"The HTTP method to use for the request.","nullable":true}},"additionalProperties":false},"MetadataItem":{"required":["key","self"],"type":"object","properties":{"value":{"maxLength":500,"minLength":0,"type":"string","description":"Metadata value","nullable":true},"scope":{"type":"string","description":"Metadata scope. Can be Customer or Supplier to indicate the metadata is specific to a customer or supplier.","nullable":true},"key":{"maxLength":150,"minLength":0,"type":"string","description":"Metadata key used as a unique identifier for the metadata item."},"self":{"$ref":"#/components/schemas/ResourceLink"}},"additionalProperties":false},"ErrorResponse":{"type":"object","properties":{"errorCode":{"type":"string","nullable":true},"errorDescription":{"type":"string","nullable":true},"data":{"nullable":true}},"additionalProperties":false}}},"paths":{"/v1/sales/customers/{customerId}/locations/{locationId}/metadata":{"get":{"tags":["Sales | Customer Locations"],"summary":"Get all metadata entries for a location","parameters":[{"name":"customerId","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"locationId","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Ok"},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetadataList"}}}},"400":{"description":"Bad request: See response message for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized: Invalid api key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden: Resource access denied or resource does not exist anymore.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"NotFound: Requested resource could not be found."}}}}}}
```

## POST /v1/sales/customers/{customerId}/locations/{locationId}/metadata

> Create a metadata entry for a location

```json
{"openapi":"3.0.4","info":{"title":"Equipme Supplier API","version":"v1"},"tags":[{"name":"Sales | Customer Locations"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"Required for authorization in every request. You can request an API-Key for your tenant in the integrations section of the equipme App.","name":"X-API-KEY","in":"header"}},"schemas":{"MetadataItemCreateModel":{"type":"object","properties":{"key":{"maxLength":150,"type":"string","description":"Key for the new metadata entry","nullable":true},"value":{"maxLength":500,"type":"string","description":"Metadata value","nullable":true}},"additionalProperties":false,"description":"DTO for creating a new metadata entry for a given resource which implements the logic"},"MetadataItem":{"required":["key","self"],"type":"object","properties":{"value":{"maxLength":500,"minLength":0,"type":"string","description":"Metadata value","nullable":true},"scope":{"type":"string","description":"Metadata scope. Can be Customer or Supplier to indicate the metadata is specific to a customer or supplier.","nullable":true},"key":{"maxLength":150,"minLength":0,"type":"string","description":"Metadata key used as a unique identifier for the metadata item."},"self":{"$ref":"#/components/schemas/ResourceLink"}},"additionalProperties":false},"ResourceLink":{"required":["href"],"type":"object","properties":{"href":{"minLength":1,"type":"string","description":"The target resource URI."},"method":{"type":"string","description":"The HTTP method to use for the request.","nullable":true}},"additionalProperties":false},"ErrorResponse":{"type":"object","properties":{"errorCode":{"type":"string","nullable":true},"errorDescription":{"type":"string","nullable":true},"data":{"nullable":true}},"additionalProperties":false}}},"paths":{"/v1/sales/customers/{customerId}/locations/{locationId}/metadata":{"post":{"tags":["Sales | Customer Locations"],"summary":"Create a metadata entry for a location","parameters":[{"name":"customerId","in":"path","description":"The identifier of the customer which owns the group.","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"locationId","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"The metadata entry to be created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetadataItemCreateModel"}}}},"responses":{"201":{"description":"Created: The created metadata entry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetadataItem"}}}},"400":{"description":"Bad request: See response message for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized: Invalid api key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden: Resource access denied or resource does not exist anymore.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"NotFound: Requested resource could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## GET /v1/sales/customers/{customerId}/locations/{locationId}/metadata/{key}

> Get a metadata entry for a location

```json
{"openapi":"3.0.4","info":{"title":"Equipme Supplier API","version":"v1"},"tags":[{"name":"Sales | Customer Locations"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"Required for authorization in every request. You can request an API-Key for your tenant in the integrations section of the equipme App.","name":"X-API-KEY","in":"header"}},"schemas":{"MetadataItem":{"required":["key","self"],"type":"object","properties":{"value":{"maxLength":500,"minLength":0,"type":"string","description":"Metadata value","nullable":true},"scope":{"type":"string","description":"Metadata scope. Can be Customer or Supplier to indicate the metadata is specific to a customer or supplier.","nullable":true},"key":{"maxLength":150,"minLength":0,"type":"string","description":"Metadata key used as a unique identifier for the metadata item."},"self":{"$ref":"#/components/schemas/ResourceLink"}},"additionalProperties":false},"ResourceLink":{"required":["href"],"type":"object","properties":{"href":{"minLength":1,"type":"string","description":"The target resource URI."},"method":{"type":"string","description":"The HTTP method to use for the request.","nullable":true}},"additionalProperties":false},"ErrorResponse":{"type":"object","properties":{"errorCode":{"type":"string","nullable":true},"errorDescription":{"type":"string","nullable":true},"data":{"nullable":true}},"additionalProperties":false}}},"paths":{"/v1/sales/customers/{customerId}/locations/{locationId}/metadata/{key}":{"get":{"tags":["Sales | Customer Locations"],"summary":"Get a metadata entry for a location","parameters":[{"name":"customerId","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"locationId","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"key","in":"path","description":"","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetadataItem"}}}},"400":{"description":"Bad request: See response message for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized: Invalid api key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden: Resource access denied or resource does not exist anymore.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"NotFound: Requested resource could not be found."}}}}}}
```

## DELETE /v1/sales/customers/{customerId}/locations/{locationId}/metadata/{key}

> Delete a metadata entry for a location

```json
{"openapi":"3.0.4","info":{"title":"Equipme Supplier API","version":"v1"},"tags":[{"name":"Sales | Customer Locations"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"Required for authorization in every request. You can request an API-Key for your tenant in the integrations section of the equipme App.","name":"X-API-KEY","in":"header"}},"schemas":{"ErrorResponse":{"type":"object","properties":{"errorCode":{"type":"string","nullable":true},"errorDescription":{"type":"string","nullable":true},"data":{"nullable":true}},"additionalProperties":false}}},"paths":{"/v1/sales/customers/{customerId}/locations/{locationId}/metadata/{key}":{"delete":{"tags":["Sales | Customer Locations"],"summary":"Delete a metadata entry for a location","parameters":[{"name":"customerId","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"locationId","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"key","in":"path","description":"","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"NoContent"},"400":{"description":"Bad request: See response message for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized: Invalid api key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden: Resource access denied or resource does not exist anymore.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"NotFound: Requested resource could not be found."}}}}}}
```

## POST /v1/sales/customers/{customerId}/locations/search

> Search for specific locations based on metadata key and value. Multiple keys can be provided.

```json
{"openapi":"3.0.4","info":{"title":"Equipme Supplier API","version":"v1"},"tags":[{"name":"Sales | Customer Locations"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"Required for authorization in every request. You can request an API-Key for your tenant in the integrations section of the equipme App.","name":"X-API-KEY","in":"header"}},"schemas":{"LocationSearchParameters":{"type":"object","properties":{"metadataScope":{"$ref":"#/components/schemas/MetadataScope"},"metaDataFilter":{"type":"array","items":{"$ref":"#/components/schemas/MetadataItem"},"description":"Search for locations based by metadata key and value.","nullable":true}},"additionalProperties":false},"MetadataScope":{"enum":["Supplier","Customer","Shared"],"type":"string"},"MetadataItem":{"required":["key","self"],"type":"object","properties":{"value":{"maxLength":500,"minLength":0,"type":"string","description":"Metadata value","nullable":true},"scope":{"type":"string","description":"Metadata scope. Can be Customer or Supplier to indicate the metadata is specific to a customer or supplier.","nullable":true},"key":{"maxLength":150,"minLength":0,"type":"string","description":"Metadata key used as a unique identifier for the metadata item."},"self":{"$ref":"#/components/schemas/ResourceLink"}},"additionalProperties":false},"ResourceLink":{"required":["href"],"type":"object","properties":{"href":{"minLength":1,"type":"string","description":"The target resource URI."},"method":{"type":"string","description":"The HTTP method to use for the request.","nullable":true}},"additionalProperties":false},"LocationList":{"required":["items","self","total"],"type":"object","properties":{"previous":{"$ref":"#/components/schemas/ResourceLink"},"next":{"$ref":"#/components/schemas/ResourceLink"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Location"},"description":"The list of result items."},"total":{"type":"integer","description":"The total number of items.","format":"int32"},"self":{"$ref":"#/components/schemas/ResourceLink"}},"additionalProperties":false},"Location":{"required":["id","name","self","type"],"type":"object","properties":{"created":{"type":"string","description":"The date and time the data record was created.","format":"date-time"},"address":{"$ref":"#/components/schemas/Address"},"managers":{"type":"array","items":{"$ref":"#/components/schemas/LocationManger"},"description":"Current location managers.","nullable":true},"metadataItems":{"type":"array","items":{"$ref":"#/components/schemas/MetadataItem"},"description":"Additional Metadata attributes for the location.","nullable":true},"costCenter":{"$ref":"#/components/schemas/CostCenter"},"id":{"type":"integer","description":"The identifier of the company location.","format":"int32"},"name":{"maxLength":100,"minLength":0,"type":"string","description":"The name of the company location."},"type":{"$ref":"#/components/schemas/LocationType"},"self":{"$ref":"#/components/schemas/ResourceLink"}},"additionalProperties":false},"Address":{"required":["id","self"],"type":"object","properties":{"line1":{"maxLength":100,"minLength":0,"type":"string","description":"First line of the address. e.g. company name or P.O. box.","nullable":true},"street":{"maxLength":100,"minLength":0,"type":"string","description":"The street name of the address.","nullable":true},"number":{"maxLength":30,"minLength":0,"type":"string","description":"The alphanumeric house number in the street.","nullable":true},"addition":{"maxLength":1500,"minLength":0,"type":"string","description":"Addition to the address (line 3) to provide further information for delivery.","nullable":true},"city":{"maxLength":100,"minLength":0,"type":"string","description":"The city name of the address.","nullable":true},"postalCode":{"maxLength":30,"minLength":0,"type":"string","description":"The alphanumeric postal code or zip of the address.","nullable":true},"countryCode":{"maxLength":2,"minLength":0,"type":"string","description":"ISO-3166-1 code of the country.","nullable":true},"regionCode":{"maxLength":10,"minLength":0,"type":"string","description":"ISO-3166-2 code of the region / administrative area. Required e.g. in USA, Canada, Australia or Italy.","nullable":true},"regionName":{"maxLength":100,"minLength":0,"type":"string","description":"Name of the region / administrative area (if no ISO code is given/existing).","nullable":true},"dependentLocality":{"maxLength":200,"minLength":0,"type":"string","description":"A dependent locality is an address element that distinguishes a premise when an address thoroughfare appears more than once in the same post town. PAF holds details of approximately 30,000 localities within the UK.","nullable":true},"phoneNumber":{"maxLength":50,"minLength":0,"type":"string","description":"Phone number of the address. Used primarily for delivery purposes.","nullable":true},"id":{"type":"integer","description":"The id to identify the address in the system.","format":"int64"},"self":{"$ref":"#/components/schemas/ResourceLink"}},"additionalProperties":false,"description":"Postal address for the shipment of goods or invoices."},"LocationManger":{"required":["id","self","username"],"type":"object","properties":{"managerPolicy":{"type":"string","nullable":true},"id":{"type":"integer","description":"The identifier of the employee.","format":"int32"},"firstName":{"maxLength":100,"minLength":0,"type":"string","description":"The first/given name of the employee.","nullable":true},"lastName":{"maxLength":100,"minLength":0,"type":"string","description":"The last/family name of the employee.","nullable":true},"fullName":{"maxLength":150,"minLength":0,"type":"string","description":"Combination of last and firstname","nullable":true,"readOnly":true},"email":{"maxLength":100,"minLength":0,"type":"string","description":"The contact and login mail address.","nullable":true},"username":{"maxLength":100,"minLength":0,"pattern":"^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*\\.[a-zA-Z]{2,}$","type":"string","description":"The username to log in to the app. The value has to be an e-mail address."},"costCenter":{"maxLength":100,"minLength":0,"type":"string","description":"The cost center of the employee.","nullable":true},"costCenterId":{"type":"integer","description":"The identifier of the cost center.","format":"int32","nullable":true},"self":{"$ref":"#/components/schemas/ResourceLink"}},"additionalProperties":false},"CostCenter":{"required":["self"],"type":"object","properties":{"description":{"type":"string","nullable":true},"id":{"type":"integer","format":"int32"},"code":{"type":"string","nullable":true},"self":{"$ref":"#/components/schemas/ResourceLink"}},"additionalProperties":false},"LocationType":{"enum":["location","warehouse","remoteWork"],"type":"string","description":"The type of location."},"ErrorResponse":{"type":"object","properties":{"errorCode":{"type":"string","nullable":true},"errorDescription":{"type":"string","nullable":true},"data":{"nullable":true}},"additionalProperties":false}}},"paths":{"/v1/sales/customers/{customerId}/locations/search":{"post":{"tags":["Sales | Customer Locations"],"summary":"Search for specific locations based on metadata key and value. Multiple keys can be provided.","parameters":[{"name":"customerId","in":"path","description":"Customer data scope","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"Search parameter. Currently, ony supports metadata search parameter.","content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/LocationSearchParameters"}},"application/json":{"schema":{"$ref":"#/components/schemas/LocationSearchParameters"}},"text/json":{"schema":{"$ref":"#/components/schemas/LocationSearchParameters"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/LocationSearchParameters"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationList"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://hub.equipme.io/development/api-reference-pro/sales-or-customer-locations.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.
