How-to use Buoy's Postman collection

Using the Buoy Postman Collection

Postman is a desktop and web application that allows you to send HTTP requests from a graphical user interface. We recommend using Postman to explore the Buoy API's functionality and troubleshoot any issues with your application.

Organizations with a client ID may import Buoy's Postman collection from the Postman API network.
Note: You will not be able to authorize through the Postman browser client. Please follow the directions below use the Buoy Postman collection through the Postman application.

👍

You must have a valid client-id before using Buoy's postman collection. To request a client-id or to learn more about Buoy's APIs, review our Overview.

Step one: Add the Buoy API Postman collection to your account

  1. Download the Postman app to your machine.
2414
  1. On the top middle search bar, search and select "Buoy Symptom Checker API (v2)". Right click on the collection and "Create a fork" in your own workspace.

Step two: Add your client-id as an environment variable and generate a Bearer token

  1. Ensure that the environment is set to "Buoy API Sandbox" in the top right corner
  2. Update the "CURRENT VALUE" for the auth_client_id variable in the Buoy Sandbox environment

❗️

Do not persist the client-id in the "INITIAL VALUE" field. Values populated in this column are uploaded to the Postman cloud. Additionally, Buoy recommends turning off the "Automatically persist variable values" setting.

  1. Select the "Buoy Symptom Checker API (v2)" collection on the left hand side
  2. If not already selected, choose the "Authorization" tab
  3. Scroll to the bottom and select "Get New Access Token"
  4. In the pop-up window, sign up for a new account or log in with an existing account (this account is specific to obtaining a Bearer token and is not the same as your documentation credentials)
  5. After obtaining a Bearer token, select the "Save" button in the top right corner

Step three: Select an endpoint

The easiest endpoint to start with is the "Interviews > Create anonymous" interview endpoint. Upon submitting a request, a new interview with a random age and sex will be started. Update the request if you would like to start a new interview with a specific age, sex, or location.

Step four: Send your request and review your response

Select the "Send" button. If everything was set up properly, you will receive a request with a new InterviewToken.

Quickly Navigating the Interview

Using a combination of "Tests" (aka Post-requests Scripts) and environment variables, you can quickly navigate the interview. "Tests" can save the various interview tokens to environment variables automatically. By default, Postman will save the InterviewToken, ComplaintToken, QuestionToken, and ResultToken. Additionally, Postman will select the first interpretation option associated with a complaint and the first answer option associated with a question. For answer options that require a time duration, the AnswerExtra variable will be populated with 24 (hours) by default. As needed, ensure that you are updating the InterpretationToken, AnswerToken, and AnswerExtra variables. A useful token timesaver is using the right click menu to set environment variables directly from the request or response (e.g. Right Click > "Set: Buoy API Sandbox" > Select the appropriate token).

If you are unsure of the next endpoint to call, view the console for a suggested next step. Note that the next step printed to the console may not always be accurate, especially if an invalid request was sent to an endpoint.