Skip to content

POST /checkProgramAvailability

  • Purpose: Determine whether the GLP-1 Weight-Loss Program is offered to a prospective patient.
  • Auth: Authorization: Bearer <access_token>
  • Content-Type: application/json
  • Idempotent: Yes (same input ⇒ same outcome).

Request body schema

Field Type Required Example Notes
zipCode string Yes "75035" 5-digit U.S. ZIP
insuranceType string Yes "Commercial" Enum: Commercial | Government | Medicare | Medicaid | SelfPay (confirm full list)
{
  "zipCode": "75035",
  "insuranceType": "Commercial"
}

Success response 200 OK — Program Available

{
    "data": {
        "cbos": [
            {
                "cboID": 1,
                "cbo_drugs": [
                    {
                        "cboDrugID": 1,
                        "cboID": 1,
                        "cboName": "Community Health Center 1",
                        "cboSubsidy": 2.0,
                        "cost": 20.0,
                        "description": "Used to lower cholesterol and reduce the risk of heart disease.",
                        "drugID": 1,
                        "drugName": "Atorvastatin (Lipitor)",
                        "manufacturerSubsidy": 2.0,
                        "status": "active"
                    },
                    {
                        "cboDrugID": 2,
                        "cboID": 1,
                        "cboName": "Community Health Center 2",
                        "cboSubsidy": 1.5,
                        "cost": 15.5,
                        "description": "Used to treat type 2 diabetes.",
                        "drugID": 2,
                        "drugName": "Metformin (Glucophage)",
                        "manufacturerSubsidy": 1.5,
                        "status": "active"
                    },
                    {
                        "cboDrugID": 3,
                        "cboID": 1,
                        "cboName": "Community Health Center 3",
                        "cboSubsidy": 1.2,
                        "cost": 12.0,
                        "description": "Used to treat high blood pressure and angina.",
                        "drugID": 3,
                        "drugName": "Amlodipine (Norvasc)",
                        "manufacturerSubsidy": 1.2,
                        "status": "active"
                    }
                ],
                "credentialedPrescriberNPIs": [
                    {
                        "NPI": "NPI002",
                        "name": "Jane Smith",
                        "prescriberID": 2
                    }
                ],
                "name": "Community Health Center 4",
                "pharmacies": [
                    {
                        "pharmacyID": 2,
                        "pharmacyName": "CHC Pharmacy 2"
                    },
                    {
                        "pharmacyID": 5,
                        "pharmacyName": "CHC Pharmacy 4"
                    }
                ]
            }
        ],
        "determinationReason": "Available",
        "eligible": true
    },
    "message": "Program is available",
    "success": true
}

Success response 200 OK — Program Unavailable due to Insurance Type

{
    "data": {
        "cbos": [],
        "eligible": false,
        "reason": "Unavailable due to insurance type"
    },
    "message": "Program is unavailable",
    "success": true
}

Example curl

curl --location 'https://api.bridgehealthhub.com/checkProgramAvailability' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '
{
    "zipCode": "75035",
    "insuranceType": "Commercial"
}'

Example python

import requests
import json

url = "https://api.bridgehealthhub.com/checkProgramAvailability"
payload = json.dumps({
  "zipCode": "75035",
  "insuranceType": "Commercial"
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': '••••••'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)

Example java

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "\n{\n    \"zipCode\": \"75035\",\n    \"insuranceType\": \"Commercial\"\n}");
Request request = new Request.Builder()
  .url("https://api.bridgehealthhub.com/checkProgramAvailability")
  .method("POST", body)
  .addHeader("Content-Type", "application/json")
  .addHeader("Authorization", "••••••")
  .build();
Response response = client.newCall(request).execute();

Example c#

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.bridgehealthhub.com/checkProgramAvailability");
request.Headers.Add("Authorization", "••••••");
var content = new StringContent("\n{\n    \"zipCode\": \"75035\",\n    \"insuranceType\": \"Commercial\"\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());

Success response 200 OK — Program Unavailable due to Zip Code

{
    "data": {
        "cbos": [],
        "eligible": false,
        "reason": "Unavailable due to zip code"
    },
    "message": "Program is unavailable",
    "success": true
}

Success response 200 OK — Program Unavailable due to BOTH Insurance Type and Zip Code

{
    "data": {
        "cbos": [],
        "eligible": false,
        "reason": "Unavailable due to zip code and Insurance Type"
    },
    "message": "Program is unavailable",
    "success": true
}

Error Responses for POST /checkProgramAvailability

400 Bad Request

This error occurs due to one or more required fields being missing or malformed

Example: Missing Zip Code
{
    "error": {
        "code": "BAD_REQUEST",
        "details": "Missing required fields: Patient Zip Code"
    },
    "message": "Bad request",
    "success": false
}

401 Unauthorized

This error occurs when there is a missing/invalid bearer token (see global Auth section).

404 Not Found

This error occurs when the endpoint path is incorrect and is presented as a standard 404 HTML/JSON response from the gateway.