Developer forum

Forum » Development » DW 9 WebApi dosent always add body on carts/create request

DW 9 WebApi dosent always add body on carts/create request

Lasse Larsen
Reply

Hi DW i have been having an issue, where calling the carts/create endpoint with an OrderLine and a few OrderFields in the body sometimes dosent add the fields to the cart.

The cart is always created and returned, sometimes just without the additional info.

When mirror posting to request bin i cant see any abvious differences.

This request added the values in the body to the cart in dw:

While this dident:

 

Both requests were posted to the dwapi/ecommerce/carts/create?currencyCode={request.CurrencyCode}&countryCode={request.CountryCode}&languageId={request.LanguageId} endpoint.

I havent been able to find any real patterns in when a post is going to add the body, but it seems lige the first request after a restart always fails to add them.


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Odd thing. Maybe first request things is worth investigating - will have a look.

Do you by any change have any errors registered in the event log inside Dynamicweb?

 

 
Frederik Nielsen Dynamicweb Employee
Frederik Nielsen
Reply

Hi Lasse!

Could it be a possible connection issue with a live integration or something similar causing this?
By the looks of it, the request is the exact same in both pictures, but is it possible for you to provide a full curl or similar for it so I can make sure I'm trying a similar request? Because right now I cannot reproduce this issue on any solution I have running.

I assume it's recent you've been using the /carts/create endpoint as we only had the /carts available before, only using query parameters - have you used this before and seen similar issues?
An additional question to that is then, what version of DW are you running?

And as Nicolai mentioned, it would be great to see if there's any errors logged, especially if you can reproduce it consistently upon a restart of the solution.
 

 

You must be logged in to post in the forum