Postman

Postman is a popular and capable platform for working with and testing APIs. While you are in the exploratory stage with the Shipwell API, we recommend Postman as a platform for familiarizing yourself with the various endpoints exposed through the API.

Installation

Install Postman on your computer. You can download Postman as a Chrome extension and a native application for Windows and Mac OSX, pick the installation that makes the most sense for your development environment and processes. Visit the Postman website, download the appropriate installation package, and install as instructed here.

Import postman collection

Collections are a group of API endpoints contained inside Postman. All collections save the latest response and header settings from each API call.

Shipwell allows users to download the latest API endpoints, even as all endpoints are backward compatible with the current version of your API.

  1. Download the Swagger specification for the latest version of Shipwell's API.
  1. Import the swagger file to Postman as a collection. Click Import > Import file, and select the swagger file downloaded in step one.

3) Verify that the collection imported by selecting the folder "Shipwell API."

Set up environment variables

Postman environments allow you to make specific variables against both the Production and Sandbox Environments. Creation of these two environments is ideal for quick testing. To set up a production and sandbox environment:

  1. In Postman, click the Cog icon at the top-right of the screen. The Manage Environments pop-up appears.
  2. Click Add.
  3. Name your environment. We recommend Shipwell - prod for production and *Shipwell - sandbox** for Sandbox.
  4. Enter the following environment variables for baseURL and authoerization_token, based on the environment you are creating. Substitute the values with your user token and API token, which you can find by authenticating.
Key TypeenvironmentbaseUrlauthorization_token
User based tokensandboxhttps://sandbox-api.shipwell.com/v2Token <YOUR_USER_TOKEN>
API based tokenproductionhttps://api.shipwell.com/v2APIkey <YOUR_API_TOKEN>

Repeat these steps for any environments you did not add.

Test Your Postman Environment

After you have set up an environment, you will want to test an endpoint.

  1. Navigate to the auth directory and find the auth/me.
  2. Navigate to the headers tab and use the authorization_token variable defined in your environment variables.
  1. Upon entering your environment variables, hit send. Postman returns all information involved with your user, including id, name, permissions, and other relevant information.
Copyright © Shipwell 2024. All right reserved.