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

Announcements

No record found.

News and Announcements icon
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

  • Charlotte X Profile Picture
    Microsoft Employee on at

    Hi Ghofrane,

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

    Best Regards,

    Charlotte

  • Suggested answer
    DC-27040907-0 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 105 Super User 2026 Season 2

#2
Aayush Tiwari Profile Picture

Aayush Tiwari 79

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 71 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans