Fetch the X-CSRF-Token by sending GET to /sap/opu/odata/sap/API_PRODUCTION_ORDER_2_SRV/ with header 'X-CSRF-Token: Fetch'; capture the token and cookie from the response headers.
Query production order status: GET /sap/opu/odata/sap/API_PRODUCTION_ORDER_2_SRV/A_ProductionOrderStatus_2?$filter=ManufacturingOrder eq '<order_number>' — key status fields include SystemStatus and UserStatus.
To post a production order confirmation, use the confirmation API: POST /sap/opu/odata/sap/API_PROD_ORDER_CONFIRMATION_2_SRV/A_ProdOrderConfirmation with a JSON body containing ManufacturingOrder, ConfirmationCount, ConfirmedYield, ConfirmedScrapQuantity, and ConfirmationText.
Include headers: Content-Type: application/json, X-CSRF-Token: <token>, and the session cookie returned from the fetch step.
Check the response for the created confirmation document number; HTTP 201 indicates success.
For batch confirmation of multiple orders, wrap multiple requests in an OData $batch envelope to reduce round-trips.
Known gotchas
API_PRODUCTION_ORDER_2_SRV and API_PROD_ORDER_CONFIRMATION_2_SRV are separate OData services — reading order status and posting confirmations require different service paths and potentially different OAuth scopes.
The X-CSRF-Token expires with the session; for long-running integration processes, re-fetch the token when a 403 Forbidden with 'Required' in the X-CSRF-Token response header is returned.
ConfirmedYield and ConfirmedScrapQuantity must be consistent with the base unit of measure on the order — passing values in an alternate UoM without conversion causes incorrect postings without an explicit error.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp