Postman instructions to test Aptean Food and Beverage APIs

Article05/07/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 app 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 application 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 Labeling Requests Collection here.
    1. Import again and import the Aptean Labeling.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
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 POST request is sent, the body of the message should contain the correct data (the record to print should be available and a label setup should be present) before proceeding with your tests.