Skip to main content

Notifications

Announcements

No record found.

Supply chain | Supply Chain Management, Commerce
Answered

calling commerce scale unit REST APIs using postman

(1) ShareShare
ReportReport
Posted on by 1,221

Hi Experts,

Im trying to call the commerce scale unit REST APIs using postman.

i would like to know how to make the full URL of the CSU API call via postman

I am talking about the below built in APIs:
docs.microsoft.com/.../retail-server-customer-consumer-api

I followed the steps here:
docs.microsoft.com/.../consume-retail-server-api

But it does not mention how to make the full URL to call in postman, it only showed one example which doesnt work for the other APIs.
https://<Retailserverurl>/Commerce/Customers('2001')/GetOrderHistory

How does one know the actual URL like in the above it is /Customers with the parameter in the Customers part and not the GetOrderHistory ?

Does someone have a postman collection or is there some way i can call the API and get all the info?

PS i already refered to the below blog:

https://patrickmouwen.com/technicalint/d365-retail-apis-part-iii-how-to-use-the-d365-retail-apis/

Please help.

Thank you.

  • Suggested answer
    RE: calling commerce scale unit REST APIs using postman

    HI Ashwin,

    If you considering use Postman, the CPOS is a good way to check the API request and response.

    Besides that, we have retail proxy library that you can write some simple typescript or C# code to use our retail proxy to fire API , then you need then debug or use fiddler to view the entire HTTP request.

    https://docs.microsoft.com/en-us/dynamics365/commerce/dev-itpro/typescript-proxy-retail-pos

     Consume Retail Server APIs in external applications - Commerce | Dynamics 365 | Microsoft Docs

  • real_ashwin Profile Picture
    real_ashwin 1,221 on at
    RE: calling commerce scale unit REST APIs using postman

    Hi Mando, i understand about the Commerce engine url it was how to complete the full URL for each of the APIs as some of them pass parameters differently like GetOrderHistory passes customer like below but some others APIs pass it in the end as parameter:

    eg. {{General_RetailServer}}/Commerce/Customers('300827')/GetOrderHistory?$top=500&api-version=7.3

  • real_ashwin Profile Picture
    real_ashwin 1,221 on at
    RE: calling commerce scale unit REST APIs using postman

    Hi Diogo,

    I am actually trying to use CSU without CPOS setup fully. Is it mandatory ?

  • Suggested answer
    Mando Profile Picture
    Mando on at
    RE: calling commerce scale unit REST APIs using postman

    For Commerce Scale Unit you should be able to get the endpoint within the selected CSU's tab under "Links" --> "Commerce Engine URL"

    pastedimage1648494362513v1.png

  • Suggested answer
    RE: calling commerce scale unit REST APIs using postman

    HI Ashwin,

    Your RS URL is present in your LCS project, like:

    pastedimage1648473190143v1.png

    But if you want to know the entire information about the API call, I would recommend you use the Network Tab (F12) from CPOS, like:

    pastedimage1648473265024v2.png

    pastedimage1648473322072v4.png

    pastedimage1648473300376v3.png

    Same for the GetOrderHistory:

    pastedimage1648473405792v5.png

    pastedimage1648473424214v6.png

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans