web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Suggested Answer

Create a Cart using postman

(0) ShareShare
ReportReport
Posted on by 40

Hi experts,

I need to create a new Cart using postman, and I receive this error, 

pastedimage1669576067193v1.png

I'm using the USRT organisation because I'm in test phase, I need to create a new transaction in D365 Commerce using postman, I find the AddcartLines  here https://learn.microsoft.com/en-us/dynamics365/commerce/dev-itpro/retail-server-customer-consumer-api#cart-controller  but before to addcartLine I need to create a new Cart.

is there a way to do this using postman ?

Best regards

I have the same question (0)
  • Charlotte X Profile Picture
    on at

    Hi Ghofrane,

    Please wait for someone with relevant development experience to answer this question.

    Best Regards,

    Charlotte

  • Suggested answer
    Community member Profile Picture
    4 on at
    Hi Ghofrane,
     
    I'm doing the same testings than you this days with the same contoso database.
    I've receive the same shift validation error, and I suppose there are no shift open in this store.
    For the moment I have resolve this using a online store instead physical store, because I have suppose that a shift have no sense in a online-store.
     
    You have to specify OUN in the headers with the identification of a online-store:
     
     
    In the Json body I have put the following:
    {
        "Id": "",
        "CartTypeValue": 2,
        "CartLines": [
            {        
            "ItemId": "0003",
            "ProductId": 22565421965,
            "Quantity": 1        
            }
            ]
    }
     
    doing this I've get a response with the new cart created. But I have seen that cart lines are empty in the response:
     
     
    I have try to create lines to this cart with the function API "AddCartLines" but I have no lucky. 
    I allways receipt a response with "malformed request" error:
     
     
    If you have resolve the creation of the cart adding some lines, can you explain me how you achieve this, please?
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Laurens vd Tang Profile Picture

Laurens vd Tang 271 Super User 2025 Season 2

#2
Siv Sagar Profile Picture

Siv Sagar 171 Super User 2025 Season 2

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 130 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans