Skip to main content
Answer

Create Purcahse receipt from purchase order using Rest API

  • November 16, 2023
  • 7 replies
  • 381 views

Driss
Jr Varsity III
Forum|alt.badge.img

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

Best answer by stephenbologna39

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

7 replies

jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • November 17, 2023

Hi @Driss ,

Could you please try the following request?

{

    "entity": {

        "ReceiptNbr": {

            "value": "PR002024"

        },

        "Type": {

            "value": "Receipt"

        }

    },

    "parameters": {

        "OrderNbr": {

            "value": "PO002057"

        },

        "Type": {

            "value": "Normal"

        }

    }

}


Driss
Jr Varsity III
Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • November 17, 2023

@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"

        }

    }

}

 

 

 


Forum|alt.badge.img+2

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


RohitRattan88
Acumatica Moderator
Forum|alt.badge.img+4
  • Acumatica Moderator
  • November 21, 2023

@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:

 


Driss
Jr Varsity III
Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • November 21, 2023

@RohitRattan88 Thank you so much!


darinpaulsacumatica76
Jr Varsity II

@RohitRattan88, so you are saying that even though you can add the AddPOOrderLine action when extending the endpoint, it still isn’t supported by the API?

 


RohitRattan88
Acumatica Moderator
Forum|alt.badge.img+4
  • Acumatica Moderator
  • August 12, 2025

@RohitRattan88, so you are saying that even though you can add the AddPOOrderLine action when extending the endpoint, it still isn’t supported by the API?

@darinpaulsacumatica76 yes that was the case I looked into it last time. You need to send top level entity for action, thus cannot send action parameters in isolation. Maybe test but I am skeptical.