> 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-customers.md).

# Sales | Customers

## List your customers

> Retrieve a list of customers.\
> \
> You can only access customers of your provider entity.

```json
{"openapi":"3.0.4","info":{"title":"Equipme Supplier API","version":"v1"},"tags":[{"name":"Sales | Customers"}],"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":{"CustomerSortParameter":{"enum":["name"],"type":"string","description":"Parameters according to which a customer can be sorted."},"SortOrder":{"enum":["asc","desc"],"type":"string","description":"Order in which the result of a list request is sorted."},"CustomerList":{"required":["items","self","total"],"type":"object","properties":{"previous":{"$ref":"#/components/schemas/ResourceLink"},"next":{"$ref":"#/components/schemas/ResourceLink"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Customer"},"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},"Customer":{"required":["id","name","self"],"type":"object","properties":{"uuid":{"type":"string","description":"The identifier of the customer.","format":"uuid"},"description":{"type":"string","description":"The description of the customer.","nullable":true},"active":{"type":"boolean","description":"True if the customer is active, false otherwise."},"contactName":{"type":"string","description":"The name of the contact person at the customer.","nullable":true},"contactEmail":{"type":"string","description":"The email address of the contact person at the customer.","nullable":true},"contactPhone":{"type":"string","description":"The phone number of the contact person at the customer.","nullable":true},"customAttribute1":{"type":"string","description":"Value of the first custom attribute as defined in the settings","nullable":true},"customAttribute2":{"type":"string","description":"Value of the second custom attribute as defined in the settings","nullable":true},"customAttribute3":{"type":"string","description":"Value of the third custom attribute as defined in the settings","nullable":true},"accountManager":{"$ref":"#/components/schemas/EmployeeReference"},"language":{"$ref":"#/components/schemas/Language"},"companyAddress":{"$ref":"#/components/schemas/Address"},"referredBy":{"$ref":"#/components/schemas/CustomerReferral"},"id":{"type":"integer","description":"The identifier of the customer.","format":"int32"},"name":{"minLength":1,"type":"string","description":"The name of the customer."},"customerNumber":{"type":"string","description":"Optional identifier of the customer defined by the supplier.","nullable":true},"self":{"$ref":"#/components/schemas/ResourceLink"}},"additionalProperties":false},"EmployeeReference":{"required":["id","self","username"],"type":"object","properties":{"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},"Language":{"enum":["en","de","fr","it","pl","nb","nl","es"],"type":"string","description":"Language options for a customer or user interaction"},"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."},"CustomerReferral":{"type":"object","properties":{"referredOn":{"type":"string","description":"Date on which the customer relationship was established","format":"date-time"},"company":{"$ref":"#/components/schemas/CustomerReference"},"employee":{"$ref":"#/components/schemas/EmployeeReference"}},"additionalProperties":false,"description":"Contains references to the entities who referred the customer to your organization.\nFor managed customers the employee reference contains the user who created the customer entry.\nFor partner customers the company reference contains the partner which referred this customer."},"CustomerReference":{"required":["id","name","self"],"type":"object","properties":{"id":{"type":"integer","description":"The identifier of the customer.","format":"int32"},"name":{"minLength":1,"type":"string","description":"The name of the customer."},"customerNumber":{"type":"string","description":"Optional identifier of the customer defined by the supplier.","nullable":true},"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":{"get":{"tags":["Sales | Customers"],"summary":"List your customers","description":"Retrieve a list of customers.\n\nYou can only access customers of your provider entity.","parameters":[{"name":"active","in":"query","description":"If null, all customers are returned. True: only active | false: only inactive customers are returned.","schema":{"type":"boolean"}},{"name":"createdAfter","in":"query","description":"Filter the customers created after the specified date.","schema":{"type":"string","format":"date-time"}},{"name":"names","in":"query","description":"Filter the customers by one or multiple names","schema":{"type":"array","items":{"type":"string"}}},{"name":"customerNumbers","in":"query","description":"Filter the customers by one or multiple customer numbers","schema":{"type":"array","items":{"type":"string"}}},{"name":"sortBy","in":"query","description":"Sort the items by a given criterion.","schema":{"$ref":"#/components/schemas/CustomerSortParameter"}},{"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: A list of customers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerList"}}}},"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"}}}}}}}}}
```

## Create a customer

> You can only create customers for your provider entity. \
> \
> When a customer is created, an instance of the "Customer Account" system service is also always added to the customer's approval cart. \
> \
> Note: \`\`\`active\`\`\` customers are allowed to place orders.

````json
{"openapi":"3.0.4","info":{"title":"Equipme Supplier API","version":"v1"},"tags":[{"name":"Sales | Customers"}],"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":{"CustomerCreateModel":{"required":["name"],"type":"object","properties":{"name":{"maxLength":100,"minLength":0,"type":"string","description":"The name of the customer."},"customerNumber":{"maxLength":50,"minLength":0,"type":"string","description":"Optional identifier of the customer defined by the supplier.","nullable":true},"description":{"maxLength":500,"minLength":0,"type":"string","description":"The description of the customer.","nullable":true},"active":{"type":"boolean","description":"True if the customer is active and is allowed to place orders, false otherwise."},"customAttribute1":{"maxLength":100,"minLength":0,"type":"string","description":"Value of the first custom attribute as defined in the settings","nullable":true},"customAttribute2":{"maxLength":100,"minLength":0,"type":"string","description":"Value of the second custom attribute as defined in the settings","nullable":true},"customAttribute3":{"maxLength":100,"minLength":0,"type":"string","description":"Value of the third custom attribute as defined in the settings","nullable":true},"contactName":{"maxLength":200,"minLength":0,"type":"string","description":"The name of the contact person at the customer.","nullable":true},"contactEmail":{"maxLength":100,"minLength":0,"type":"string","description":"The mail of the contact person at the customer.","nullable":true},"contactPhone":{"maxLength":50,"minLength":0,"type":"string","description":"The phone number of the contact person at the customer.","nullable":true},"language":{"$ref":"#/components/schemas/Language"},"tenantPermissions":{"maxItems":50,"type":"array","items":{"$ref":"#/components/schemas/RoleAssignment"},"description":"Can be used to grant access for employees of your organization to the newly created customer.\n\nThis is intended for employees without automatic access privileges, as administrators inherently have access to all new customers.\nSo rather use this for your sales employees for example.\n\nYou can use the ```/organization/employees``` endpoint to retrieve the required employee IDs.\nNote: If you provide IDs that do not belong to your organization, the create operation will fail.\nThe role \"user\" is not allowed here.","nullable":true},"accountManager":{"type":"integer","description":"The id of the responsible sales person for the customer.\nThis employee receives planner access to the customer, when not specified otherwise through the tenant permissions.","format":"int32","nullable":true},"companyAddress":{"$ref":"#/components/schemas/AddressCreateModel"},"billingAddress":{"$ref":"#/components/schemas/AddressCreateModel"}},"additionalProperties":false},"Language":{"enum":["en","de","fr","it","pl","nb","nl","es"],"type":"string","description":"Language options for a customer or user interaction"},"RoleAssignment":{"required":["employeeId","role"],"type":"object","properties":{"employeeId":{"type":"integer","description":"The employee ID to assign the role to.","format":"int32"},"role":{"$ref":"#/components/schemas/UserRole"}},"additionalProperties":false,"description":"Assignment of a role to an employee for a customer."},"UserRole":{"enum":["administrator","planner","user"],"type":"string","description":"Roles available to be assigned to an employee as a user in Equipme. Options will be extended in the future."},"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},"Customer":{"required":["id","name","self"],"type":"object","properties":{"uuid":{"type":"string","description":"The identifier of the customer.","format":"uuid"},"description":{"type":"string","description":"The description of the customer.","nullable":true},"active":{"type":"boolean","description":"True if the customer is active, false otherwise."},"contactName":{"type":"string","description":"The name of the contact person at the customer.","nullable":true},"contactEmail":{"type":"string","description":"The email address of the contact person at the customer.","nullable":true},"contactPhone":{"type":"string","description":"The phone number of the contact person at the customer.","nullable":true},"customAttribute1":{"type":"string","description":"Value of the first custom attribute as defined in the settings","nullable":true},"customAttribute2":{"type":"string","description":"Value of the second custom attribute as defined in the settings","nullable":true},"customAttribute3":{"type":"string","description":"Value of the third custom attribute as defined in the settings","nullable":true},"accountManager":{"$ref":"#/components/schemas/EmployeeReference"},"language":{"$ref":"#/components/schemas/Language"},"companyAddress":{"$ref":"#/components/schemas/Address"},"referredBy":{"$ref":"#/components/schemas/CustomerReferral"},"id":{"type":"integer","description":"The identifier of the customer.","format":"int32"},"name":{"minLength":1,"type":"string","description":"The name of the customer."},"customerNumber":{"type":"string","description":"Optional identifier of the customer defined by the supplier.","nullable":true},"self":{"$ref":"#/components/schemas/ResourceLink"}},"additionalProperties":false},"EmployeeReference":{"required":["id","self","username"],"type":"object","properties":{"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},"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},"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."},"CustomerReferral":{"type":"object","properties":{"referredOn":{"type":"string","description":"Date on which the customer relationship was established","format":"date-time"},"company":{"$ref":"#/components/schemas/CustomerReference"},"employee":{"$ref":"#/components/schemas/EmployeeReference"}},"additionalProperties":false,"description":"Contains references to the entities who referred the customer to your organization.\nFor managed customers the employee reference contains the user who created the customer entry.\nFor partner customers the company reference contains the partner which referred this customer."},"CustomerReference":{"required":["id","name","self"],"type":"object","properties":{"id":{"type":"integer","description":"The identifier of the customer.","format":"int32"},"name":{"minLength":1,"type":"string","description":"The name of the customer."},"customerNumber":{"type":"string","description":"Optional identifier of the customer defined by the supplier.","nullable":true},"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":{"post":{"tags":["Sales | Customers"],"summary":"Create a customer","description":"You can only create customers for your provider entity. \n\nWhen a customer is created, an instance of the \"Customer Account\" system service is also always added to the customer's approval cart. \n\nNote: ```active``` customers are allowed to place orders.","requestBody":{"description":"The customer to be created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerCreateModel"}}}},"responses":{"201":{"description":"Created: The created customer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"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 customer by its id

> You can only access customers of your provider entity.

```json
{"openapi":"3.0.4","info":{"title":"Equipme Supplier API","version":"v1"},"tags":[{"name":"Sales | Customers"}],"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":{"Customer":{"required":["id","name","self"],"type":"object","properties":{"uuid":{"type":"string","description":"The identifier of the customer.","format":"uuid"},"description":{"type":"string","description":"The description of the customer.","nullable":true},"active":{"type":"boolean","description":"True if the customer is active, false otherwise."},"contactName":{"type":"string","description":"The name of the contact person at the customer.","nullable":true},"contactEmail":{"type":"string","description":"The email address of the contact person at the customer.","nullable":true},"contactPhone":{"type":"string","description":"The phone number of the contact person at the customer.","nullable":true},"customAttribute1":{"type":"string","description":"Value of the first custom attribute as defined in the settings","nullable":true},"customAttribute2":{"type":"string","description":"Value of the second custom attribute as defined in the settings","nullable":true},"customAttribute3":{"type":"string","description":"Value of the third custom attribute as defined in the settings","nullable":true},"accountManager":{"$ref":"#/components/schemas/EmployeeReference"},"language":{"$ref":"#/components/schemas/Language"},"companyAddress":{"$ref":"#/components/schemas/Address"},"referredBy":{"$ref":"#/components/schemas/CustomerReferral"},"id":{"type":"integer","description":"The identifier of the customer.","format":"int32"},"name":{"minLength":1,"type":"string","description":"The name of the customer."},"customerNumber":{"type":"string","description":"Optional identifier of the customer defined by the supplier.","nullable":true},"self":{"$ref":"#/components/schemas/ResourceLink"}},"additionalProperties":false},"EmployeeReference":{"required":["id","self","username"],"type":"object","properties":{"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},"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},"Language":{"enum":["en","de","fr","it","pl","nb","nl","es"],"type":"string","description":"Language options for a customer or user interaction"},"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."},"CustomerReferral":{"type":"object","properties":{"referredOn":{"type":"string","description":"Date on which the customer relationship was established","format":"date-time"},"company":{"$ref":"#/components/schemas/CustomerReference"},"employee":{"$ref":"#/components/schemas/EmployeeReference"}},"additionalProperties":false,"description":"Contains references to the entities who referred the customer to your organization.\nFor managed customers the employee reference contains the user who created the customer entry.\nFor partner customers the company reference contains the partner which referred this customer."},"CustomerReference":{"required":["id","name","self"],"type":"object","properties":{"id":{"type":"integer","description":"The identifier of the customer.","format":"int32"},"name":{"minLength":1,"type":"string","description":"The name of the customer."},"customerNumber":{"type":"string","description":"Optional identifier of the customer defined by the supplier.","nullable":true},"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}":{"get":{"tags":["Sales | Customers"],"summary":"Retrieve a single customer by its id","description":"You can only access customers of your provider entity.","parameters":[{"name":"customerId","in":"path","description":"The identifier of the customer.","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK: The requested customer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"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 customer (deprecated - please use the PATCH route instead)

> Overwrites all existing data with that from the request body.\
> \
> Note: \`\`\`active\`\`\` customers are allowed to place orders.

````json
{"openapi":"3.0.4","info":{"title":"Equipme Supplier API","version":"v1"},"tags":[{"name":"Sales | Customers"}],"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":{"CustomerUpdateModel":{"required":["name"],"type":"object","properties":{"name":{"maxLength":100,"minLength":0,"type":"string","description":"The name of the customer."},"customerNumber":{"maxLength":50,"minLength":0,"type":"string","description":"Optional identifier of the customer defined by the supplier.","nullable":true},"description":{"maxLength":500,"minLength":0,"type":"string","description":"The description of the customer.\nNote: Value null won't override the current value. You can provide an empty string to clear this field.","nullable":true},"active":{"type":"boolean","description":"True if the customer is active and is allowed to place orders, false otherwise."},"customAttribute1":{"maxLength":100,"minLength":0,"type":"string","description":"Value of the first custom attribute as defined in the settings\nNote: Value null won't override the current value. You can provide an empty string to clear this field.","nullable":true},"customAttribute2":{"maxLength":100,"minLength":0,"type":"string","description":"Value of the second custom attribute as defined in the settings\nNote: Value null won't override the current value. You can provide an empty string to clear this field.","nullable":true},"customAttribute3":{"maxLength":100,"minLength":0,"type":"string","description":"Value of the third custom attribute as defined in the settings\nNote: Value null won't override the current value. You can provide an empty string to clear this field.","nullable":true},"accountManagerId":{"type":"integer","description":"Id of the responsible sales person for the customer.\nOn update, this employee receives planner access to the customer.","format":"int32","nullable":true},"contactName":{"maxLength":200,"minLength":0,"type":"string","description":"The name of the contact person at the customer.","nullable":true},"contactEmail":{"maxLength":100,"minLength":0,"type":"string","description":"The email address of the contact person at the customer.","nullable":true},"contactPhone":{"maxLength":50,"minLength":0,"type":"string","description":"The phone number of the contact person at the customer.","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}":{"put":{"tags":["Sales | Customers"],"summary":"Update an existing customer (deprecated - please use the PATCH route instead)","description":"Overwrites all existing data with that from the request body.\n\nNote: ```active``` customers are allowed to place orders.","parameters":[{"name":"customerId","in":"path","description":"The identifier of the customer.","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"The customer data to process the updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUpdateModel"}}}},"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}}}}
````

## Partially updates an existing customer

> Please provide a valid JSON Patch document with the allowed fields to update. See example below for further details.

```json
{"openapi":"3.0.4","info":{"title":"Equipme Supplier API","version":"v1"},"tags":[{"name":"Sales | Customers"}],"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}":{"patch":{"tags":["Sales | Customers"],"summary":"Partially updates an existing customer","description":"Please provide a valid JSON Patch document with the allowed fields to update. See example below for further details.","parameters":[{"name":"customerId","in":"path","description":"The identifier of the customer.","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"Information of the customer to be updated.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Operation"}}}}},"responses":{"204":{"description":"NoContent: Customer successfully updated."},"400":{"description":"Bad request: Body validation failed. 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 all metadata items for a customer

> Retrieve all metadata items for a customer.\
> \
> Note: The metadata is not versioned.

```json
{"openapi":"3.0.4","info":{"title":"Equipme Supplier API","version":"v1"},"tags":[{"name":"Sales | Customers"}],"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}/metadata":{"get":{"tags":["Sales | Customers"],"summary":"Get all metadata items for a customer","description":"Retrieve all metadata items for a customer.\n\nNote: The metadata is not versioned.","parameters":[{"name":"customerId","in":"path","description":"The identifier of the customer.","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK: The requested metadata items.","content":{"application/json":{"schema":{"type":"array","items":{"$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"}}}}}}}}}
```

## Create metadata for a customer

> If the metadata key already exists, the value will be updated.\
> \
> Note: The metadata is not versioned.

```json
{"openapi":"3.0.4","info":{"title":"Equipme Supplier API","version":"v1"},"tags":[{"name":"Sales | Customers"}],"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}/metadata":{"post":{"tags":["Sales | Customers"],"summary":"Create metadata for a customer","description":"If the metadata key already exists, the value will be updated.\n\nNote: The metadata is not versioned.","parameters":[{"name":"customerId","in":"path","description":"The identifier of the customer.","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"The metadata 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":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Get metadata item for a customer

> Retrieve the metadata item for a customer.\
> \
> Note: The metadata is not versioned.

```json
{"openapi":"3.0.4","info":{"title":"Equipme Supplier API","version":"v1"},"tags":[{"name":"Sales | Customers"}],"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}/metadata/{key}":{"get":{"tags":["Sales | Customers"],"summary":"Get metadata item for a customer","description":"Retrieve the metadata item for a customer.\n\nNote: The metadata is not versioned.","parameters":[{"name":"customerId","in":"path","description":"The identifier of the customer.","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"key","in":"path","description":"The metadata key to be retrieved.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK: The requested metadata item.","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"}}}}}}}}}
```

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

> Delete a metadata item for a customer by key

```json
{"openapi":"3.0.4","info":{"title":"Equipme Supplier API","version":"v1"},"tags":[{"name":"Sales | Customers"}],"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}/metadata/{key}":{"delete":{"tags":["Sales | Customers"],"summary":"Delete a metadata item for a customer by key","parameters":[{"name":"customerId","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"key","in":"path","description":"","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":""},"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"}}}}}}}}}
```


---

# 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-customers.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.
