Skip to main content
Solved

Multiple REST API call


Forum|alt.badge.img+10

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.

 

 

Best answer by dsj

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

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

10 replies

dsj
Ultimate Hero (Partner)
Forum|alt.badge.img+22
  • Ultimate Hero (Partner)
  • 861 replies
  • February 15, 2024

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


Forum|alt.badge.img+10
  • Author
  • Hero (Customer)
  • 120 replies
  • February 16, 2024

Thank’s @dsj. that look promissing.

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

 

 

Any idea? 


dsj
Ultimate Hero (Partner)
Forum|alt.badge.img+22
  • Ultimate Hero (Partner)
  • 861 replies
  • Answer
  • February 16, 2024

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


Forum|alt.badge.img+10
  • Author
  • Hero (Customer)
  • 120 replies
  • February 20, 2024

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

Any idea please?

Batch Requests - Technical Documentation For IFS Cloud

 


dsj
Ultimate Hero (Partner)
Forum|alt.badge.img+22
  • Ultimate Hero (Partner)
  • 861 replies
  • February 20, 2024

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


Forum|alt.badge.img+10
  • Author
  • Hero (Customer)
  • 120 replies
  • February 21, 2024

Thank you @dsj 


Forum|alt.badge.img+10
  • Author
  • Hero (Customer)
  • 120 replies
  • February 21, 2024

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


Forum|alt.badge.img+3
  • Do Gooder (Customer)
  • 3 replies
  • May 1, 2024

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.


Forum|alt.badge.img+10
  • Author
  • Hero (Customer)
  • 120 replies
  • May 7, 2024

@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


Forum|alt.badge.img+3
  • Do Gooder (Customer)
  • 3 replies
  • May 8, 2024

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.


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