Postman Instructions to test Aptean Food and Beverage APIs

Article09/01/20242 min read

This topic describes the setup and initialization of Postman and the corresponding work instructions to test the released Aptean Food and Beverage APIs on your Business Central environment.

Prerequisites

  1. The latest version of Postman app can be downloaded here.
    1. Postman account (free or Gmail) must be created.

    2. Set up Workspace for Debugging and manual testing.

    3. Team creation is not mandatory.

  2. Get registration information to be able to authenticate by using OAuth against your Business Central Online environment or create one as described in the Microsoft documentation.
    1. Create an app registration using the instructions here.

    2. Setup the app registration using the instructions here.

    3. Start using OAuth in Postman API requests using the instructions here.

      Important

      Save the Client ID, Tenant ID and Secret for setup of the Postman environment variables as next steps.

Import and configure Postman Environment

  1. Download the latest version of Postman Aptean BC Environment Variables here.
    1. Select Import and import the Aptean BC.postman_environment.json file.
    2. Select the Aptean BC environment. Click the Environment quick look icon
    and then click Edit to set the current values for variables.

    3. Set your Domain or TenantID and your Environment name to be used as current value for URL.
    4. To be able to use the OAuth Authorization, set the earlier saved TenantID, ClientID and Secret of the app registration in the Postman Environment variables.
Note

For all example requests, these will now be used as the default values to authorize by using OAuth.

Using the Get New Access Token button, the Bearer Token should become available to be used in your requests.

Import Postman Requests Collection

  1. Download the latest version of Postman Aptean Inspection Status Requests Collection here.
    1. Import again and import the Aptean Inspection Status.postman_collection.json file. Open Collections to find all provided requests.
  2. Initialize your environment variables by running the GET Requests.
    1. Initialize Companies Environment Variables
    2. Initialize Lot Environment Variables
Important

Make sure to get a (new) Bearer Token for authentication as described in the previous steps to be able to send requests.

  1. Now it is possible to test all provided requests and see the response messages.
Important

When a PATCH, POST or DELETE request is sent, some lot environment variables must be re-initialized. In this case first send the Initialize Lot Environment Variables request again before proceeding with your tests.