curl --request POST \
--url https://api.openloophealth.com/v0.1/medicare-id-lookups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subscriber": {
"first_name": "Jane",
"last_name": "Doe",
"date_of_birth": "1955-05-05",
"address": {
"state": "WI"
},
"suffix": "Jr",
"ssn": "123-45-6789"
}
}
'import requests
url = "https://api.openloophealth.com/v0.1/medicare-id-lookups"
payload = { "subscriber": {
"first_name": "Jane",
"last_name": "Doe",
"date_of_birth": "1955-05-05",
"address": { "state": "WI" },
"suffix": "Jr",
"ssn": "123-45-6789"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
subscriber: {
first_name: 'Jane',
last_name: 'Doe',
date_of_birth: '1955-05-05',
address: {state: 'WI'},
suffix: 'Jr',
ssn: '123-45-6789'
}
})
};
fetch('https://api.openloophealth.com/v0.1/medicare-id-lookups', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.openloophealth.com/v0.1/medicare-id-lookups",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'subscriber' => [
'first_name' => 'Jane',
'last_name' => 'Doe',
'date_of_birth' => '1955-05-05',
'address' => [
'state' => 'WI'
],
'suffix' => 'Jr',
'ssn' => '123-45-6789'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.openloophealth.com/v0.1/medicare-id-lookups"
payload := strings.NewReader("{\n \"subscriber\": {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"date_of_birth\": \"1955-05-05\",\n \"address\": {\n \"state\": \"WI\"\n },\n \"suffix\": \"Jr\",\n \"ssn\": \"123-45-6789\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.openloophealth.com/v0.1/medicare-id-lookups")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"subscriber\": {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"date_of_birth\": \"1955-05-05\",\n \"address\": {\n \"state\": \"WI\"\n },\n \"suffix\": \"Jr\",\n \"ssn\": \"123-45-6789\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openloophealth.com/v0.1/medicare-id-lookups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"subscriber\": {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"date_of_birth\": \"1955-05-05\",\n \"address\": {\n \"state\": \"WI\"\n },\n \"suffix\": \"Jr\",\n \"ssn\": \"123-45-6789\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"member_id": "1EG4TE5MK73",
"member_id_status": "CURRENT",
"variant": "MBILU",
"deduplicated": false,
"plan": {
"active": true,
"name": "PPO Gold",
"number": "<string>",
"insurance_type_code": "<string>",
"start_date": "2026-01-01",
"end_date": "2026-12-31",
"network_id": "<string>"
},
"payer": {
"id": "61101",
"name": "Aetna"
}
},
"request_id": "c1a7f3e2-5b9d-4a68-9f21-7d3c4b6e8a05"
}{
"error": {
"message": "An address in the forwarded chain is outside the United States, so the request was refused",
"error_code": "BAD_REQUEST"
},
"request_id": "c1a7f3e2-5b9d-4a68-9f21-7d3c4b6e8a05"
}{
"error": {
"message": "the token carries no organization",
"error_code": "AUTHENTICATION_ERROR"
},
"request_id": "c1a7f3e2-5b9d-4a68-9f21-7d3c4b6e8a05"
}{
"error": {
"message": "insufficient_permissions",
"error_code": "FORBIDDEN"
},
"request_id": "c1a7f3e2-5b9d-4a68-9f21-7d3c4b6e8a05"
}{
"error": {
"message": "No Medicare beneficiary matched the demographics supplied",
"error_code": "NOT_FOUND"
},
"request_id": "c1a7f3e2-5b9d-4a68-9f21-7d3c4b6e8a05"
}{
"error": {
"message": "Too many requests. Retry later.",
"error_code": "TOO_MANY_REQUESTS"
},
"request_id": "c1a7f3e2-5b9d-4a68-9f21-7d3c4b6e8a05"
}{
"error": {
"message": "Internal server error",
"error_code": "UNHANDLED_EXCEPTION"
},
"request_id": "c1a7f3e2-5b9d-4a68-9f21-7d3c4b6e8a05"
}{
"error": {
"message": "The request timed out. Try again.",
"error_code": "REQUEST_TIMEOUT"
},
"request_id": "c1a7f3e2-5b9d-4a68-9f21-7d3c4b6e8a05"
}Resolve a Medicare Beneficiary Identifier
Resolves a Medicare Beneficiary Identifier from a patient’s demographics, with a minimal coverage summary. Answered inline — there is nothing to poll, and the identifier is at data.member_id.
The organization comes from your access token’s organization claim; there is no body field or query parameter for it. A token carrying no claim is a 401.
subscriber.address.state is required on every request, the SSN-bearing variant included: it selects the OpenLoop entity that submits the lookup. The SSN alone chooses the variant — supplying one selects the higher-matching MBILU, omitting it selects MBILUNOSSN. Whichever answered comes back as variant.
A repeat inside four hours returns the stored answer with deduplicated: true. The window is longer than the five minutes the other endpoints use, because a Medicare identifier does not change hour to hour.
A 404 means no match, and no match is a normal outcome rather than a fault. It covers a payer no-match, a mismatch on date of birth or name, and Medicare Advantage patients, for whom no identifier exists to find. Retrying an unchanged 404 returns 404 again.
Not yet enabled on the production edge. This path appears in the reference but answers 404 against the production server, and there is no committed enablement date. Do not sequence a launch behind it — confirm status with your OLH implementation contact before designing against it.
Permissions: eligibility:write
curl --request POST \
--url https://api.openloophealth.com/v0.1/medicare-id-lookups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subscriber": {
"first_name": "Jane",
"last_name": "Doe",
"date_of_birth": "1955-05-05",
"address": {
"state": "WI"
},
"suffix": "Jr",
"ssn": "123-45-6789"
}
}
'import requests
url = "https://api.openloophealth.com/v0.1/medicare-id-lookups"
payload = { "subscriber": {
"first_name": "Jane",
"last_name": "Doe",
"date_of_birth": "1955-05-05",
"address": { "state": "WI" },
"suffix": "Jr",
"ssn": "123-45-6789"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
subscriber: {
first_name: 'Jane',
last_name: 'Doe',
date_of_birth: '1955-05-05',
address: {state: 'WI'},
suffix: 'Jr',
ssn: '123-45-6789'
}
})
};
fetch('https://api.openloophealth.com/v0.1/medicare-id-lookups', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.openloophealth.com/v0.1/medicare-id-lookups",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'subscriber' => [
'first_name' => 'Jane',
'last_name' => 'Doe',
'date_of_birth' => '1955-05-05',
'address' => [
'state' => 'WI'
],
'suffix' => 'Jr',
'ssn' => '123-45-6789'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.openloophealth.com/v0.1/medicare-id-lookups"
payload := strings.NewReader("{\n \"subscriber\": {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"date_of_birth\": \"1955-05-05\",\n \"address\": {\n \"state\": \"WI\"\n },\n \"suffix\": \"Jr\",\n \"ssn\": \"123-45-6789\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.openloophealth.com/v0.1/medicare-id-lookups")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"subscriber\": {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"date_of_birth\": \"1955-05-05\",\n \"address\": {\n \"state\": \"WI\"\n },\n \"suffix\": \"Jr\",\n \"ssn\": \"123-45-6789\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openloophealth.com/v0.1/medicare-id-lookups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"subscriber\": {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"date_of_birth\": \"1955-05-05\",\n \"address\": {\n \"state\": \"WI\"\n },\n \"suffix\": \"Jr\",\n \"ssn\": \"123-45-6789\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"member_id": "1EG4TE5MK73",
"member_id_status": "CURRENT",
"variant": "MBILU",
"deduplicated": false,
"plan": {
"active": true,
"name": "PPO Gold",
"number": "<string>",
"insurance_type_code": "<string>",
"start_date": "2026-01-01",
"end_date": "2026-12-31",
"network_id": "<string>"
},
"payer": {
"id": "61101",
"name": "Aetna"
}
},
"request_id": "c1a7f3e2-5b9d-4a68-9f21-7d3c4b6e8a05"
}{
"error": {
"message": "An address in the forwarded chain is outside the United States, so the request was refused",
"error_code": "BAD_REQUEST"
},
"request_id": "c1a7f3e2-5b9d-4a68-9f21-7d3c4b6e8a05"
}{
"error": {
"message": "the token carries no organization",
"error_code": "AUTHENTICATION_ERROR"
},
"request_id": "c1a7f3e2-5b9d-4a68-9f21-7d3c4b6e8a05"
}{
"error": {
"message": "insufficient_permissions",
"error_code": "FORBIDDEN"
},
"request_id": "c1a7f3e2-5b9d-4a68-9f21-7d3c4b6e8a05"
}{
"error": {
"message": "No Medicare beneficiary matched the demographics supplied",
"error_code": "NOT_FOUND"
},
"request_id": "c1a7f3e2-5b9d-4a68-9f21-7d3c4b6e8a05"
}{
"error": {
"message": "Too many requests. Retry later.",
"error_code": "TOO_MANY_REQUESTS"
},
"request_id": "c1a7f3e2-5b9d-4a68-9f21-7d3c4b6e8a05"
}{
"error": {
"message": "Internal server error",
"error_code": "UNHANDLED_EXCEPTION"
},
"request_id": "c1a7f3e2-5b9d-4a68-9f21-7d3c4b6e8a05"
}{
"error": {
"message": "The request timed out. Try again.",
"error_code": "REQUEST_TIMEOUT"
},
"request_id": "c1a7f3e2-5b9d-4a68-9f21-7d3c4b6e8a05"
}
