{
  "info": {
    "_postman_id": "739f0a4a-58b4-4627-9b43-d27c1f4a7d55",
    "name": "CMS Blue Button API Sandbox",
    "description": "To use this Postman collection to query the Blue Button Sandbox, follow the instructions below.\n\n1. Create a Sandbox account and application by following the instructions in the [Blue Button developer documentation](https://bluebutton.cms.gov/developers/#getting-started-in-the-developer-sandbox). When configuring your Sandbox application:\n    1. Choose \"Yes\" for the question, \"Does your application need to collect beneficiary demographic information (Name, address, date of birth, race, and sex)?\"\n        \n    2. Enter the following URLs into the **Callback URLs / Redirect URIs** field, separated by a carriage return:\n        1. `https://oauth.pstmn.io/v1/callback`\n            \n        2. `https://oauth.pstmn.io/v1/browser-callback`\n            \n2. Select the top-level folder in this Postman collection (**CMS Blue Button API Sandbox**).\n    \n3. Select the **Variables** tab.\n    \n4. Copy the **Client ID** and **Client Secret** from your Sandbox application into both the **Initial Value** and **Current Value** cels for the corresponding Postman variables (`clientId` and `clientSecret`).\n    \n5. Select the **Auth** tab.\n    \n6. Click **Get New Access Token**.\n    \n7. A Medicare login screen will open. Enter the username and password for a Sandbox synthetic user account (e.g., user = \"BBUser00000\" and password = \"PW00000!\"), and click **Log in**.\n    \n8. Click **Connect**.\n    \n9. Click **Use Token**.\n    \n10. Make any desired Blue Button API calls under the **Patient**, **Explanation Of Benefit**, and **Coverage** folders.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "_exporter_id": "17161995",
    "_collection_link": "https://adhoc-pan.postman.co/workspace/Blue-Button-2.0~f5966132-7453-4559-ba60-1a72942353e2/collection/17161995-739f0a4a-58b4-4627-9b43-d27c1f4a7d55?action=share&source=collection_link&creator=17161995"
  },
  "item": [
    {
      "name": "Patient",
      "item": [
        {
          "name": "Search Patient",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v2/fhir/Patient/",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v2",
                "fhir",
                "Patient",
                ""
              ],
              "query": [
                {
                  "key": "identifier",
                  "value": "",
                  "description": "The patient identifier to search for",
                  "disabled": true
                },
                {
                  "key": "_lastUpdated",
                  "value": "",
                  "description": "Include resources last updated in the given range",
                  "disabled": true
                },
                {
                  "key": "startIndex",
                  "value": "",
                  "description": "The offset used for result pagination",
                  "disabled": true
                },
                {
                  "key": "_has:Coverage",
                  "value": "",
                  "description": "Part D coverage type/year",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "The cursor used for result pagination",
                  "disabled": true
                },
                {
                  "key": "_id",
                  "value": "",
                  "description": "The patient identifier to search for",
                  "disabled": true
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Read Patient",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v2/fhir/Patient/:resource_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v2",
                "fhir",
                "Patient",
                ":resource_id"
              ],
              "variable": [
                {
                  "key": "resource_id",
                  "value": "",
                  "description": "(Required) Pateint FHIR resource id, e.g. -20140000000001 (synthetic beneficiary)"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Explanation Of Benefit",
      "item": [
        {
          "name": "Search Explanation Of Benefits",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v2/fhir/ExplanationOfBenefit/",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v2",
                "fhir",
                "ExplanationOfBenefit",
                ""
              ],
              "query": [
                {
                  "key": "patient",
                  "value": "",
                  "description": "The patient identifier to search for",
                  "disabled": true
                },
                {
                  "key": "_lastUpdated",
                  "value": "",
                  "description": "Include resources last updated in the given range",
                  "disabled": true
                },
                {
                  "key": "excludeSAMHSA",
                  "value": "",
                  "description": "If true, exclude all SAMHSA-related resources",
                  "disabled": true
                },
                {
                  "key": "service-date",
                  "value": "",
                  "description": "Include resources that completed in the given range",
                  "disabled": true
                },
                {
                  "key": "startIndex",
                  "value": "",
                  "description": "The offset used for result pagination",
                  "disabled": true
                },
                {
                  "key": "type",
                  "value": "",
                  "description": "A list of claim types to include",
                  "disabled": true
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Read Explanation Of Benefits",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v2/fhir/ExplanationOfBenefit/:resource_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v2",
                "fhir",
                "ExplanationOfBenefit",
                ":resource_id"
              ],
              "variable": [
                {
                  "key": "resource_id",
                  "value": "",
                  "description": "(Required) ExplanationOfBenefit FHIR resource id, e.g. pde--105966977"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Coverage",
      "item": [
        {
          "name": "Search Coverage",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v2/fhir/Coverage/",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v2",
                "fhir",
                "Coverage",
                ""
              ],
              "query": [
                {
                  "key": "beneficiary",
                  "value": "",
                  "description": "The patient identifier to search for",
                  "disabled": true
                },
                {
                  "key": "_lastUpdated",
                  "value": "",
                  "description": "Include resources last updated in the given range",
                  "disabled": true
                },
                {
                  "key": "startIndex",
                  "value": "",
                  "description": "The offset used for result pagination",
                  "disabled": true
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Read Coverage",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v2/fhir/Coverage/:resource_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v2",
                "fhir",
                "Coverage",
                ":resource_id"
              ],
              "variable": [
                {
                  "key": "resource_id",
                  "value": "",
                  "description": "(Required) Coverage FHIR resource id, e.g. part-a--20140000000001"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "FHIR Metadata",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/v2/fhir/metadata",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "v2",
            "fhir",
            "metadata"
          ]
        }
      },
      "response": []
    },
    {
      "name": "OpenID Configuration",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/.well-known/openid-configuration-v2",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            ".well-known",
            "openid-configuration-v2"
          ]
        }
      },
      "response": []
    },
    {
      "name": "OpenID Connect UserInfo",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/v2/connect/userinfo",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "v2",
            "connect",
            "userinfo"
          ]
        }
      },
      "response": []
    }
  ],
  "auth": {
    "type": "oauth2",
    "oauth2": [
      {
        "key": "accessTokenUrl",
        "value": "{{baseUrl}}/v2/o/token/",
        "type": "string"
      },
      {
        "key": "authUrl",
        "value": "{{baseUrl}}/v2/o/authorize/",
        "type": "string"
      },
      {
        "key": "state",
        "value": "1234567890abcdefghijklmnopqrstuvwxyz",
        "type": "string"
      },
      {
        "key": "grant_type",
        "value": "authorization_code_with_pkce",
        "type": "string"
      },
      {
        "key": "redirect_uri",
        "value": "https://oauth.pstmn.io/v1/callback",
        "type": "string"
      },
      {
        "key": "scope",
        "value": "patient/Patient.rs patient/Coverage.rs patient/ExplanationOfBenefit.rs profile",
        "type": "string"
      },
      {
        "key": "tokenName",
        "value": "Token-BBUser",
        "type": "string"
      },
      {
        "key": "client_authentication",
        "value": "body",
        "type": "string"
      },
      {
        "key": "tokenType",
        "value": "Bearer",
        "type": "string"
      },
      {
        "key": "accessToken",
        "value": "4nGzmTX0WkKgKL2De8ZfbShm6UKW8D",
        "type": "string"
      },
      {
        "key": "challengeAlgorithm",
        "value": "S256",
        "type": "string"
      },
      {
        "key": "clientSecret",
        "value": "{{clientSecret}}",
        "type": "string"
      },
      {
        "key": "clientId",
        "value": "{{clientId}}",
        "type": "string"
      },
      {
        "key": "addTokenTo",
        "value": "header",
        "type": "string"
      }
    ]
  },
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "type": "text/javascript",
        "requests": {},
        "exec": [
          ""
        ]
      }
    },
    {
      "listen": "test",
      "script": {
        "type": "text/javascript",
        "requests": {},
        "exec": [
          ""
        ]
      }
    }
  ],
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://sandbox.bluebutton.cms.gov"
    },
    {
      "key": "clientId",
      "value": ""
    },
    {
      "key": "clientSecret",
      "value": ""
    }
  ]
}