--- title: "Create customers" slug: "datenaustausch-connect-api-bsp-om-kunde-anlegen" updated: 2026-12-02T10:11:22Z published: 2026-12-02T10:11:22Z canonical: "docs.homag.cloud/datenaustausch-connect-api-bsp-om-kunde-anlegen" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.homag.cloud/llms.txt > Use this file to discover all available pages before exploring further. # Create customers **Purpose:** Create a customer from the ERP in orderManager and use the assigned customer number for future orders. **Prerequisites:** orderManager with the Connect interface and [OrderManagerClient configured](/docs/de/datenaustausch-connect-api-bsp-ordermanager). First, check in the ERP whether an orderManager customer number is already stored. ## Code **C#** ```csharp using HomagConnect.OrderManager.Contracts.Customers; var customer = await client.CreateCustomer(new CreateCustomerRequest {    CustomerNumberExternal = "ERP-C-10045",    CustomerName = "Musterkunde",    Email = "kunde@example.com",    Locale = Locale.deDE,    ApiAccess = false }); Console.WriteLine(customer.CustomerNumber); ``` **REST** ```http POST https://connect.homag.cloud/api/orderManager/customers Authorization: Basic Accept: application/json Content-Type: application/json {  "customerNumberExternal": "ERP-C-10045",  "customerName": "Musterkunde",  "email": "kunde@example.com",  "locale": "deDE",  "apiAccess": false } ``` `201 Created` (excerpt): ```json {  "customerNumber": "462642",  "customerNumberExternal": "ERP-C-10045",  "customerName": "Musterkunde" } ``` Save the returned `customerNumber` alongside your ERP customer number. Then use [Read customers](/docs/en/datenaustausch-connect-api-bsp-om-kunde-lesen) instead of creating the customer again. Do not blindly retry a failed write call after a timeout: first check whether the customer has already been created. ## Contracts used | Contract | Usage | | --- | --- | | [`CreateCustomerRequest`](/docs/en/datenaustausch-connect-api-ct-ordermanager-customers-createcustomerrequest) | Input: name, contact details, and external customer number. | | [`Customer`](/docs/en/datenaustausch-connect-api-ct-ordermanager-customers-customer) | Output: created customer, including the orderManager customer number. | ## Common errors | REST status | What to check | | --- | --- | | `400 Bad Request` | Send valid JSON with `Content-Type: application/json`. | | `422 Unprocessable Entity` | Check the fields and details in [`ProblemDetails`](/docs/en/datenaustausch-connect-api-ct-base-exceptions-problemdetails) before retrying the call. | **Next:** [Manage customers](/docs/de/datenaustausch-connect-api-uc-om-kunden) · [View and test endpoint](https://connect.homag.cloud/ordermanager/#v1/tag/homag-connect-ordermanager-orders/POST/api/orderManager/customers)