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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Suggested Answer

Postman for testing F&O integration

(0) ShareShare
ReportReport
Posted on by

Hi guys,

New learner for F&O API, currently I'm setting up Postman for my Custom Service testing and need help for clarification:

1. I have succeeded to GetAccessToken in Postman, something like this: 

pastedimage1663160448144v1.png

2. Now as I'm creating new Request for my testing it self, I confuse on how to put the "Bearer token" that required because it looks like it doesn't recognized my variable ->

pastedimage1663160608027v2.png

The blog that I'm following is told me to set environment variable in that GetAccessToken (in Test section), with this command: 

var jsonData = JSON.parse(responseBody)
postman.setEnvironmentVariable("bearer_token", jsonData.access_token)

But actually, when I type the 2nd statement "postman." it didn't give me options for "SetEnvironmentVariable", so I manually type it. Then run this request again (hit button "Send")

But as the point no 2 said, the "bearer_token" still unrecognized. There is a button in the pop up window to "Add new variable" but still hesitate to try it, since in that blog never mentioned that.

Anyone can help where I did some mistake or missed ?

Thanks

I have the same question (0)
  • Suggested answer
    huijij Profile Picture
    19,811 on at

    Hi VoltesDev,

    You must add body elements as request parameters that refer to the environment variables that you created earlieron the Body tab.And you can debug the code to see if it can access.Or you can manually add bearer_token parameter on the tests tab and click send button to see if it can help.

  • VoltesDev Profile Picture
    on at

    Hi Judy,

    Can you help to guide me what are the step actually? For example: at first place how to set Environment Variable from the 1st request (Get Access Token)? Is my code that I put in here is correct? and then how and where exactly to use it for the 2nd request which is the process that will affect F&O, in this case my 2nd request is Create PO.

    FYI, currently the testing is works already, means my CreatePO request from Postman is works. Only currently I'm manually copy the access_token from the 1st request GetAccessToken) and then manually paste to my 2nd request: my service of create PO, I paste it in Tab Authorization.

    pastedimage1663236381138v1.png

    Thanks,

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Siv Sagar Profile Picture

Siv Sagar 283 Super User 2025 Season 2

#2
Laurens vd Tang Profile Picture

Laurens vd Tang 213 Super User 2025 Season 2

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 152 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans