Set up Postman for Model API

Set up Postman for Model API

Set up Postman for Model API

  • Create new Collection in Postman for model-api
  • Set Authorization for the collection to be Bearer Token. Assign token to be a global variable called {{model-api-token}}

  • Set up localhost environment

  • Set up global variables
    • Go to the eye in the upper right hand corner
    • under Globals, click Edit
    • Add a row for model-api-token

  • Add API call
    • In the left hand menu, Under the Model-API collection, add a new request. Example is below. You can include request parameters, request body, etc. to the request
    • In the upper right hand corner, select LocalHost as the environment

  • Next, we'll get an auth token from the web app.
    • Press F12 to open the developer console and navigate to the Network tab. The network tab will not start monitoring requests until the tab is open, so this has to be done first.
    • Click Log In with Fullcount, enter your username and password, and click Login. You'll see a series of network requests appear in the Network tab.
    • In the filter-search box at the top of the Network tab, type "token". Find and click into the POST request to {url}/authorization/oauth/token. Navigate to the network requests' Response tab.
    • Find the JSON field called "access_token". Right click and Copy Value.
    • Paste the access token into the Postman in model-api-token's Current Value.
    • Note that this access token will expire. So you have to update it regularly.
  • Run request by clicking on the Send button.

 

Alternatively, you can set up a Postman script to automatically make a login request and set model-api-token.

  • In a browser, open the developer tools and navigate to the network tab.
  • In the network tab, search the keyword "token". Find the Post request to {url}/authorization/oauth/token. Copy the entire URL
  • In Postman, create a new request. Select POST and paste the URL.
  • Go to the Scripts tab and paste the following code:

 

              

const response = pm.response.json();

 

 

              

const accessToken = response.access_token;

 

 

              

pm.globals.set("model-api-token", accessToken);

 

 

              

console.log("Access Token:", accessToken);

 

  • Run the request each time your login token expires

Setting up OAuth2 Token for Postman

  •  Under Authorization, select OAuth2.0

  • Set Header Prefix to Bearer
  • Set Grant Type to Authorization Code (With PKCE)

You can set all the values as variables if you want

Add 2 Auth Request URL Parameters, for the token make sure to use the community ID you want

User_type must be customer

 

 

 

 


    • Related Articles

    • Set up a New Developer Machine

      Set up a New Developer Machine Objectives Set up a Development environment for FullCount Developer from a clean Windows OS installation, after General FullCount tools and software has been added. Outline installation guidelines and additional setup ...
    • Axia Integration Set-Up

      Objectives Set-up Axia credit card integration Prerequisites Access to FullCount back office application Organization Id, API Token, and API ID for community's Axia instance Serial numbers of Axia terminals Instructions Under the Communities page, ...
    • PCC Integration Set-up

      PointClickCare (PCC) has developed a system that allows FullCount to access patient information from their system. This allows customers who utilize PCC to enter residents in their interface and have them be automatically entered into FullCount. ...
    • Online Ordering Set-Up

      Online Ordering Set-Up Objectives Set up online ordering for a new or existing customer Prerequisites Community already has resident portal. If they do not have resident portal, one will need to be set-up. Access to back office for the community ...
    • Internal API for PointClickCare access

      Objectives 1. Manually fetch full patient lists from an existing PointClickCare community to import into FullCount. Prerequisites Ability to make an HTTP request. Instructions will use Curl, but other options include PostMan or other online tools. ...