List practices
/v1/practices
List the platform's practices, newest first. Available to platforms only. sort takes name or location (A to Z, practices without a location last), mode (without Live access, then with it) or created (oldest first); a _desc suffix reverses.
Request example
curl -X GET 'https://api.affinityrx.com/v1/practices' \
-H "Authorization: Bearer $AFFINITY_API_KEY" \
-H 'Affinity-Version: 2026-11-01'
Response example
These examples show the body structure. Values can differ. Select a status code to see its response.
{
"data": [
{
"id": "prac_01j2y8m6jcc9tt24af5pw9x1bc",
"name": "<string>",
"phone": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postalCode": "<string>"
},
"liveEnabled": false,
"createdAt": "2026-10-28T15:04:05.000Z",
"externalId": "<string>"
}
],
"hasMore": false,
"nextCursor": "<string>",
"object": "list",
"url": "<string>"
}
{
"code": "<string>",
"detail": "<string>",
"title": "<string>",
"type": "<string>",
"issues": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>",
"path": [
"<string>"
]
}
],
"instance": "<string>",
"requestId": "<string>",
"status": 400,
"traceId": "<string>"
}
{
"code": "<string>",
"detail": "<string>",
"title": "<string>",
"type": "<string>",
"issues": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>",
"path": [
"<string>"
]
}
],
"instance": "<string>",
"requestId": "<string>",
"status": 401,
"traceId": "<string>"
}
{
"code": "<string>",
"detail": "<string>",
"title": "<string>",
"type": "<string>",
"issues": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>",
"path": [
"<string>"
]
}
],
"instance": "<string>",
"requestId": "<string>",
"status": 403,
"traceId": "<string>"
}
{
"code": "<string>",
"detail": "<string>",
"title": "<string>",
"type": "<string>",
"issues": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>",
"path": [
"<string>"
]
}
],
"instance": "<string>",
"requestId": "<string>",
"status": 404,
"traceId": "<string>"
}
{
"code": "<string>",
"detail": "<string>",
"title": "<string>",
"type": "<string>",
"issues": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>",
"path": [
"<string>"
]
}
],
"instance": "<string>",
"requestId": "<string>",
"status": 429,
"traceId": "<string>",
"data": {
"retryAfterSeconds": 1
}
}
{
"code": "<string>",
"detail": "<string>",
"title": "<string>",
"type": "<string>",
"issues": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>",
"path": [
"<string>"
]
}
],
"instance": "<string>",
"requestId": "<string>",
"status": 500,
"traceId": "<string>"
}
{
"code": "<string>",
"detail": "<string>",
"title": "<string>",
"type": "<string>",
"issues": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>",
"path": [
"<string>"
]
}
],
"instance": "<string>",
"requestId": "<string>",
"status": 503,
"traceId": "<string>"
}
Implementation specification
Use these field types and limits to build your integration. Download the OpenAPI document for the complete contract.
Query parameters
limit
integer
Maximum records per page, from 1 to 100. Defaults to 25.
Minimum: 1
Maximum: 100
startingAfter
string
Page forward using the previous response's nextCursor. Keep the same filters, sort, organization and mode.
Maximum length: 2048
externalId
string
Match the external practice ID exactly, including case. Keep this filter unchanged while paging.
Minimum length: 1
Maximum length: 128
query
string
Find practices that match every word of this text, in any order. Case is ignored. The search reads the practice's name, external ID, city and state, and your platform's name. A word matches the start of a word in this text, or a part of the practice's name. A word of letters only that matches no word start can have typos: 1 from 4 letters, 2 from 6 letters. A word with a digit, such as a code, matches only as typed. A word of punctuation alone, such as &, matches only a name that contains it. A practice ID finds that practice. Results keep the order of sort. Restart pagination after changing query.
Maximum length: 120
sort
string
name and location sort A to Z; mode sorts practices without Live access before those with it; created sorts oldest first. A _desc suffix reverses the order. Defaults to created_desc. Missing locations sort last. Restart pagination after changing sort.
Allowed: "name", "name_desc", "location", "location_desc", "mode", "mode_desc", "created", "created_desc"
Headers
AuthorizationstringFor API key authentication, send Authorization: Bearer <key> with an active API key.
Affinity-Version
string
required
The dated API version this request is written against.
Pin requests to 2026-11-01.
Allowed: "2026-11-01"
Default: "2026-11-01"
Response specifications
200 OK
application/json
PracticeList
data
Practice[]
required
Show data fields
Array items · Practice
id
string
required
The public record identifier.
Pattern: ^prac_[0-7][0-9a-hjkmnp-tv-z]{25}$
name
string
required
The name.
phone
string | null
required
The contact phone number.
address
Address | null
required
The US mailing address.
Show address fields
Any of · 1: Address
line1
string
required
The street address.
line2
string | null
required
The apartment or suite, or null when there is none.
city
string
required
The city name.
state
string
required
The two-letter US state code.
postalCode
string
required
The US ZIP code.
Any of · 2: null
null
liveEnabled
boolean
required
Effective Live access. A managed practice requires both its own Live setting and its platform's Live access.
createdAt
string
required
When the record was created.
Format: date-time
externalId
string | null
required
Your practice identifier, unique among your platform's active practices, or null when unset.
hasMore
boolean
required
nextCursor
string | null
required
object
string
required
Allowed: "list"
url
string
required
400 Bad Request
application/problem+json
Problem
code
string
required
A stable code for the problem. Branch on it, not on detail.
detail
string
required
What went wrong and what to do, for a person to read.
title
string
required
A short summary of the problem's type.
type
string
required
A URI that names the problem's type.
issues
object[]
One entry for each field that the request got wrong, when the problem is about fields.
Show issues fields
Array items · object
code
string
required
A stable code for this field's problem.
field
string
required
The field as one string, such as patient.address.state or prescriptions[0].quantity.
message
string
required
What is wrong with the field and what to send, for a person to read.
path
string | integer[]
required
The field as a list of property names and array indexes.
Show path fields
Array items · string | integer
string | integer
instance
string
required
The path of the request.
requestId
string
required
Identifies the request, as its X-Request-Id header does. Send it when you report a problem.
status
integer
required
The HTTP status code of the response.
traceId
string
The request trace ID.
401 Unauthorized
application/problem+json
Problem
code
string
required
A stable code for the problem. Branch on it, not on detail.
detail
string
required
What went wrong and what to do, for a person to read.
title
string
required
A short summary of the problem's type.
type
string
required
A URI that names the problem's type.
issues
object[]
One entry for each field that the request got wrong, when the problem is about fields.
Show issues fields
Array items · object
code
string
required
A stable code for this field's problem.
field
string
required
The field as one string, such as patient.address.state or prescriptions[0].quantity.
message
string
required
What is wrong with the field and what to send, for a person to read.
path
string | integer[]
required
The field as a list of property names and array indexes.
Show path fields
Array items · string | integer
string | integer
instance
string
required
The path of the request.
requestId
string
required
Identifies the request, as its X-Request-Id header does. Send it when you report a problem.
status
integer
required
The HTTP status code of the response.
traceId
string
The request trace ID.
403 Forbidden
application/problem+json
Problem
code
string
required
A stable code for the problem. Branch on it, not on detail.
detail
string
required
What went wrong and what to do, for a person to read.
title
string
required
A short summary of the problem's type.
type
string
required
A URI that names the problem's type.
issues
object[]
One entry for each field that the request got wrong, when the problem is about fields.
Show issues fields
Array items · object
code
string
required
A stable code for this field's problem.
field
string
required
The field as one string, such as patient.address.state or prescriptions[0].quantity.
message
string
required
What is wrong with the field and what to send, for a person to read.
path
string | integer[]
required
The field as a list of property names and array indexes.
Show path fields
Array items · string | integer
string | integer
instance
string
required
The path of the request.
requestId
string
required
Identifies the request, as its X-Request-Id header does. Send it when you report a problem.
status
integer
required
The HTTP status code of the response.
traceId
string
The request trace ID.
404 Not Found
application/problem+json
Problem
code
string
required
A stable code for the problem. Branch on it, not on detail.
detail
string
required
What went wrong and what to do, for a person to read.
title
string
required
A short summary of the problem's type.
type
string
required
A URI that names the problem's type.
issues
object[]
One entry for each field that the request got wrong, when the problem is about fields.
Show issues fields
Array items · object
code
string
required
A stable code for this field's problem.
field
string
required
The field as one string, such as patient.address.state or prescriptions[0].quantity.
message
string
required
What is wrong with the field and what to send, for a person to read.
path
string | integer[]
required
The field as a list of property names and array indexes.
Show path fields
Array items · string | integer
string | integer
instance
string
required
The path of the request.
requestId
string
required
Identifies the request, as its X-Request-Id header does. Send it when you report a problem.
status
integer
required
The HTTP status code of the response.
traceId
string
The request trace ID.
429 Too Many Requests
application/problem+json
Problem429
All of · 1: Problem
code
string
required
A stable code for the problem. Branch on it, not on detail.
detail
string
required
What went wrong and what to do, for a person to read.
title
string
required
A short summary of the problem's type.
type
string
required
A URI that names the problem's type.
issues
object[]
One entry for each field that the request got wrong, when the problem is about fields.
Show issues fields
Array items · object
code
string
required
A stable code for this field's problem.
field
string
required
The field as one string, such as patient.address.state or prescriptions[0].quantity.
message
string
required
What is wrong with the field and what to send, for a person to read.
path
string | integer[]
required
The field as a list of property names and array indexes.
Show path fields
Array items · string | integer
string | integer
instance
string
required
The path of the request.
requestId
string
required
Identifies the request, as its X-Request-Id header does. Send it when you report a problem.
status
integer
required
The HTTP status code of the response.
traceId
string
The request trace ID.
All of · 2: object
data
object
Show data fields
retryAfterSeconds
integer
required
Minimum: 1
Maximum: 9007199254740991
500 Internal Server Error
application/problem+json
Problem
code
string
required
A stable code for the problem. Branch on it, not on detail.
detail
string
required
What went wrong and what to do, for a person to read.
title
string
required
A short summary of the problem's type.
type
string
required
A URI that names the problem's type.
issues
object[]
One entry for each field that the request got wrong, when the problem is about fields.
Show issues fields
Array items · object
code
string
required
A stable code for this field's problem.
field
string
required
The field as one string, such as patient.address.state or prescriptions[0].quantity.
message
string
required
What is wrong with the field and what to send, for a person to read.
path
string | integer[]
required
The field as a list of property names and array indexes.
Show path fields
Array items · string | integer
string | integer
instance
string
required
The path of the request.
requestId
string
required
Identifies the request, as its X-Request-Id header does. Send it when you report a problem.
status
integer
required
The HTTP status code of the response.
traceId
string
The request trace ID.
503 Service Unavailable
application/problem+json
Problem
code
string
required
A stable code for the problem. Branch on it, not on detail.
detail
string
required
What went wrong and what to do, for a person to read.
title
string
required
A short summary of the problem's type.
type
string
required
A URI that names the problem's type.
issues
object[]
One entry for each field that the request got wrong, when the problem is about fields.
Show issues fields
Array items · object
code
string
required
A stable code for this field's problem.
field
string
required
The field as one string, such as patient.address.state or prescriptions[0].quantity.
message
string
required
What is wrong with the field and what to send, for a person to read.
path
string | integer[]
required
The field as a list of property names and array indexes.
Show path fields
Array items · string | integer
string | integer
instance
string
required
The path of the request.
requestId
string
required
Identifies the request, as its X-Request-Id header does. Send it when you report a problem.
status
integer
required
The HTTP status code of the response.
traceId
string
The request trace ID.