Self Service Procurement

Get Involved. Join the Conversation.

Topic

    Sunny Chugh
    Rest API to submit a requisition not workingAnswered
    Topic posted August 20, 2019 by Sunny ChughSilver Medal: 2,000+ Points, tagged Create Requisition 
    33 Views, 10 Comments
    Title:
    Rest API to submit a requisition not working
    Summary:
    when we try to submit a req using rest API we get an error
    Content:

    Hi

    we are trying to use Rest APIs to create the requisition which will be in incomplete state and then submit using the same rest API but we get an error as below

    fscmRestApi/resources/latest/purchaseRequisitions

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

    Submit a requisition for approval

    POST

    /fscmRestApi/resources/11.13.18.05/purchaseRequisitions/{RequisitionHeaderId}

    Payload:

    {
    "name":"submitRequisition",
    "parameters":[]
    }
     
    error:
    Unexpected 'I'
     
    kindly let me know if anybody has faced this issue
     
    regards
    Sunny

     

    Best Comment

    Sumana Sarkar

    Hello Sunny,

    Are you getting the error during POST or SUBMIT? Could provide the exact steps leading to the error e.g. how you are invoking the REST API, the complete URL you are using, the payload etc.
    Thanks and Regards

    Sumana

    Comment

     

    • Sumana Sarkar

      Hello Sunny,

      Are you getting the error during POST or SUBMIT? Could provide the exact steps leading to the error e.g. how you are invoking the REST API, the complete URL you are using, the payload etc.
      Thanks and Regards

      Sumana

    • Sunny Chugh

      Hi 

      yeah with Post action

       

      https://hostname/fscmRestApi/resources/latest/purchaseRequisitions/300000310661267

      Payload

       

      {
      "name":"submitRequisition",
      "parameters":[]
      }
       
      Regards
      Sunny
    • Sumana Sarkar

      Hi Sunny,

      Are you seeing any more details in the response?
      If you are using Postman client to invoke REST, you may want to check the response from the "Raw" tab and see if you have additional details?

      Thanks and Regards

      Sumana

    • Sunny Chugh

      Hi Sumana

      it says Invalid attribute "name" in the payload but not sure why as the same payload is there in the documentation

      regards

      Sunny

    • Sunny Chugh

      Hi Sumana

      i get below error when i use post operation:

      Invalid operation create for the specified resource.

      but when i use put then i get invalid attribute "name"

      regards

      Sunny

    • Sumana Sarkar

      Hi Sunny,

      So SUBMIT operation is supported from Update 19B of Procurement Cloud release. If you are already on this release, please check if you have added the Content-Type header?

      Key= Content-Type
      Value= application/vnd.oracle.adf.action+json

      Thanks and Regards

      Sumana

    • Sunny Chugh

      thanks a lot sumana

      it seems to be working, I am getting proper validation error now :)

      regards

      Sunny

    • Ashok

      Prateek

      You said: This is always a tricky one as Oracle always expects content type different from any other provider.

      Could you clarify this? What is the content type that other providers expect as compared to us? I would like to understand this a bit better.