Skip to main content
Answer

REST API for Production Orders with custom Operations and Materials

  • September 9, 2025
  • 2 replies
  • 111 views

We are an engineer to order environment with an external, non-Acumatica product configurator. The output of the configuration tool is a JSON collection of operations, phantom sub assemblies, and materials. We are looking for an API based solution to create Production Orders linked to a Sales Order Line with a custom BOM. 

We're able to create the Production Order, but are running into difficulties identifying the correct method of providing the Operation collection along with their associated Materials [Stock Items]. We’ve tried using ProductionOrder, ProductionOrderDetail, and the CreateProductionOrder/CreateProductionOrderProcess[All] Action and have not had any success getting the Operations collection to populate.

For example, in ProductionOrderDetail, we’ve supplied the Operations like below:

{    
    "AllowPreassigningLotSerialNumbers": {
        "value": true
    },
    "Branch": {
        "value": "PRODWHOLE"
    },
    "CostingMethod": {
        "value": "Actual"
    },
    "Hold": {
        "value": false
    },
    "InventoryID": {
        "value": "WDTK274218"
    },
    "Location": {
        "value": "R1S1"
    },
    "OrderDate": {
        "value": "2025-08-29T00:00:00+00:00"
    },
    "OrderDescription": {
        "value": "Configurable Wood Desk"
    },
    "OrderType": {
        "value": "RO"
    },
    "RequireParentLotSerialNumber": {
        "value": "Never"
    },
     "Operations": [
        {
            
            "OperationDescription": {
                "value": "Assembly"
            },
            "OperationID": {
                "value": "0010"
            },
            "WorkCenterID": {
                "value": "FA-400"
            }
        }
    ],
    "UOM": {
        "value": "EA"
    },
    "Warehouse": {
        "value": "WHOLESALE"
    },
    "WIPAccount": {
        "value": "12450"
    },
    "WIPSubaccount": {
        "value": "000000"
    },
    "WIPVarianceAccount": {
        "value": "51500"
    },
    "WIPVarianceSubaccount": {
        "value": "000000"
    }
}

But this returns an error like:

"error": "Inserting  'Production Item' record raised at least one error. Please review the errors.; UOM: 'UOM' cannot be empty.; LocationID: 'Location' cannot be empty.; WIPAcctID: 'WIP Account' cannot be empty.; WIPSubID: 'WIP Subaccount' cannot be empty.; WIPVarianceAcctID: 'WIP Variance Account' cannot be empty.; WIPVarianceSubID: 'WIP Variance Subaccount' cannot be empty.; PreassignLotSerial: 'Allow Preassigning Lot/Serial Numbers' cannot be empty.; ParentLotSerialRequired: 'Require Parent Lot/Serial Number' cannot be empty."

Removing the Operation section allows the ProductionOrder to be created. We’ve trimmed the Operations down to just what we think are the required fields and all the way up to the full set of data we need to provide and nothing seems to work. We’ve tried modifying the Operation field names since there is ambiguity around what the field name acutaly is, i.e. WorkCenter is shown in various API GET calls as WorkCenter, others show WorkCenterID, and the database schema is WcID [all of which we’ve tried].

We’re looking for any documentation that can describe how to accomplish this.

Thanks!

Best answer by anaginghipster

The workflow that we ended up developing follows this process:

  1. Create the Sales Order via Default /SalesOrder endpoint. Retrieve the Sales Order ID created for future steps. Set line items on Sales Order with the Transaction AMProdCreate set to true to allow for Production.
  2. Create the Production Order via the /CreateProductionOrder/CreateProductionOrderProcessAll Manufacturing endpoint action. In this step we also pass the linked Sales Order and Sales Order Line [identified in step 1]. The headers from this call return the lookup URL for the Production Order, but the tools we’re using to make the API calls do not provide access to the header detail being returned. To work around this we perform step 3:
  3. Perform Production Order lookup via the Manufacturing /ProductionOrder endpoint, passing the following $filter parameter: "SOOrderNbr eq ‘[SO number]’ and SOLineNbr eq [SO line number] - [SO number and line item from step 1 - we did have to set a five second wait for the production order to finish its creation in order to get the results back. This may be due to the low resources we have on our test server.]
  4. Retrieve the Production Order ID from step 3 and apply the operations and materials via the Manufacturing /ProductionOrderDetail endpoint, passing the ID for the Production Order and the JSON collection of operations and their materials.

If there is a more streamline method to accomplish this, we’d be happy to take suggestions. Or, if there are other users who would like to see the formatted JSON we’re sending to each endpoint for clarification, we’d be happy to provide that.

2 replies

  • Author
  • Freshman II
  • Answer
  • September 15, 2025

The workflow that we ended up developing follows this process:

  1. Create the Sales Order via Default /SalesOrder endpoint. Retrieve the Sales Order ID created for future steps. Set line items on Sales Order with the Transaction AMProdCreate set to true to allow for Production.
  2. Create the Production Order via the /CreateProductionOrder/CreateProductionOrderProcessAll Manufacturing endpoint action. In this step we also pass the linked Sales Order and Sales Order Line [identified in step 1]. The headers from this call return the lookup URL for the Production Order, but the tools we’re using to make the API calls do not provide access to the header detail being returned. To work around this we perform step 3:
  3. Perform Production Order lookup via the Manufacturing /ProductionOrder endpoint, passing the following $filter parameter: "SOOrderNbr eq ‘[SO number]’ and SOLineNbr eq [SO line number] - [SO number and line item from step 1 - we did have to set a five second wait for the production order to finish its creation in order to get the results back. This may be due to the low resources we have on our test server.]
  4. Retrieve the Production Order ID from step 3 and apply the operations and materials via the Manufacturing /ProductionOrderDetail endpoint, passing the ID for the Production Order and the JSON collection of operations and their materials.

If there is a more streamline method to accomplish this, we’d be happy to take suggestions. Or, if there are other users who would like to see the formatted JSON we’re sending to each endpoint for clarification, we’d be happy to provide that.


  • Freshman I
  • October 30, 2025

@anaginghipster Can you please provide us with formatted JSON you’re sending to Manufacturing /ProductionOrderDetail endpoint?

 

Thanks!!