Solved

Call REST API from Postman to change object state

  • 6 May 2021
  • 3 replies
  • 1335 views

Userlevel 2
Badge +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.

 

icon

Best answer by Rifki Razick 7 May 2021, 11:56

View original

This topic has been closed for comments

3 replies

Userlevel 2
Badge +4

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/

Userlevel 2
Badge +4

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."
    }
}

 

 

Userlevel 4
Badge +9

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:

{}