Solved

Multiple REST API call

  • 15 February 2024
  • 7 replies
  • 123 views

Badge +3

We are currently calling IFS REST API CustomerOrderHandling.svc/CustomerOrderSet from our external tool to create customer order.

The Customer Order Set POST method allow to creat one single order, is there a way to pass multiple order information in the same call? like an array of orders to create.

 

 

icon

Best answer by dsj 16 February 2024, 10:29

View original

7 replies

Userlevel 7
Badge +20

Hi @IFSRUNINNOVAL 

 

You can use batch requests to pack multiple records in a single REST call.

Batch Requests - Technical Documentation For IFS Cloud

 

Hope it helps!

Damith

Badge +3

Thank’s @dsj. that look promissing.

When trying to implent a simple GET call i’m getting the following 

 

 

Any idea? 

Userlevel 7
Badge +20

Hi @IFSRUNINNOVAL 

 

Creating the batch request in the correct format could be tricky.

My hack to create the payload and headers easily is by going to a list window where you can add new records(eg: Customers), add few records and save.

I use Chrome dev tools to get the request payload, but you can view it from the IFS log window as well.

 

You can then use this as a template for your request ;)

 

Hope it helps!

Damith

Badge +3

the Header Prefer = odata.continue-on-error is not working

Any idea please?

Batch Requests - Technical Documentation For IFS Cloud

 

Userlevel 7
Badge +20

Hi @IFSRUNINNOVAL 

I checked a bit and it seems that IFS returns the Preference-Applied header but gets the error instead and none of the records are saved . Strange it returns the Preference-Applied header and does not applied it. This could be a glitch in the framework and better contact IFS support to get an explanation if this is a real pain for you :)

 

Cheers!

Damith

Badge +3

Thank you @dsj 

Badge +3

i have opened a case for the support and they are analyzing it 

Reply