From a Secured Endpoint

(note: This can only be done once confirmed that client ID provided to the xMart administrator has already been granted the rights to use the specific Mart tables data)

i. Launch Postman Application

ii. Add a new tab to test the API endpoint

Image showing location of the Add Tab button

iii. Choose “GET” method

iv. Type in the API endpoint of where you want to fetch the data from xMart

Image showing location of the API and the Get button

v. Click on the “Authorization” tab

vi. Choose from “Type” list “OAuth 2.0”

Image showing how to navigate to the OAuth 2.0 option

vii. Make sure the on the next window the “Add authorization data to” is in “Request Headers”

viii. Choose the necessary picks from the list and fill in the fields required on the tab “Configuration Options”

  1. Access Token: “Available Token”

  2. Header Prefix: “Bearer”
  3. Token Name: [Choose a name you prefer]

  4. Grant Type: “Client Credentials”

  5. Access Token URL: https://login.microsoftonline.com/f610c0b7-bd24-4b39-810b-3dc280afb590/oauth2/token

  6. Client ID: [Your app client ID that was given to the xMart Mart administrator]

  7. Client Secret: [Your client secret value for the client ID given]

  8. Scope: “api://b85362d6-c259-490b-bd51-c0a730011bef/odata”

  9. Client Authentication: “Send client credentials in body”

    Example:

Image showing how to fill in the fields in the Authorization tab

ix. On the tab “Advanced Options” fill the “Resource” field with value “b85362d6-c259-490b-bd51-c0a730011bef”

Image showing location of the Advanced Options tab

x. Click on “Get New Access Token”

Image showing location of the Get Access Token button

xi. On the next popup window click “proceed” or wait for it to automatically close

xii. On the “MANAGE ACCESS TOKEN” popup window, click “USE TOKEN” (This will copy the Access Token to the Authorization Access Token Field)

Image showing location of the Use Token button

(DO NOT REPLACE THE VALUE HERE BUT IF TOKEN EXPIRED PLEASE REPEAT FROM STEP 6 ONWARDS)

Image showing location of the Token filled in on the request form

xiii. Click on “Send” Button

Image showing location of the Send button

xiv. On the response window, you should receive a Status: 200 OK and the Response json

Image showing the response with data