Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV forum
Unanswered

Postman API - Path Parameters

Posted on by 5

Hi, 

So I can get my api to work using Postman

But trying to replicate it in NAV is where i'm getting a 404 error.

There is a Path Parameter I need to pass 

pastedimage1659436664644v1.png

Within NAV I tried assigning a value to a variable 'order_id' thus giving me a url of

pastedimage1659436802059v2.png

Even tried passing it to the header

pastedimage1659437014207v4.png

is there a HttpwebRequest I'm missing ?

Many thanks in advance for any replies

Categories:
  • PDiddy_ Profile Picture
    PDiddy_ 5 on at
    RE: Postman API - Path Parameters

    Hi Mahesh,

    I got a returned 404 not found

    Service URL: mp-api-prepod.kingfisher.com/.../tracking

    (PS... Thanks for Reply)

  • Mahesh U Profile Picture
    Mahesh U 425 on at
    RE: Postman API - Path Parameters

    Hi,

    Try adding the path variables at the end of URL

    Something like below

    mp-api-pre-prod.kingfisher.com/.../tracking

  • PDiddy_ Profile Picture
    PDiddy_ 5 on at
    RE: Postman API - Path Parameters

    Hi the url correct

    mp-api-pre-prod.kingfisher.com/.../tracking

    I will move the order around as suggested..

  • PDiddy_ Profile Picture
    PDiddy_ 5 on at
    RE: Postman API - Path Parameters

    Thanks for reply ..

    Yes I agree but I'm cannot see how to pass the order_id using HttpWebRequest

  • Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,744 Moderator on at
    RE: Postman API - Path Parameters

    The first i notice is that your base url in the code must be incorrect.

    That should probably end after /orders, you should verify that with the API documentation

    The second thing is that i would set the headers after you have added the body.

    Setting the body sometimes adds some default headers that you don't want there.

  • KTA Profile Picture
    KTA 1,200 on at
    RE: Postman API - Path Parameters

    In Postman you're setting that in param section but in your code you've moved it to header section

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,564 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,651 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans