--- title: "Los anlegen" slug: "datenaustausch-connect-api-bsp-pm-los-anlegen" updated: 2026-12-01T09:03:53Z published: 2026-12-01T09:03:53Z 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. # Los anlegen > [!CAUTION] > 🚧 **In Arbeit** > > Diese Dokumentation befindet sich im Aufbau und wird laufend erweitert. > > Nutzen Sie bis dahin bitte das [HOMAG Connect Portal](https://connect.homag.cloud/) und die zugehörigen [GitHub-Repositories](https://github.com/HomagGroup/HOMAG-Connect) als primäre Referenz. Einzelne Seiten können unvollständig sein oder sich ohne Ankündigung ändern. **Zweck:** Zwei bereits importierte Teile zu einem Fertigungslos zusammenfassen und die Los-ID für die weitere Planung übernehmen. **Voraussetzungen:** productionManager mit Connect-Schnittstelle, [ProductionManagerClient eingerichtet](/docs/datenaustausch-connect-api-bsp-productionmanager) und echte, noch nicht vollständig eingeplante Teile-IDs aus den [Auftragsdetails](/docs/datenaustausch-connect-api-bsp-pm-auftrag-lesen). Die Beispiel-IDs und Termine vor dem Aufruf ersetzen. ## 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" } ``` Speichern Sie die zurückgegebene `lotId`. Damit können Sie später die [Losdetails abrufen](https://connect.homag.cloud/productionmanager/#v1/tag/b02-managing-lots/GET/api/productionManager/lots/{id}). ## Verwendete Contracts | Contract | Verwendung | | --- | --- | | [`CreateLotRequest`](/docs/datenaustausch-connect-api-ct-productionmanager-lots-createlotrequest) | Eingabe: Name, Termine und Teile-IDs. | | [`CreateLotResponse`](/docs/datenaustausch-connect-api-ct-productionmanager-lots-createlotresponse) | Ausgabe: ID des angelegten Loses. | ## Typische Fehler | REST-Status | Was ist zu prüfen? | | --- | --- | | `422 Unprocessable Entity` | `partIds` müssen IDs von Teilen enthalten, keine Auftrags- oder Positionsnummern. Prüfen Sie auch, ob Teile schon vollständig eingeplant sind. | | `401 Unauthorized` | SubscriptionId, Berechtigungsschlüssel und App-Freigabe prüfen. | **Weiter:** [Lose bilden: Auswahl und Gruppierung](/docs/datenaustausch-connect-api-uc-pm-lose) · [Endpunkt ansehen und testen](https://connect.homag.cloud/productionmanager/#v1/tag/b02-managing-lots/POST/api/productionManager/lots)