Solved

Multiple REST API call

  • 15 February 2024
  • 10 replies
  • 171 views

Userlevel 1
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

10 replies

Badge +2

Thanks for the example!  That helped to get past a problem with my syntax.  I also appreciate the warning on the responses for errors, I’m sure I would have ran into that and been back here trying to figure out how to match back to the specific message.

Userlevel 1
Badge +3

@moltbd

IFS has clarified the message syntax payload (i’ll add an example) and we were able to use the continue-on-error option

But :

When the customer Order is correctly created we get the "Content-ID: " in the response. 
But when the customer Order is in error the Content-ID: is not showing so we cant identify the call.
There is no visible way to identify which error belong to which message cause the Content-ID: is missing.

 

IFS has planned a solution in the 23.1.13, 23.2.6,  24.1.0

Badge +2

Did IFS support give you any response on the continue-on-error preference not working?  I’m running into the same problem trying to add parts to a price list.

Userlevel 1
Badge +3

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

Userlevel 1
Badge +3

Thank you @dsj 

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

Userlevel 1
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 

 

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

Userlevel 1
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 

 

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

Reply