Skip to main content

I’m doing a PUT method in Postman but it keeps creating a brand new purchase receipt instead of adding Details to the existing PurchaseReceipt that I’ve specified.  How do I prevent a new PurchaseReceipt from getting created.

 

URL:  /entity/Default/22.200.001/PurchaseReceipt

Body:

{
        "ReceiptNbr": {"value": "PR00153497"},   
        "Details" :
            {
              "POOrderNbr": {"value": "PO53472"},
              "POOrderType": {"value": "Drop-Ship"},              
              "TrackingNumber": {"value": "9999"},
              "ReceiptQty": {"value": "1"},              
              "InventoryID":{"value": "190-34563221"},
               "POLineNbr": {"value": "1"}              
            }
            ],
        "VendorID": { "value": "PU3" },
        "VendorRef": { "value": "FROM_API" },        
        "Location": {"value": "MAIN"},
        "Branch": {"value": "CM"}            
}

 

Hi @bpgraves,

To update the existing record, you need to use the key fields that are used to identify the document. For purchase receipt, it should be the Type and ReceiptNbr field in the PUT request. For more details on it refer, https://help.acumatica.com/(W(15))/Help?ScreenId=ShowWiki&pageid=af48c02a-afbc-4fdb-b1e5-635ac7ebbaf1

 

Feel free to post back if you have any questions.! Good Luck,


Hi @bpgraves,

To update the existing record, you need to use the key fields that are used to identify the document. For purchase receipt, it should be the Type and ReceiptNbr field in the PUT request. For more details on it refer, https://help.acumatica.com/(W(15))/Help?ScreenId=ShowWiki&pageid=af48c02a-afbc-4fdb-b1e5-635ac7ebbaf1

 

Feel free to post back if you have any questions.! Good Luck,

oh wow!  I keep forgetting to add the Type!  Every time I do this with the REST API, I end up creating a brand new object.  I really wish it wasn’t required since the ReceiptNbr should have been sufficient for the key: Acumatica can’t create the same ReceiptNbr for a PurchaseReceipt even if it has a different type!


Reply