Skip to main content

Notifications

Supply chain | Supply Chain Management, Commerce
Answered

The request passed to the service is not valid

Posted on by 21
 
 
I have followed the instructions here to get a token and make a request to an endpoint. Consume Retail Server APIs in external applications - Commerce | Dynamics 365 | Microsoft Learn
 
I can get a token but whenever I make a request I always get a 400 status and the error /The request passed to the service is not valid/. 
 
I followed the instructions exactly and use the /https://Retail>serverurl/Commerce/Customers('2001')/GetOrderHistory/ example end point with my server url and a valid customer account number. 
 
Why do I get this error? How can I resolve this issue?
 
  • Verified answer
    Community member Profile Picture
    Community member 21 on at
    The request passed to the service is not valid
    We were using an OUN that didn't have access to the database.
  • Community member Profile Picture
    Community member 21 on at
    The request passed to the service is not valid
    Hi 
     
    Thanks for the reply.
     
    I am passing the api-version ... /Commerce/Customers('2001')/GetOrderHistory?$top=10&api-version=7.3
     
    If I pass it or not I still get a bad request error... The request passed to the service is not valid
  • Shafeeque P. Profile Picture
    Shafeeque P. 6,508 Super User 2024 Season 2 on at
    The request passed to the service is not valid
    There was a similar question in the forum which was answered. Looks like you have to pass the API version as well.  Could you please check if the below would work. 
     

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,056 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans