--- title: "Create a lot" slug: "datenaustausch-connect-api-bsp-pm-los-anlegen" updated: 2026-12-02T10:11:19Z published: 2026-12-02T10:11:19Z canonical: "docs.homag.cloud/datenaustausch-connect-api-bsp-pm-los-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 a lot **Purpose:** Combine two already imported parts into a production lot and use the lot ID for further planning. **Prerequisites:** productionManager with the Connect interface, [ProductionManagerClient configured](/docs/de/datenaustausch-connect-api-bsp-productionmanager), and real part IDs from the [order details](/docs/en/datenaustausch-connect-api-bsp-pm-auftrag-lesen) that have not yet been fully scheduled. Replace the sample IDs and dates before making the call. ## Code **C#** ```csharp using HomagConnect.ProductionManager.Contracts.Lots; var lot = await client.CreateLotRequest(new CreateLotRequest {    Name = "LOT-4711",    StartDatePlanned = new DateTimeOffset(2027, 6, 14, 6, 0, 0, TimeSpan.Zero),    CompletionDatePlanned = new DateTimeOffset(2027, 6, 14, 14, 0, 0, TimeSpan.Zero),    PartIds = new[] { "10706261", "10706263" } }); Console.WriteLine(lot.LotId); ``` **REST** ```http POST https://connect.homag.cloud/api/productionManager/lots Authorization: Basic Accept: application/json Content-Type: application/json {  "name": "LOT-4711",  "startDatePlanned": "2027-06-14T06:00:00Z",  "completionDatePlanned": "2027-06-14T14:00:00Z",  "partIds": ["10706261", "10706263"] } ``` `200 OK`: ```json {  "lotId": "f6fd8084-29d1-4bba-a4b2-3c9c8d2fd6b1" } ``` Save the returned `lotId`. You can use it later to [retrieve the lot details](https://connect.homag.cloud/productionmanager/#v1/tag/b02-managing-lots/GET/api/productionManager/lots/{id}). ## Contracts used | Contract | Usage | | --- | --- | | [`CreateLotRequest`](/docs/en/datenaustausch-connect-api-ct-productionmanager-lots-createlotrequest) | Input: name, dates, and part IDs. | | [`CreateLotResponse`](/docs/en/datenaustausch-connect-api-ct-productionmanager-lots-createlotresponse) | Output: ID of the created lot. | ## Common errors | REST status | What to check | | --- | --- | | `422 Unprocessable Entity` | `partIds` must contain part IDs, not order or line-item numbers. Also check whether the parts are already fully scheduled. | | `401 Unauthorized` | Check the SubscriptionId, authorization key, and app access. | **Next:** [Create lots: selection and grouping](/docs/de/datenaustausch-connect-api-uc-pm-lose) · [View and test endpoint](https://connect.homag.cloud/productionmanager/#v1/tag/b02-managing-lots/POST/api/productionManager/lots)