Solved

Create Purcahse receipt from purchase order using Rest API

  • 16 November 2023
  • 5 replies
  • 135 views

Userlevel 3
Badge

hey everyone

 

hope all good 

 

I’ve a PO with “OPEN” Status, i want to create purchase receipt 

 

I’ve added new action to the endpoint 

 

 

I’ve added new field “OrderNbr” so i can add that to by request to find the PO

 

 

 

This is my endpoint request 

 

https://company/entity/vendorpolineitems/22.200.001/purchasereceipt/AddPOOrder

 

Http body request 

 

{
    "entity": {},
    "parameters": {
         
        "OrderNbr": {
            "value": "PPO-05298"
        }
       
}

 }


Error Message 

 

"message":"An error has occurred.","exceptionMessage":"Operation failed","exceptionType":"




Thanks

icon

Best answer by stephenbologna39 18 November 2023, 02:00

View original

5 replies

Userlevel 7
Badge +11

Hi @Driss ,

Could you please try the following request?

{

    "entity": {

        "ReceiptNbr": {

            "value": "PR002024"

        },

        "Type": {

            "value": "Receipt"

        }

    },

    "parameters": {

        "OrderNbr": {

            "value": "PO002057"

        },

        "Type": {

            "value": "Normal"

        }

    }

}

Userlevel 3
Badge

@jinin Thank for the answer actually now it creating the receipt but it not adding the Purchase Order

and also in order to see the purchase order i need to add the vendor id 

 

here is the request


 

{

    "entity": {

    "VendorID":{
    
    "value":"V001088"
    
    }

    },

    "parameters": {

        "OrderNbr": {

            "value": "PPO-05298"

        },

        "Type": {

            "value": "Normal"

        }

    }

}

 

 

 

Userlevel 4
Badge

Hi @Driss 

 

If you only need to create a Purchase Receipt from a Purchase Order, this can be done with a standard PUT request:

 

PUT ?$expand=Details HTTP/1.1

Host: [<Acumatica ERP instance URL>]/entity/Default/23.200.001/PurchaseReceipt

Accept: application/json

Content-Type: application/json

 

{

    "VendorID": { "value": "GOODFRUITS" },

    "Location": { "value": "MAIN" },

    "Details": [

        {

            "POOrderNbr": { "value": "000030" },

            "POOrderType": { "value": "Normal" }

        }

    ]

}

 

Source:

https://help.acumatica.com/Help?ScreenId=ShowWiki&pageid=a93b5926-d164-4a1b-97fe-a1c46af67ea6

Userlevel 7
Badge +4

@Driss , @stephenbologna39  is correct. You need to call Receipt entity and provide PO Nbr in the body.

Please note that Add PO is a modal/dialog action which are not supported via API yet:

 

Userlevel 3
Badge

@RohitRattan88 Thank you so much!

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved