Read a production order

Prev Next

Purpose: Retrieve the status, number of parts, and production line items for a known order.

Prerequisites: productionManager with the Connect interface, ProductionManagerClient configured, and the productionManager order ID (id), not the order number.

Code

var orderId = Guid.Parse("1f5d1f4d-2ab9-487a-8a17-2d6fd84fe228");
var order = await client.GetOrder(orderId);

if (order is null)
{
    Console.WriteLine("Fertigungsauftrag nicht gefunden.");
}
else
{
    Console.WriteLine($"{order.OrderNumber}: {order.OrderStatus}, {order.QuantityOfParts} Teile");
}
GET https://connect.homag.cloud/api/productionManager/orders/1f5d1f4d-2ab9-487a-8a17-2d6fd84fe228
Authorization: Basic <base64(SubscriptionId:Berechtigungsschlüssel)>
Accept: application/json

200 OK (excerpt):

{
  "id": "1f5d1f4d-2ab9-487a-8a17-2d6fd84fe228",
  "orderNumber": "ERP-4711",
  "orderStatus": "ReadyForProduction",
  "quantityOfParts": 9
}

Parts can be nested under items. When planning a lot, search the entire hierarchy rather than only the top level.

Contracts used

Contract Usage
OrderDetails Output: order data, including status, number of parts, and line-item hierarchy.

Common errors

REST status What to check
404 Not Found The ID must come from the same subscription and must not be the number from the ERP.
401 Unauthorized Check the SubscriptionId, authorization key, and app access.

Next: Synchronize orders with the ERP · Create a lot · View and test endpoint