Skip to main content
Solved

Call REST API from Postman to change object state


Forum|alt.badge.img+4
  • Do Gooder (Employee)
  • 17 replies

Hi Everybody,

Anyone can help me with a problem, I was releasing a Purchase Order using Rest API with postman.

The operation is:

https://cmbgse2062.corpnet.ifsworld.com:48080/int/ifsapplications/projection/v1/PurchaseOrderHandling.svc/PurchaseOrderSet(OrderNo='100006')/IfsApp.PurchaseOrderHandling.PurchaseOrder.Release

 

Any time calling this operation I got the error below:

{

    "error": {

        "code": "ODP_DESERIALIZATION_ERROR",

        "message": "Error while de-serializing contents."

    }

}

I'm missing something?

Could you test this in your environment if it works?

 

Thanks in advance,

Alexandre Bicalho.

 

Best answer by Rifki Razick

Hi,

I’m assuming you are doing a POST call which is required since this is an action. Now a possible reason for the deserialization error could be the lack of a payload in your request body. For state changes you need to specify an empty payload like so:

{}

 

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

3 replies

Rifki Razick
Hero (Employee)
Forum|alt.badge.img+9
  • Hero (Employee)
  • 72 replies
  • Answer
  • May 7, 2021

Hi,

I’m assuming you are doing a POST call which is required since this is an action. Now a possible reason for the deserialization error could be the lack of a payload in your request body. For state changes you need to specify an empty payload like so:

{}

 


Forum|alt.badge.img+4
  • Author
  • Do Gooder (Employee)
  • 17 replies
  • May 7, 2021

Hi @Rifki Razick,

I specify the payload in the Body?

When I did it, I receive the message below:
 

{
    "error": {
        "code": "ODP_MISSING_PRECONDITION",
        "message": "A precondition is missing in the request."
    }
}

 

 


Forum|alt.badge.img+4
  • Author
  • Do Gooder (Employee)
  • 17 replies
  • May 7, 2021

Hi @Rifki Razick,

I found the problem,.

I put in the body {} as you suggested and the parameter in header below:

Now, works OK.

 

Many thanks for you sugestion.

 

BR/


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