Self Service Procurement

Get Involved. Join the Conversation.

Topic

    Stiven Oliveira Bezerra
    Which API to use to Approve or Reject a Purchase...Answered
    Topic posted October 15, 2019 by Stiven Oliveira BezerraRed Ribbon: 250+ Points, tagged Approvals, Approvals/Notification, Requisition Processing, Requisition Web Services 
    36 Views, 5 Comments
    Title:
    Which API to use to Approve or Reject a Purchase Requisition?
    Content:

    Hi,

    I created a Purchase Requisition and its status is Pending Approval, i wish could Approve or Reject, but i can't find the correct REST API, for this scenario.

    Version:
    https://docs.oracle.com/en/cloud/saas/procurement/19c/fapra/rest-endpoints.html

    Best Comment

    Ashok

    Stiven

    When you submit, the process is that the requisition is submitted for approval and then the Approvals engine kicks in (just as if you submitted a requisition through the UI) and the requisition is approved or rejected as appropriate. So using SUBMIT does achieve the end game of approving or rejecting a requisition.

    Obviously if you want to preset the requisition to Approved, Prateek is on the right track here. If you pass an Approver Id, the system will use that to set the status to Approved. But from your original ask, it sounded like you wanted the system to approve or reject based on the appropriate conditions. If that is true, then what I said above holds.

    Comment

     

    • Ashok

      Stiven

      https://docs.oracle.com/en/cloud/saas/procurement/19c/fapra/op-purchaserequisitions-requisitionheaderid-x-operations-0.html

      We have a Submit REST API. The submit process drives whether the requisition will be approved or rejected. There isn't a service that you can call to explicitly approve or reject a requisition (i.e. set the status to one or the other). That is handled by the system by evaluating the approval rules etc.

      • Stiven Oliveira Bezerra

        Right, but if i use this Submit the Requisition gets the status Pending Approval right? So don't have an API that can Approve or Reject?

        • Prateek Parasar

          As far as I know if you give approver details during creation then its considered approved. Approval is bypassed. Look at create requisition payload.

        • Prateek Parasar

          Requsition snd PO both have similar behaviour, you can either send them into the system through API as approved or send them for approval. 

    • Ashok

      Stiven

      When you submit, the process is that the requisition is submitted for approval and then the Approvals engine kicks in (just as if you submitted a requisition through the UI) and the requisition is approved or rejected as appropriate. So using SUBMIT does achieve the end game of approving or rejecting a requisition.

      Obviously if you want to preset the requisition to Approved, Prateek is on the right track here. If you pass an Approver Id, the system will use that to set the status to Approved. But from your original ask, it sounded like you wanted the system to approve or reject based on the appropriate conditions. If that is true, then what I said above holds.