Postman Collection

Truv’s Postman collection lets you get started with Truv using little to no code.

Overview

The Truv Postman Collection offers a solution for getting started with your integration with little to no code needed. View the sections below for more on setting up and using Truv with Postman.

Setting up Postman

The section below covers each step for first configuring your Truv Postman Collection.

Steps

  1. Install Postman.
  2. Fork the Truv API collection. Run in Postman
  3. Navigate to the Environments tab. Select the appropriate environment for your integration.
  4. Use the Truv Dashboard to copy your credentials, the Client ID and Access secret.
  5. In Postman, add client_id and access_secret values to the environment variables.
  6. Confirm and save the values for your environment.

Configuring Postman

Follow the steps below with the appropriate credentials to begin configuring Postman for making requests to the Truv API. This setup uses alternative headers using Truv credentials to create valid requests.

Steps

  1. In Postman, open the Collections tab to proceed to Truv API.
  2. Navigate to the Authorization tab in the middle section.
  3. Confirm the Type field is set to API Key.
  4. Navigate to the Pre-request Script tab.
  5. Paste the following JavaScript code into the field.
pm.request.headers.add({  
    key: "X-Access-Client-Id",  
    value: pm.variables.get("client_id")  
});  
pm.request.headers.add({  
    key: "X-Access-Secret",  
    value: pm.variables.get("access_secret")  
});

If using environment variables in Postman, confirm the values are for the correct keys.

Making requests

Use the steps below to start making requests to the Truv API in Postman. The example below uses the Create a bridge token endpoint.

Steps

  1. In Postman, select Create a bridge token in the bridge-tokens folder in the Truv API collection.
  2. Navigate to the Body tab in the middle section.
  3. Select the form-data option below.
  4. Add a new Key with the name product_type.
  5. Add the specific product, such as income or employment, to the Value field.
  6. Select Send to complete the request.
  7. Refer to the Bridge Token reference page for more info.