Skip to main content
Solved

API REST - CustomerOrder_ReleaseOrder


Forum|alt.badge.img+1

Hello,

With an ETL and REST components, I create orders in IFS. After creation I would like to change the status of the order from planned to released.

I use this :

"https://blabla/main/ifsapplications/projection/v1/CustomerOrderHandling.svc"

"CustomerOrderSet(OrderNo='blabla')/IfsApp.CustomerOrderHandling.CustomerOrder_ReleaseOrder"

I have this response :

500      |{"error":{"code":"ODP_DESERIALIZATION_ERROR","message":"Error while de-serializing contents."}}

I also try with parameters CustomerNo and Company, i have same message…

Can someone help me ?

 

Thanks,

Best answer by hhy38

@jourdann Your URL is not correct. Change the URL like

CustomerOrderSet(OrderNo='order_no')/IfsApp.CustomerOrderHandling.CustomerOrder.SetReleased

 

And ETag value should be 

 

W/"Vy8iQUFBUmgyQUI1GNEQUFCOjIwMjMwOTEzMTQwODI5Ig=="

 

W/"Vy8iQUFBUmgyQUI1GNEQUFCOjIwMjMwOTEzMTQwODI5Ig==" is wrong

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

12 replies

hhy38
Superhero (Customer)
Forum|alt.badge.img+16
  • Superhero (Customer)
  • 318 replies
  • September 13, 2023

Hi,

 

To release a customer order you must know the ETag value of the order.

 

You can get the ETag value with the Get request below.

https://url:port/main/ifsapplications/projection/v1/CustomerOrderHandling.svc/CustomerOrderSet(OrderNo='Y1025')

 

After that, send a Post request like below. It will return 204 when the ETag value is correct.

https://url:port/main/ifsapplications/projection/v1/CustomerOrderHandling.svc/CustomerOrderSet(OrderNo='Y1025')/IfsApp.CustomerOrderHandling.CustomerOrder.SetReleased

 

Note: Don’t forget to remove the “\” characters from the ETag value.

Example:  

W/\"Vy8iQUFBU2c0QUFHQUFBQ25iQUFIOjIwMjAwOTE1MTMyMTUxIg==\"

W/"Vy8iQUFBU2c0QUFHQUFBQ25iQUFIOjIwMjAwOTE1MTMyMTUxIg=="

 


Forum|alt.badge.img+10
  • Hero (Partner)
  • 186 replies
  • September 13, 2023

This error can appear if you do not specify your headers, for reasons unknown you should add following headers


Accept: application/json;odata.metadata=full;IEEE754Compatible=true
Content-Type: application/json;IEEE754Compatible=true

Otherwise you have something wrong in you request

Could you provide the full REST request you execute?

 

Forum|alt.badge.img+1
  • Author
  • Do Gooder
  • 5 replies
  • September 13, 2023

Thanks for your answer.

Yes i could take the : 
<root odata.context="https://blabla/main/ifsapplications/projection/v1/CustomerOrderHandling.svc/$metadata#CustomerOrderSet/$entity" odata.etag="W/&quot;Vy8iQUFBUmgyQUI1GNEQUFCOjIwMjMwOTEzMTQwODI5Ig==&quot;">

My ETL is Talend, it’s in java, so i have the \”.

Then i add this in my header :

webClient_tRESTClient_3.header("Content-type", "*/*");

 webClient_tRESTClient_3.header("Accept", "*/*");

webClient_tRESTClient_3.header("If-Match", "W/\"Vy8iQUFBUmgyQUI1GNEQUFCOjIwMjMwOTEzMTQwODI5Ig==\"");

i tried with 

"W/&quot;Vy8iQUFBUmgyQUI1GNEQUFCOjIwMjMwOTEzMTQwODI5Ig==&quot;"

 

And same result :

500      |{"error":{"code":"ODP_DESERIALIZATION_ERROR","message":"Error while de-serializing contents."}}

 

Thanks,

 

[Edit] : I tried with this and same result

Accept: application/json;odata.metadata=full;IEEE754Compatible=true
Content-Type: application/json;IEEE754Compatible=true


Forum|alt.badge.img+1
  • Author
  • Do Gooder
  • 5 replies
  • September 13, 2023

This is how I configure my java component, I don't know if this will mean anything to you.

 


hhy38
Superhero (Customer)
Forum|alt.badge.img+16
  • Superhero (Customer)
  • 318 replies
  • September 13, 2023

Your ETag value is not correct. 

 

Wrong:     W/\"Vy8iQUFBUmgyQUI1GNEQUFCOjIwMjMwOTEzMTQwODI5Ig==\"

Wrong:    W/&quot;Vy8iQUFBUmgyQUI1GNEQUFCOjIwMjMwOTEzMTQwODI5Ig==&quot;

True:       W/”Vy8iQUFBUmgyQUI1GNEQUFCOjIwMjMwOTEzMTQwODI5Ig==”


hhy38
Superhero (Customer)
Forum|alt.badge.img+16
  • Superhero (Customer)
  • 318 replies
  • September 13, 2023

Your ETag value is not correct. Just try like below.

 

W/"Vy8iQUFBUmgyQUI1GNEQUFCOjIwMjMwOTEzMTQwODI5Ig=="


hhy38
Superhero (Customer)
Forum|alt.badge.img+16
  • Superhero (Customer)
  • 318 replies
  • Answer
  • September 13, 2023

@jourdann Your URL is not correct. Change the URL like

CustomerOrderSet(OrderNo='order_no')/IfsApp.CustomerOrderHandling.CustomerOrder.SetReleased

 

And ETag value should be 

 

W/"Vy8iQUFBUmgyQUI1GNEQUFCOjIwMjMwOTEzMTQwODI5Ig=="

 

W/&quot;Vy8iQUFBUmgyQUI1GNEQUFCOjIwMjMwOTEzMTQwODI5Ig==&quot; is wrong


Forum|alt.badge.img+1
  • Author
  • Do Gooder
  • 5 replies
  • September 13, 2023

 


hhy38
Superhero (Customer)
Forum|alt.badge.img+16
  • Superhero (Customer)
  • 318 replies
  • September 13, 2023

I think there was problem about comments. When I send a comment. It didn't shown. Now all of them shown. :)


Forum|alt.badge.img+1
  • Author
  • Do Gooder
  • 5 replies
  • September 13, 2023

Forum was off for some hours…

 

I have same things in postman

 


hhy38
Superhero (Customer)
Forum|alt.badge.img+16
  • Superhero (Customer)
  • 318 replies
  • September 13, 2023

Do you use Team Viewer or Anydesk? I can check your request with one of them. 


Forum|alt.badge.img+1
  • Author
  • Do Gooder
  • 5 replies
  • September 14, 2023

Awesome ! Thanks to your help I solved my problem!!

You have to pay attention to the "if-match" and you need {} in the body...

Thanks again


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