Skip to main content
Solved

Create Purcahse receipt from purchase order using Rest API

  • November 16, 2023
  • 5 replies
  • 248 views

Driss
Jr Varsity III
Forum|alt.badge.img
  • Jr Varsity III
  • 29 replies

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

View original
Did this topic help you find an answer to your question?

5 replies

jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • 698 replies
  • 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
  • 29 replies
  • 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+1

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
  • 252 replies
  • 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
  • 29 replies
  • November 21, 2023

@RohitRattan88 Thank you so much!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings