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

I have the same question (0)
  • 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
    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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Mallesh Deshapaga Profile Picture

Mallesh Deshapaga 1,081

#2
Laurens vd Tang Profile Picture

Laurens vd Tang 218 Super User 2026 Season 1

#3
SoumitraforD365 Profile Picture

SoumitraforD365 130

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans