{
  "openapi": "3.1.0",
  "info": {
    "title": "InPlan API",
    "version": "1.0.0",
    "summary": "Is this provider in this plan? Plan by plan, with the source type and date behind every answer.",
    "description": "InPlan answers in-network questions for any US NPI across ACA Marketplace and Medicare Advantage plans.\n\n**The answer contract.** `in_network: true` means the insurer's network directory lists the provider for that plan; `evidence` shows each listing with its source type and as-of date. `in_network: null` with `answer: not_found` means no listing was found in current directory data. It is not a statement that the provider is out of network. `false` is reserved for an explicit exclusion published by an insurer.\n\nNetwork directories change: confirm with the plan or the provider before care.\n\n**Envelope.** Every response carries `request_id`, `data_as_of` and `sources` (the types of data behind the answer, with dates). Errors are RFC 7807 `application/problem+json` with a short `type` (resolved against https://inplan.io/docs/errors).\n\n**Plans.** free: 500 calls/month, 2 req/s; builder: 25,000 calls/month, 10 req/s; growth: 150,000 calls/month, 25 req/s; scale: 2,000,000 calls/month, 60 req/s. Batch needs Builder+; plan->providers search needs Growth+. The monthly quota belongs to the account and is shared by all its keys; per-second limits apply per key. Over-quota calls are blocked (429), never billed.",
    "contact": {
      "name": "InPlan",
      "email": "contact@inplan.io",
      "url": "https://inplan.io"
    },
    "termsOfService": "https://inplan.io/terms"
  },
  "servers": [
    {
      "url": "https://api.inplan.io"
    }
  ],
  "security": [
    {
      "bearer": []
    }
  ],
  "tags": [
    {
      "name": "Providers",
      "description": "Provider identity and every plan that lists them."
    },
    {
      "name": "Check",
      "description": "The in-network answer for (provider, plan) pairs."
    },
    {
      "name": "Plans",
      "description": "Plan details and providers listed by a plan."
    },
    {
      "name": "Coverage",
      "description": "What the data covers, with freshness."
    },
    {
      "name": "Status",
      "description": "Health and data freshness (public)."
    }
  ],
  "paths": {
    "/v1/providers/{npi}": {
      "get": {
        "tags": [
          "Providers"
        ],
        "operationId": "getProvider",
        "summary": "Provider profile + plan summary",
        "description": "Identity (name, credential, specialties, practice locations, groups, facility affiliations) from national provider registry records, with counts of the ACA and MA plans that list the provider. Providers who asked us to hide their contact details have street address and phone set to null. No honorifics are added: the credential is returned as published.",
        "parameters": [
          {
            "name": "npi",
            "in": "path",
            "required": true,
            "description": "10-digit National Provider Identifier (check digit validated).",
            "schema": {
              "type": "string",
              "pattern": "^[12]\\d{9}$"
            },
            "example": "1376006148"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per second allowed for this key.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Tokens left in the per-second bucket.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the bucket refills.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Quota-Limit": {
                "description": "Calls included this month for the account (shared by all its keys).",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Quota-Remaining": {
                "description": "Calls left this month for the account.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Quota-Reset": {
                "description": "Unix time the monthly quota resets (1st of next month, UTC).",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Request-Id": {
                "description": "Unique id of this request; quote it to support.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderResponse"
                },
                "example": {
                  "request_id": "req_BOeRDH14HHeUee0y",
                  "data_as_of": "2026-10-29",
                  "data": {
                    "npi": "1376006148",
                    "profile_found": true,
                    "name": {
                      "first": "Samantha",
                      "middle": "Newing",
                      "last": "Beard",
                      "suffix": null,
                      "display": "Samantha N. Beard, DO"
                    },
                    "credential": "DO",
                    "gender": "female",
                    "status": "active",
                    "specialties": [
                      {
                        "name": "Family Practice",
                        "primary": true
                      }
                    ],
                    "education": {
                      "medical_school": "Other",
                      "graduation_year": 2019
                    },
                    "locations": [
                      {
                        "address_line_1": "111 Riddle Rd",
                        "address_line_2": null,
                        "city": "North Wilkesboro",
                        "state": "NC",
                        "zip": "28659",
                        "phone": "3369211362",
                        "latitude": 36.210709561592,
                        "longitude": -81.057138227069,
                        "group": {
                          "name": "Wake Forest University Health Sciences",
                          "pac_id": "4486564952"
                        },
                        "telehealth": true
                      }
                    ],
                    "groups": [
                      {
                        "name": "Wake Forest University Health Sciences",
                        "pac_id": "4486564952",
                        "members": 2645
                      }
                    ],
                    "affiliations": [
                      {
                        "facility_type": "Home health agency",
                        "ccn": "347043",
                        "name": null,
                        "city": null,
                        "state": null
                      },
                      {
                        "facility_type": "Hospital",
                        "ccn": "340047",
                        "name": "North Carolina Baptist Hospital",
                        "city": "Winston-Salem",
                        "state": "NC"
                      },
                      {
                        "facility_type": "Hospital",
                        "ccn": "340064",
                        "name": "Wilkes Regional Medical Center",
                        "city": "North Wilkesboro",
                        "state": "NC"
                      }
                    ],
                    "privacy": {
                      "contact_masked": false
                    },
                    "plan_summary": {
                      "aca": {
                        "plans": 199,
                        "issuers": 8,
                        "states": [
                          "GA",
                          "NC",
                          "SC",
                          "TN"
                        ],
                        "plan_years": [
                          2025,
                          2026,
                          2027
                        ],
                        "as_of": "2026-10-29"
                      },
                      "ma": {
                        "plans": 146,
                        "organizations": 4,
                        "plan_years": [
                          2027,
                          null
                        ],
                        "accepting_new_patients_any": true,
                        "as_of": "2026-10-29"
                      }
                    },
                    "links": {
                      "plans": "/v1/providers/1376006148/plans"
                    }
                  },
                  "sources": [
                    {
                      "type": "provider_registry",
                      "description": "National provider registry and practice records",
                      "as_of": "2026-10-29"
                    },
                    {
                      "type": "insurer_directory",
                      "description": "Provider network directories published by health insurers",
                      "as_of": "2026-10-29"
                    },
                    {
                      "type": "plan_catalog",
                      "description": "Published health plan catalogs",
                      "as_of": "2026-10-28"
                    },
                    {
                      "type": "plan_directory",
                      "description": "Provider network directories published by Medicare Advantage plans",
                      "as_of": "2026-10-29"
                    }
                  ],
                  "notes": [
                    "Network directories change. Confirm with the plan or the provider before care."
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input (bad NPI check digit, unknown plan id format, bad parameter).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed, unknown or revoked API key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Plan does not include this endpoint, account suspended, or demo-key restriction.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "No provider found for this NPI.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Per-second rate limit or monthly quota exceeded. See Retry-After.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "Busy, paused, or a lookup timed out. Retry after Retry-After seconds.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/providers/{npi}/plans": {
      "get": {
        "tags": [
          "Providers"
        ],
        "operationId": "listProviderPlans",
        "summary": "Every plan that lists the provider",
        "parameters": [
          {
            "name": "npi",
            "in": "path",
            "required": true,
            "description": "10-digit National Provider Identifier (check digit validated).",
            "schema": {
              "type": "string",
              "pattern": "^[12]\\d{9}$"
            },
            "example": "1376006148"
          },
          {
            "name": "market",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "aca",
                "ma"
              ]
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "ACA: plan state. MA: plan service-area state.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Z]{2}$"
            }
          },
          {
            "name": "year",
            "in": "query",
            "schema": {
              "type": "integer",
              "example": 2026
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 500,
              "maximum": 2000
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per second allowed for this key.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Tokens left in the per-second bucket.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the bucket refills.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Quota-Limit": {
                "description": "Calls included this month for the account (shared by all its keys).",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Quota-Remaining": {
                "description": "Calls left this month for the account.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Quota-Reset": {
                "description": "Unix time the monthly quota resets (1st of next month, UTC).",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Request-Id": {
                "description": "Unique id of this request; quote it to support.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderPlansResponse"
                },
                "example": {
                  "request_id": "req_972JsFDC1rIfATQv",
                  "data_as_of": "2026-10-29",
                  "data": {
                    "npi": "1376006148",
                    "provider_states": [
                      "NC"
                    ],
                    "filters": {
                      "market": null,
                      "state": null,
                      "year": null
                    },
                    "total": 345,
                    "counts": {
                      "aca": 199,
                      "ma": 146
                    },
                    "offset": 0,
                    "limit": 2,
                    "next_offset": 2,
                    "plans": [
                      {
                        "market": "ma",
                        "plan_id": "H3404-003-001",
                        "plan_year": 2027,
                        "plan_name": "Blue Medicare PPO Enhanced (PPO)",
                        "organization": "Blue Cross and Blue Shield of North Carolina",
                        "plan_type": "PPO",
                        "snp": {
                          "is_snp": false,
                          "type": "Not Applicable"
                        },
                        "service_area_states": [
                          "NC"
                        ],
                        "accepting_new_patients": true,
                        "provider_kind": "practitioner",
                        "taxonomy": "207Q00000X",
                        "plan_details_available": true,
                        "source": {
                          "type": "plan_directory",
                          "as_of": "2026-10-29"
                        },
                        "provider_state_in_service_area": true
                      }
                    ]
                  },
                  "sources": [
                    {
                      "type": "insurer_directory",
                      "description": "Provider network directories published by health insurers",
                      "as_of": "2026-10-29"
                    },
                    {
                      "type": "plan_catalog",
                      "description": "Published health plan catalogs",
                      "as_of": "2026-10-28"
                    },
                    {
                      "type": "plan_directory",
                      "description": "Provider network directories published by Medicare Advantage plans",
                      "as_of": "2026-10-29"
                    }
                  ],
                  "notes": [
                    "Network directories change. Confirm with the plan or the provider before care.",
                    "A plan's network can include providers outside the plan's service area. Compare service_area_states with the provider's location."
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input (bad NPI check digit, unknown plan id format, bad parameter).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed, unknown or revoked API key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Plan does not include this endpoint, account suspended, or demo-key restriction.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Unknown NPI.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Per-second rate limit or monthly quota exceeded. See Retry-After.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "Busy, paused, or a lookup timed out. Retry after Retry-After seconds.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/check": {
      "get": {
        "tags": [
          "Check"
        ],
        "operationId": "check",
        "summary": "Is this provider in this plan?",
        "parameters": [
          {
            "name": "npi",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "1376006148"
          },
          {
            "name": "plan_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "17414NC0010004"
          },
          {
            "name": "year",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per second allowed for this key.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Tokens left in the per-second bucket.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the bucket refills.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Quota-Limit": {
                "description": "Calls included this month for the account (shared by all its keys).",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Quota-Remaining": {
                "description": "Calls left this month for the account.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Quota-Reset": {
                "description": "Unix time the monthly quota resets (1st of next month, UTC).",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Request-Id": {
                "description": "Unique id of this request; quote it to support.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckResponse"
                },
                "example": {
                  "request_id": "req_ydW_z-h4JpPuf5aR",
                  "data_as_of": "2026-08-12",
                  "data": {
                    "npi": "1376006148",
                    "plan_id": "17414NC0010004",
                    "input_plan_id": "17414NC0010004",
                    "market": "aca",
                    "plan_years_listed": [
                      2026,
                      2025
                    ],
                    "in_network": true,
                    "answer": "listed",
                    "explanation": "The insurer's network directory lists this provider for this plan.",
                    "evidence": [
                      {
                        "plan_id": "17414NC0010004",
                        "plan_year": 2026,
                        "network_tier": "PREFERRED",
                        "source": {
                          "type": "insurer_directory",
                          "as_of": "2026-08-12"
                        }
                      },
                      {
                        "plan_id": "17414NC0010004",
                        "plan_year": 2025,
                        "network_tier": "PREFERRED",
                        "source": {
                          "type": "insurer_directory",
                          "as_of": "2026-08-12"
                        }
                      }
                    ],
                    "plan_year": 2026,
                    "plan": {
                      "plan_name": "AmeriHealth Caritas Next Bronze Essential + No Referrals",
                      "issuer": {
                        "id": "17414",
                        "name": "AmeriHealth Caritas Next"
                      },
                      "state": "NC",
                      "metal_level": "Bronze",
                      "plan_type": "HMO",
                      "variant": null
                    },
                    "source": {
                      "type": "insurer_directory",
                      "as_of": "2026-08-12"
                    },
                    "as_of": "2026-08-12"
                  },
                  "sources": [
                    {
                      "type": "insurer_directory",
                      "description": "Provider network directories published by health insurers",
                      "as_of": "2026-10-29"
                    },
                    {
                      "type": "plan_catalog",
                      "description": "Published health plan catalogs",
                      "as_of": "2026-10-28"
                    }
                  ],
                  "notes": [
                    "in_network=null means no listing was found in current directory data. It is not a statement that the provider is out of network.",
                    "Network directories change. Confirm with the plan or the provider before care."
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input (bad NPI check digit, unknown plan id format, bad parameter).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed, unknown or revoked API key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Plan does not include this endpoint, account suspended, or demo-key restriction.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Per-second rate limit or monthly quota exceeded. See Retry-After.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "Busy, paused, or a lookup timed out. Retry after Retry-After seconds.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/check/batch": {
      "post": {
        "tags": [
          "Check"
        ],
        "operationId": "checkBatch",
        "summary": "Up to 100 (npi, plan) pairs per call (Builder+)",
        "description": "Each accepted pair counts as one call against the account's monthly quota. Invalid pairs return a per-item `error` and cost nothing; a rejected request (more than 100 pairs, invalid body) costs nothing.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchRequest"
              },
              "example": {
                "items": [
                  {
                    "npi": "1376006148",
                    "plan_id": "17414NC0010004"
                  },
                  {
                    "npi": "1376006148",
                    "plan_id": "H3404-003-001"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per second allowed for this key.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Tokens left in the per-second bucket.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the bucket refills.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Quota-Limit": {
                "description": "Calls included this month for the account (shared by all its keys).",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Quota-Remaining": {
                "description": "Calls left this month for the account.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Quota-Reset": {
                "description": "Unix time the monthly quota resets (1st of next month, UTC).",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Request-Id": {
                "description": "Unique id of this request; quote it to support.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResponse"
                },
                "example": {
                  "request_id": "req_zSVmOxxotapJK2OO",
                  "data_as_of": "2026-10-29",
                  "data": {
                    "count": 3,
                    "summary": {
                      "listed": 2,
                      "not_found": 1,
                      "invalid": 0
                    },
                    "results": [
                      {
                        "index": 0,
                        "npi": "1376006148",
                        "plan_id": "17414NC0010004",
                        "input_plan_id": "17414NC0010004",
                        "market": "aca",
                        "plan_years_listed": [
                          2026,
                          2025
                        ],
                        "in_network": true,
                        "answer": "listed",
                        "explanation": "The insurer's network directory lists this provider for this plan.",
                        "evidence": [
                          {
                            "plan_id": "17414NC0010004",
                            "plan_year": 2026,
                            "network_tier": "PREFERRED",
                            "source": {
                              "type": "insurer_directory",
                              "as_of": "2026-08-12"
                            }
                          },
                          {
                            "plan_id": "17414NC0010004",
                            "plan_year": 2025,
                            "network_tier": "PREFERRED",
                            "source": {
                              "type": "insurer_directory",
                              "as_of": "2026-08-12"
                            }
                          }
                        ],
                        "plan_year": 2026,
                        "plan": {
                          "plan_name": "AmeriHealth Caritas Next Bronze Essential + No Referrals",
                          "issuer": {
                            "id": "17414",
                            "name": "AmeriHealth Caritas Next"
                          },
                          "state": "NC",
                          "metal_level": "Bronze",
                          "plan_type": "HMO",
                          "variant": null
                        },
                        "source": {
                          "type": "insurer_directory",
                          "as_of": "2026-08-12"
                        },
                        "as_of": "2026-08-12"
                      },
                      {
                        "index": 1,
                        "npi": "1376006148",
                        "plan_id": "H3404-003-001",
                        "input_plan_id": "H3404-003-001",
                        "market": "ma",
                        "plan_years_listed": [
                          2027
                        ],
                        "in_network": true,
                        "answer": "listed",
                        "explanation": "The plan's network directory lists this provider for this plan.",
                        "evidence": [
                          {
                            "plan_id": "H3404-003-001",
                            "plan_year": 2027,
                            "accepting_new_patients": true,
                            "provider_kind": "practitioner",
                            "source": {
                              "type": "plan_directory",
                              "as_of": "2026-10-29"
                            }
                          }
                        ],
                        "plan_year": 2027,
                        "plan": {
                          "plan_name": "Blue Medicare PPO Enhanced (PPO)",
                          "organization": "Blue Cross and Blue Shield of North Carolina",
                          "plan_type": "PPO",
                          "service_area_states": [
                            "NC"
                          ]
                        },
                        "source": {
                          "type": "plan_directory",
                          "as_of": "2026-10-29"
                        },
                        "as_of": "2026-10-29"
                      },
                      {
                        "index": 2,
                        "npi": "1376006148",
                        "plan_id": "13262AR0230002",
                        "input_plan_id": "13262AR0230002",
                        "market": "aca",
                        "plan_years_listed": [],
                        "in_network": null,
                        "answer": "not_found",
                        "explanation": "No listing found in current directory data for this provider and plan.",
                        "evidence": [],
                        "plan_year": 2026,
                        "plan": {
                          "plan_name": "HA Silver AH",
                          "issuer": {
                            "id": "13262",
                            "name": "Health Advantage"
                          },
                          "state": "AR",
                          "metal_level": "Silver",
                          "plan_type": "POS",
                          "variant": null
                        },
                        "source": {
                          "type": "insurer_directory",
                          "as_of": "2026-10-28"
                        },
                        "as_of": "2026-10-28"
                      }
                    ]
                  },
                  "sources": [
                    {
                      "type": "insurer_directory",
                      "description": "Provider network directories published by health insurers",
                      "as_of": "2026-10-29"
                    },
                    {
                      "type": "plan_catalog",
                      "description": "Published health plan catalogs",
                      "as_of": "2026-10-28"
                    },
                    {
                      "type": "plan_directory",
                      "description": "Provider network directories published by Medicare Advantage plans",
                      "as_of": "2026-10-29"
                    }
                  ],
                  "notes": [
                    "in_network=null means no listing was found in current directory data. It is not a statement that the provider is out of network.",
                    "Network directories change. Confirm with the plan or the provider before care."
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input (bad NPI check digit, unknown plan id format, bad parameter).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed, unknown or revoked API key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Plan does not include this endpoint, account suspended, or demo-key restriction.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "413": {
            "description": "Body over 64 KB.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "Content-Type must be application/json.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Per-second rate limit or monthly quota exceeded. See Retry-After.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "Busy, paused, or a lookup timed out. Retry after Retry-After seconds.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/plans/{plan_id}": {
      "get": {
        "tags": [
          "Plans"
        ],
        "operationId": "getPlan",
        "summary": "Plan metadata and listing coverage",
        "parameters": [
          {
            "name": "plan_id",
            "in": "path",
            "required": true,
            "description": "Plan ID: 14 or 16 characters for marketplace plans (`12345NC0010001`, `12345NC0010001-01`), H1234-001-000 for Medicare Advantage.",
            "schema": {
              "type": "string"
            },
            "example": "17414NC0010004"
          },
          {
            "name": "year",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per second allowed for this key.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Tokens left in the per-second bucket.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the bucket refills.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Quota-Limit": {
                "description": "Calls included this month for the account (shared by all its keys).",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Quota-Remaining": {
                "description": "Calls left this month for the account.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Quota-Reset": {
                "description": "Unix time the monthly quota resets (1st of next month, UTC).",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Request-Id": {
                "description": "Unique id of this request; quote it to support.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanResponse"
                },
                "example": {
                  "request_id": "req_Lx6J2QQHt_898xS2",
                  "data_as_of": "2026-10-29",
                  "data": {
                    "market": "aca",
                    "plan_id": "17414NC0010004",
                    "plan_year": 2026,
                    "plan_name": "AmeriHealth Caritas Next Bronze Essential + No Referrals",
                    "issuer": {
                      "id": "17414",
                      "name": "AmeriHealth Caritas Next"
                    },
                    "state": "NC",
                    "metal_level": "Bronze",
                    "plan_type": "HMO",
                    "markets": [
                      "Individual"
                    ],
                    "network_id": "NCN001",
                    "variant_ids": [
                      "17414NC0010004-00",
                      "17414NC0010004-01",
                      "17414NC0010004-02",
                      "17414NC0010004-03"
                    ],
                    "plan_details_available": true,
                    "listings": {
                      "has_listings": true,
                      "as_of": "2026-08-12"
                    },
                    "variant": null,
                    "input_plan_id": "17414NC0010004",
                    "available_years": [
                      2026
                    ],
                    "links": {
                      "providers": "/v1/plans/17414NC0010004/providers",
                      "check": "/v1/check?plan_id=17414NC0010004&npi={npi}"
                    }
                  },
                  "sources": [
                    {
                      "type": "insurer_directory",
                      "description": "Provider network directories published by health insurers",
                      "as_of": "2026-10-29"
                    },
                    {
                      "type": "plan_catalog",
                      "description": "Published health plan catalogs",
                      "as_of": "2026-10-28"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input (bad NPI check digit, unknown plan id format, bad parameter).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed, unknown or revoked API key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Plan does not include this endpoint, account suspended, or demo-key restriction.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "No plan found for this id.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Per-second rate limit or monthly quota exceeded. See Retry-After.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "Busy, paused, or a lookup timed out. Retry after Retry-After seconds.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/plans/{plan_id}/providers": {
      "get": {
        "tags": [
          "Plans"
        ],
        "operationId": "listPlanProviders",
        "summary": "Providers listed by a Marketplace plan (Growth+)",
        "description": "Pages through the providers a plan lists. With filters a page may hold fewer than `limit` providers: follow `page.next_cursor` until null. Paging reaches the first 5,000 listings of a plan; full plan networks are available as Data Files. For Medicare Advantage plans use /v1/check or /v1/providers/{npi}/plans (this endpoint answers 501).",
        "parameters": [
          {
            "name": "plan_id",
            "in": "path",
            "required": true,
            "description": "Plan ID: 14 or 16 characters for marketplace plans (`12345NC0010001`, `12345NC0010001-01`), H1234-001-000 for Medicare Advantage.",
            "schema": {
              "type": "string"
            },
            "example": "17414NC0010004"
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "specialty",
            "in": "query",
            "description": "Case-insensitive substring of a specialty name, e.g. `cardio`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "zip",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^\\d{5}$"
            }
          },
          {
            "name": "radius",
            "in": "query",
            "description": "Miles from the zip centroid (1-100); needs `zip`.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "year",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 50,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per second allowed for this key.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Tokens left in the per-second bucket.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the bucket refills.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Quota-Limit": {
                "description": "Calls included this month for the account (shared by all its keys).",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Quota-Remaining": {
                "description": "Calls left this month for the account.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Quota-Reset": {
                "description": "Unix time the monthly quota resets (1st of next month, UTC).",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Request-Id": {
                "description": "Unique id of this request; quote it to support.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanProvidersResponse"
                },
                "example": {
                  "request_id": "req_GgjbLqa-jQP2a2qa",
                  "data_as_of": "2026-10-29",
                  "data": {
                    "plan_id": "17414NC0010004",
                    "plan_year": 2026,
                    "plan_name": "AmeriHealth Caritas Next Bronze Essential + No Referrals",
                    "issuer": {
                      "id": "17414",
                      "name": "AmeriHealth Caritas Next"
                    },
                    "filters": {
                      "state": null,
                      "zip": null,
                      "radius": null,
                      "specialty": null
                    },
                    "providers": [
                      {
                        "npi": "1003006503",
                        "name": "Olugbemiga E. Jegede, MD",
                        "credential": "MD",
                        "primary_specialty": "Internal Medicine",
                        "network_tiers": [
                          "PREFERRED"
                        ],
                        "locations": [
                          {
                            "city": "Greensboro",
                            "state": "NC",
                            "zip": "27405",
                            "distance_miles": null
                          },
                          {
                            "city": "Greensboro",
                            "state": "NC",
                            "zip": "27401",
                            "distance_miles": null
                          },
                          {
                            "city": "Greensboro",
                            "state": "NC",
                            "zip": "27406",
                            "distance_miles": null
                          }
                        ],
                        "profile_found": true
                      },
                      {
                        "npi": "1003009838",
                        "name": "Shruti V. Simha, M.D",
                        "credential": "M.D",
                        "primary_specialty": "Pediatric Medicine",
                        "network_tiers": [
                          "PREFERRED"
                        ],
                        "locations": [
                          {
                            "city": "Greensboro",
                            "state": "NC",
                            "zip": "27401",
                            "distance_miles": null
                          }
                        ],
                        "profile_found": true
                      },
                      {
                        "npi": "1003016999",
                        "name": "Patricia A. Hickling-Beckman, CNM",
                        "credential": "CNM",
                        "primary_specialty": "Certified Nurse Midwife (cnm)",
                        "network_tiers": [
                          "PREFERRED"
                        ],
                        "locations": [
                          {
                            "city": "Hickory",
                            "state": "NC",
                            "zip": "28602",
                            "distance_miles": null
                          }
                        ],
                        "profile_found": true
                      }
                    ],
                    "page": {
                      "limit": 3,
                      "rows_scanned": 3,
                      "scanned_through": 3,
                      "max_depth": 5000,
                      "next_cursor": "eyJvIjozLCJ5IjoyMDI2LCJwIjoiMTc0MTROQzAwMTAwMDQifQ"
                    },
                    "source": {
                      "type": "insurer_directory",
                      "as_of": "2026-08-12"
                    }
                  },
                  "sources": [
                    {
                      "type": "insurer_directory",
                      "description": "Provider network directories published by health insurers",
                      "as_of": "2026-10-29"
                    },
                    {
                      "type": "plan_catalog",
                      "description": "Published health plan catalogs",
                      "as_of": "2026-10-28"
                    },
                    {
                      "type": "provider_registry",
                      "description": "National provider registry and practice records",
                      "as_of": "2026-10-29"
                    }
                  ],
                  "notes": [
                    "With filters a page can hold fewer than `limit` providers. Follow next_cursor until it is null.",
                    "Network directories change. Confirm with the plan or the provider before care."
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input (bad NPI check digit, unknown plan id format, bad parameter).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed, unknown or revoked API key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Plan does not include this endpoint, account suspended, or demo-key restriction.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Per-second rate limit or monthly quota exceeded. See Retry-After.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "501": {
            "description": "Medicare Advantage plan id: use /v1/check or /v1/providers/{npi}/plans.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "Busy, paused, or a lookup timed out. Retry after Retry-After seconds.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/coverage": {
      "get": {
        "tags": [
          "Coverage"
        ],
        "operationId": "getCoverage",
        "summary": "Markets, states, insurers and plan counts with listings, with as-of dates",
        "parameters": [
          {
            "name": "market",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "aca",
                "ma"
              ]
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "example": "NC"
          },
          {
            "name": "year",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per second allowed for this key.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Tokens left in the per-second bucket.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the bucket refills.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Quota-Limit": {
                "description": "Calls included this month for the account (shared by all its keys).",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Quota-Remaining": {
                "description": "Calls left this month for the account.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Quota-Reset": {
                "description": "Unix time the monthly quota resets (1st of next month, UTC).",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Request-Id": {
                "description": "Unique id of this request; quote it to support.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CoverageResponse"
                },
                "example": {
                  "request_id": "req_2g-swWYlH2ZW3I1A",
                  "data_as_of": "2026-10-29",
                  "data": {
                    "filters": {
                      "market": null,
                      "state": "NC",
                      "year": null
                    },
                    "markets": [
                      "aca",
                      "ma"
                    ],
                    "summary": {
                      "aca": {
                        "2026": {
                          "states": 1,
                          "insurers": 5,
                          "plans": 89,
                          "as_of": "2026-10-29"
                        }
                      },
                      "ma": {
                        "2027": {
                          "states": 1,
                          "insurers": 5,
                          "plans": 68,
                          "as_of": "2026-10-29"
                        }
                      }
                    },
                    "rows": [
                      {
                        "market": "aca",
                        "state": "NC",
                        "insurer": "Ambetter of North Carolina",
                        "plan_year": 2026,
                        "plans": 29,
                        "as_of": null
                      },
                      {
                        "market": "aca",
                        "state": "NC",
                        "insurer": "AmeriHealth Caritas Next",
                        "plan_year": 2026,
                        "plans": 8,
                        "as_of": "2026-08-12"
                      },
                      {
                        "market": "aca",
                        "state": "NC",
                        "insurer": "Cigna Healthcare",
                        "plan_year": 2026,
                        "plans": 17,
                        "as_of": "2026-07-27"
                      }
                    ]
                  },
                  "sources": [
                    {
                      "type": "insurer_directory",
                      "description": "Provider network directories published by health insurers",
                      "as_of": "2026-10-29"
                    },
                    {
                      "type": "plan_catalog",
                      "description": "Published health plan catalogs",
                      "as_of": "2026-10-28"
                    },
                    {
                      "type": "plan_directory",
                      "description": "Provider network directories published by Medicare Advantage plans",
                      "as_of": "2026-10-29"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input (bad NPI check digit, unknown plan id format, bad parameter).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed, unknown or revoked API key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Plan does not include this endpoint, account suspended, or demo-key restriction.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Per-second rate limit or monthly quota exceeded. See Retry-After.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "Busy, paused, or a lookup timed out. Retry after Retry-After seconds.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/status": {
      "get": {
        "tags": [
          "Status"
        ],
        "operationId": "getStatus",
        "summary": "Health and data freshness (no key needed)",
        "security": [],
        "responses": {
          "200": {
            "description": "ok or degraded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse"
                },
                "example": {
                  "request_id": "req_Tww4o_dHvKtF2HUV",
                  "data_as_of": "2026-10-29",
                  "data": {
                    "status": "ok",
                    "api_enabled": true,
                    "version": "d470109",
                    "time": "2026-10-30T09:28:11.576Z",
                    "checks": {
                      "database": {
                        "ok": true,
                        "latency_ms": 0
                      },
                      "cache": {
                        "ok": true
                      }
                    },
                    "datasets": [
                      {
                        "type": "insurer_directory",
                        "description": "Provider network directories published by health insurers",
                        "as_of": "2026-10-29"
                      },
                      {
                        "type": "plan_directory",
                        "description": "Provider network directories published by Medicare Advantage plans",
                        "as_of": "2026-10-29"
                      },
                      {
                        "type": "provider_registry",
                        "description": "National provider registry and practice records",
                        "as_of": "2026-10-29"
                      },
                      {
                        "type": "plan_catalog",
                        "description": "Published health plan catalogs",
                        "as_of": "2026-10-28"
                      }
                    ]
                  },
                  "sources": [
                    {
                      "type": "insurer_directory",
                      "description": "Provider network directories published by health insurers",
                      "as_of": "2026-10-29"
                    },
                    {
                      "type": "plan_directory",
                      "description": "Provider network directories published by Medicare Advantage plans",
                      "as_of": "2026-10-29"
                    },
                    {
                      "type": "provider_registry",
                      "description": "National provider registry and practice records",
                      "as_of": "2026-10-29"
                    },
                    {
                      "type": "plan_catalog",
                      "description": "Published health plan catalogs",
                      "as_of": "2026-10-28"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "busy or paused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "ip_live_<40 chars>",
        "description": "Send `Authorization: Bearer ip_live_...`."
      }
    },
    "schemas": {
      "Problem": {
        "type": "object",
        "required": [
          "type",
          "title",
          "status",
          "request_id"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "Short problem type, e.g. busy, invalid_npi, invalid_plan_id, unauthorized, plan_upgrade_required, demo_restricted, rate_limited, quota_exceeded, not_found, plan_not_found, batch_too_large, timeout, not_implemented, depth_limit, internal_error."
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "detail": {
            "type": "string"
          },
          "instance": {
            "type": "string"
          },
          "request_id": {
            "type": "string"
          },
          "docs": {
            "type": "string",
            "format": "uri"
          }
        },
        "example": {
          "type": "invalid_npi",
          "title": "Invalid NPI",
          "status": 400,
          "detail": "\"1234567890\" fails the NPI check digit (Luhn with prefix 80840).",
          "instance": "/v1/providers/1234567890",
          "request_id": "req_x2B3...",
          "docs": "https://inplan.io/docs/errors#invalid_npi"
        }
      },
      "Source": {
        "type": "object",
        "description": "A type of data behind the answer, with the date it is current to.",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "insurer_directory",
              "plan_directory",
              "provider_registry",
              "plan_catalog"
            ]
          },
          "description": {
            "type": "string"
          },
          "as_of": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          }
        }
      },
      "Envelope": {
        "type": "object",
        "required": [
          "request_id",
          "data_as_of",
          "data",
          "sources"
        ],
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data_as_of": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "data": {
            "type": "object"
          },
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Source"
            }
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ListingSource": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "insurer_directory",
              "plan_directory"
            ]
          },
          "as_of": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "Date the directory data is current to."
          }
        }
      },
      "AcaPlanListing": {
        "type": "object",
        "properties": {
          "market": {
            "const": "aca"
          },
          "plan_id": {
            "type": "string"
          },
          "plan_year": {
            "type": "integer"
          },
          "plan_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "issuer": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "state": {
            "type": [
              "string",
              "null"
            ]
          },
          "metal_level": {
            "type": [
              "string",
              "null"
            ]
          },
          "plan_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "network_tiers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "plan_details_available": {
            "type": "boolean",
            "description": "true when plan name, metal level and plan type are included."
          },
          "source": {
            "$ref": "#/components/schemas/ListingSource"
          }
        }
      },
      "MaPlanListing": {
        "type": "object",
        "properties": {
          "market": {
            "const": "ma"
          },
          "plan_id": {
            "type": "string"
          },
          "plan_year": {
            "type": "integer"
          },
          "plan_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "organization": {
            "type": [
              "string",
              "null"
            ]
          },
          "plan_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "snp": {
            "type": [
              "object",
              "null"
            ]
          },
          "service_area_states": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "provider_state_in_service_area": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "accepting_new_patients": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "provider_kind": {
            "type": [
              "string",
              "null"
            ]
          },
          "taxonomy": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider taxonomy code listed with the network entry."
          },
          "plan_details_available": {
            "type": "boolean"
          },
          "source": {
            "$ref": "#/components/schemas/ListingSource"
          }
        }
      },
      "CheckResult": {
        "type": "object",
        "required": [
          "npi",
          "plan_id",
          "market",
          "in_network",
          "answer",
          "evidence",
          "source",
          "as_of"
        ],
        "properties": {
          "npi": {
            "type": "string"
          },
          "plan_id": {
            "type": "string",
            "description": "Normalized plan ID (14 characters for marketplace plans)."
          },
          "input_plan_id": {
            "type": "string"
          },
          "market": {
            "type": "string",
            "enum": [
              "aca",
              "ma"
            ]
          },
          "plan_year": {
            "type": [
              "integer",
              "null"
            ]
          },
          "in_network": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "true = the network directory lists the provider for this plan; null = no listing found in current directory data (not a statement that the provider is out of network)."
          },
          "answer": {
            "type": "string",
            "enum": [
              "listed",
              "not_found",
              "no_provider_network"
            ]
          },
          "plan_years_listed": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "explanation": {
            "type": "string"
          },
          "evidence": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "plan": {
            "type": [
              "object",
              "null"
            ]
          },
          "source": {
            "$ref": "#/components/schemas/ListingSource"
          },
          "as_of": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          }
        }
      },
      "BatchRequest": {
        "type": "object",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "items": {
              "type": "object",
              "required": [
                "npi",
                "plan_id"
              ],
              "properties": {
                "npi": {
                  "type": "string"
                },
                "plan_id": {
                  "type": "string"
                },
                "year": {
                  "type": "integer"
                }
              }
            }
          },
          "year": {
            "type": "integer",
            "description": "Default plan year for items without one."
          }
        }
      },
      "ProviderResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Envelope"
          }
        ]
      },
      "ProviderPlansResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Envelope"
          }
        ]
      },
      "CheckResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Envelope"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/CheckResult"
              }
            }
          }
        ]
      },
      "BatchResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Envelope"
          }
        ]
      },
      "PlanResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Envelope"
          }
        ]
      },
      "PlanProvidersResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Envelope"
          }
        ]
      },
      "CoverageResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Envelope"
          }
        ]
      },
      "StatusResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Envelope"
          }
        ]
      }
    }
  }
}