Skip to main content
Answer

How can I use the API to update the value of an Attribute on a Production Order?

  • October 17, 2025
  • 3 replies
  • 44 views

I have an Attribute added to Production Orders.  I need to update the value via the API.  I’ve tried PUT/PATCH/POSTing to the ProductionOrder endpoint with a body like:

{
  "OrderAttributes": [
    {
      "AttributeID": {
        "value": "PKGMETHOD"
      },
      "Value": {
        "value": "B"
      }
    }
  ],
  "OrderType": {
    "value": "WO"
  },
  "ProductionNbr": {
    "value": "00000006"
  }
}

...but I just get an error like "The system failed to commit the ProductionAttributes row."  What do I need to do to update the attribute?

Best answer by Debbie Baldwin

@bruno71 - my developer tested this. See if it works for you. 

PUT http://localhost/Test11/entity/MANUFACTURING/23.200.001/ProductionOrder

PUT data:
{
    "OrderType": { "value": "RO" },
    "ProductionNbr": { "value": "AM000012" },
    "Warehouse": { "value": "WHOLESALE" },
    "InventoryID": { "value": "AACOMPUT01" }, 
    "OrderAttributes": [
    {
      "AttributeID": { "value": "BURDEN" },
      "Description": { "value": "Project Burden Percentage" },
      "Enabled": { "value": true },
      "Label": { "value": "BURDEN" },
      "OperationNbr": { "value": "0010" },
      "OrderType": { "value": "RO" },
      "ProductionNbr": { "value": "AM000012" },
      "Source": { "value": "Production" },
      "TransactionRequired": { "value": false },
      "Value": { "value": "34" }
    }
  ]
}

Response : 

{
  "id": "53a23203-71ad-f011-a45a-a02942fca90d",
  "rowNumber": 1,
  "note": {
    "value": "TestNote"
  },
  "AllowPreassigningLotSerialNumbers": {
    "value": false
  },
  "BOMID": {},
  "BOMRevision": {},
  "Branch": {
    "value": "PRODWHOLE"
  },
  "ConfigKey": {},
  "ConfigurationID": {},
  "ConfRevision": {},
  "Constraint": {
    "value": "2025-10-20T00:00:00+05:30"
  },
  "CostingMethod": {
    "value": "Actual"
  },
  "Customer": {},
  "CustomerName": {},
  "DispatchPriority": {
    "value": 5
  },
  "EndDate": {
    "value": "2025-10-20T00:00:00+05:30"
  },
  "EstimateID": {},
  "EstimateRevision": {},
  "ExcludefromMRP": {
    "value": false
  },
  "Hold": {
    "value": false
  },
  "InventoryID": {
    "value": "AACOMPUT01"
  },
  "Location": {
    "value": "R1S1"
  },
  "OrderAttributes": [],
  "OrderDate": {
    "value": "2025-10-04T00:00:00+05:30"
  },
  "OrderDescription": {},
  "OrderType": {
    "value": "RO"
  },
  "ParentOrder": {},
  "ParentOrderType": {},
  "ProductionNbr": {
    "value": "AM000012"
  },
  "ProductManager": {},
  "ProductOrder": {},
  "ProductOrderType": {},
  "ProductWorkgroup": {},
  "Project": {
    "value": "X"
  },
  "ProjectTask": {},
  "QtyComplete": {
    "value": 0
  },
  "QtyRemaining": {
    "value": 5
  },
  "QtyScrapped": {
    "value": 0
  },
  "QtytoProduce": {
    "value": 5
  },
  "RequireParentLotSerialNumber": {
    "value": "Never"
  },
  "ScheduleStatus": {
    "value": "Unscheduled"
  },
  "SchedulingMethod": {
    "value": "Start On"
  },
  "ScrapLocation": {
    "value": "RETURNS"
  },
  "ScrapOverride": {
    "value": false
  },
  "ScrapWarehouse": {
    "value": "RETAIL"
  },
  "SOLineNbr": {},
  "SOOrderNbr": {},
  "SOOrderType": {},
  "Source": {
    "value": "BOM"
  },
  "SourceDate": {
    "value": "2025-10-20T00:00:00+05:30"
  },
  "SourceOrderType": {},
  "SourceProductionNbr": {},
  "StartDate": {
    "value": "2025-10-20T00:00:00+05:30"
  },
  "Status": {
    "value": "Planned"
  },
  "UOM": {
    "value": "EA"
  },
  "UpdateProject": {
    "value": false
  },
  "UseFixedMfgLeadTimesforOrderDates": {
    "value": false
  },
  "UseOrderStartDateforMRP": {
    "value": false
  },
  "Warehouse": {
    "value": "WHOLESALE"
  },
  "WIPAccount": {
    "value": "12400"
  },
  "WIPSubaccount": {
    "value": "000000"
  },
  "WIPVarianceAccount": {
    "value": "51500"
  },
  "WIPVarianceSubaccount": {
    "value": "000000"
  },
  "custom": {},
  "_links": {
    "self": "/Test11/entity/MANUFACTURING/23.200.001/ProductionOrder/53a23203-71ad-f011-a45a-a02942fca90d",
    "files:put": "/Test11/entity/MANUFACTURING/23.200.001/files/PX.Objects.AM.ProdMaint/ProdMaintRecords/53a23203-71ad-f011-a45a-a02942fca90d/{filename}"
  }
}

3 replies

Forum|alt.badge.img+8
  • Captain II
  • October 20, 2025

@bruno71 

 

I guess the framework is flexible enough to give at least two options for this, the API route which you have taken or via Webhook handler, depends on where you feel strongest. The Acumatica framework or API’s.

 

I’d personally prefer to handle the data in a webhook handler so that I have more control over what happens when the API call is made. Acumatica have a guide on this you can find here: Configuring Webhooks

This way, you can find the AMProdItem record, match the CSAnswers record, then update accordingly.

 

You may also find them easier to debug.


Debbie Baldwin
Acumatica Moderator
Forum|alt.badge.img+2
  • Acumatica Product Manager
  • Answer
  • October 21, 2025

@bruno71 - my developer tested this. See if it works for you. 

PUT http://localhost/Test11/entity/MANUFACTURING/23.200.001/ProductionOrder

PUT data:
{
    "OrderType": { "value": "RO" },
    "ProductionNbr": { "value": "AM000012" },
    "Warehouse": { "value": "WHOLESALE" },
    "InventoryID": { "value": "AACOMPUT01" }, 
    "OrderAttributes": [
    {
      "AttributeID": { "value": "BURDEN" },
      "Description": { "value": "Project Burden Percentage" },
      "Enabled": { "value": true },
      "Label": { "value": "BURDEN" },
      "OperationNbr": { "value": "0010" },
      "OrderType": { "value": "RO" },
      "ProductionNbr": { "value": "AM000012" },
      "Source": { "value": "Production" },
      "TransactionRequired": { "value": false },
      "Value": { "value": "34" }
    }
  ]
}

Response : 

{
  "id": "53a23203-71ad-f011-a45a-a02942fca90d",
  "rowNumber": 1,
  "note": {
    "value": "TestNote"
  },
  "AllowPreassigningLotSerialNumbers": {
    "value": false
  },
  "BOMID": {},
  "BOMRevision": {},
  "Branch": {
    "value": "PRODWHOLE"
  },
  "ConfigKey": {},
  "ConfigurationID": {},
  "ConfRevision": {},
  "Constraint": {
    "value": "2025-10-20T00:00:00+05:30"
  },
  "CostingMethod": {
    "value": "Actual"
  },
  "Customer": {},
  "CustomerName": {},
  "DispatchPriority": {
    "value": 5
  },
  "EndDate": {
    "value": "2025-10-20T00:00:00+05:30"
  },
  "EstimateID": {},
  "EstimateRevision": {},
  "ExcludefromMRP": {
    "value": false
  },
  "Hold": {
    "value": false
  },
  "InventoryID": {
    "value": "AACOMPUT01"
  },
  "Location": {
    "value": "R1S1"
  },
  "OrderAttributes": [],
  "OrderDate": {
    "value": "2025-10-04T00:00:00+05:30"
  },
  "OrderDescription": {},
  "OrderType": {
    "value": "RO"
  },
  "ParentOrder": {},
  "ParentOrderType": {},
  "ProductionNbr": {
    "value": "AM000012"
  },
  "ProductManager": {},
  "ProductOrder": {},
  "ProductOrderType": {},
  "ProductWorkgroup": {},
  "Project": {
    "value": "X"
  },
  "ProjectTask": {},
  "QtyComplete": {
    "value": 0
  },
  "QtyRemaining": {
    "value": 5
  },
  "QtyScrapped": {
    "value": 0
  },
  "QtytoProduce": {
    "value": 5
  },
  "RequireParentLotSerialNumber": {
    "value": "Never"
  },
  "ScheduleStatus": {
    "value": "Unscheduled"
  },
  "SchedulingMethod": {
    "value": "Start On"
  },
  "ScrapLocation": {
    "value": "RETURNS"
  },
  "ScrapOverride": {
    "value": false
  },
  "ScrapWarehouse": {
    "value": "RETAIL"
  },
  "SOLineNbr": {},
  "SOOrderNbr": {},
  "SOOrderType": {},
  "Source": {
    "value": "BOM"
  },
  "SourceDate": {
    "value": "2025-10-20T00:00:00+05:30"
  },
  "SourceOrderType": {},
  "SourceProductionNbr": {},
  "StartDate": {
    "value": "2025-10-20T00:00:00+05:30"
  },
  "Status": {
    "value": "Planned"
  },
  "UOM": {
    "value": "EA"
  },
  "UpdateProject": {
    "value": false
  },
  "UseFixedMfgLeadTimesforOrderDates": {
    "value": false
  },
  "UseOrderStartDateforMRP": {
    "value": false
  },
  "Warehouse": {
    "value": "WHOLESALE"
  },
  "WIPAccount": {
    "value": "12400"
  },
  "WIPSubaccount": {
    "value": "000000"
  },
  "WIPVarianceAccount": {
    "value": "51500"
  },
  "WIPVarianceSubaccount": {
    "value": "000000"
  },
  "custom": {},
  "_links": {
    "self": "/Test11/entity/MANUFACTURING/23.200.001/ProductionOrder/53a23203-71ad-f011-a45a-a02942fca90d",
    "files:put": "/Test11/entity/MANUFACTURING/23.200.001/files/PX.Objects.AM.ProdMaint/ProdMaintRecords/53a23203-71ad-f011-a45a-a02942fca90d/{filename}"
  }
}


  • Author
  • Freshman I
  • October 21, 2025

Thanks!  I think my issue was that I didn’t have all the key fields included in the request.  And then when I tried PATCHing with just the ID values, it didn’t work either.  I found out that the GUID values for details can be randomly generated for each session.  My GET and PATCH calls were from different sessions so the IDs didn’t match.