Skip to main content

Hi Everyone 

 

I’m having an issue updating a purchase Order in Acumatica by using Rest API,

 

So my process is to create a purchase Order skeleton by entering

OrderNbr

Vendor

Owner

Description

in the next step I add line items to that existing purchase Order  using OrderNbr (Not Auto-generated)

 

 

1 Step - Create Purchase Order PUT /purchaseOrder

 

 

 

2 Step - Add line items to the existing Purchase Order 

 

  "exceptionMessage": "Operation failed",
 "exceptionMessage": "Another process has added the 'POOrder' record. Your changes will be lost.",


Request :


{
  "OrderNbr": {
    "value": "PPO-00007"
  },
  "VendorID": {
    "value": "VD000001"
  },
  "Description": {
    "value": "DummyDescription"
  },
  "Date": {
    "value": "2000-01-01"
  },
  "Location": {
    "value": "DUMMYLOC"
  },
  "ShipToAddress": {
    "AddressLine1": {
      "value": "123 Dummy St"
    },
    "AddressLine2": {
      "value": "Suite 100"
    },
    "City": {
      "value": "Dummyville"
    },
    "Country": {
      "value": "XX"
    },
    "PostalCode": {
      "value": "00000"
    },
    "Validated": {
      "value": "false"
    }
  },
  "ShipToContact": {
    "BusinessName": {
      "value": "Dummy Business Inc."
    },
    "Phone1": {
      "value": "(000) 000-0000"
    }
  },
  "Details": Â
    {
      "LineNbr": {
        "value": "1"
      },
      "LineDescription": {
        "value": "Dummy Line Description"
      },
      "UOM": {
        "value": "Unit"
      },
      "OrderQty": {
        "value": 0
      },
      "UnitCost": {
        "value": 0
      },
      "ExtendedCost": {
        "value": 0
      },
      "Project": {
        "value": "DUMMYPROJ"
      },
      "ProjectTask": {
        "value": "DUMMYTASK"
      },
      "BranchID": {
        "value": "DB"
      },
      "Account": {
        "value": "00000"
      },
      "Subaccount": {
        "value": "DUMMYSUB"
      },
      "InventoryID": {
        "value": "DUMMYINV"
      },
      "Promised": {
        "value": "2000-01-01"
      },
      "Requested": {
        "value": "2000-01-01"
      },
      "WarehouseID": {
        "value": "DUMMYWARE"
      },
      "VendorRef": {
        "value": "00000000"
      }
    }
  ]
}

 

 

 

 

Thank you  

 

 

 

 

So you are creating the PO in the UI and then using the API to try and add a line?

 

You may just need to include the Order Type(it is part of the key along with the Order Nbr field). 


@markusray17 Hey No i’m creating the PO via Rest API and adding line items to via REST API as well 


@markusray17 The issue is Fixed instead of updating PO with OrderNBr.value it should be update with id (id will be returned once the PO is created)

 


Reply