Skip to content

List delivery addresses

GET/v1/practices/{practiceId}/patients/{patientId}/addresses

Request example

curl -X GET 'https://api.affinityrx.com/v1/practices/{practiceId}/patients/{patientId}/addresses' \
  -H "Authorization: Bearer $AFFINITY_API_KEY" \
  -H 'Affinity-Version: 2026-09-28'

Response example

These examples show the body structure. Values can differ. Select a status code to see its response.

{
  "data": [
    {
      "id": "addr_01j2y8m6jcc9tt24af5pw9x1bc",
      "address": {
        "city": "<string>",
        "country": "<string>",
        "line1": "<string>",
        "line2": "<string>",
        "postalCode": "<string>",
        "state": "<string>"
      },
      "label": "<string>",
      "preferredShipping": false,
      "recipientName": "<string>",
      "archivedAt": "<string>"
    }
  ],
  "object": "list",
  "hasMore": false,
  "url": "<string>"
}
{
  "code": "<string>",
  "data": "<string>",
  "detail": "<string>",
  "instance": "<string>",
  "requestId": "<string>",
  "status": 400,
  "title": "<string>",
  "traceId": "<string>",
  "type": "<string>"
}
{
  "code": "<string>",
  "data": "<string>",
  "detail": "<string>",
  "instance": "<string>",
  "requestId": "<string>",
  "status": 401,
  "title": "<string>",
  "traceId": "<string>",
  "type": "<string>"
}
{
  "code": "<string>",
  "data": "<string>",
  "detail": "<string>",
  "instance": "<string>",
  "requestId": "<string>",
  "status": 403,
  "title": "<string>",
  "traceId": "<string>",
  "type": "<string>"
}
{
  "code": "<string>",
  "data": "<string>",
  "detail": "<string>",
  "instance": "<string>",
  "requestId": "<string>",
  "status": 404,
  "title": "<string>",
  "traceId": "<string>",
  "type": "<string>"
}
{
  "code": "<string>",
  "data": "<string>",
  "detail": "<string>",
  "instance": "<string>",
  "requestId": "<string>",
  "status": 409,
  "title": "<string>",
  "traceId": "<string>",
  "type": "<string>"
}
{
  "code": "<string>",
  "data": "<string>",
  "detail": "<string>",
  "instance": "<string>",
  "requestId": "<string>",
  "status": 429,
  "title": "<string>",
  "traceId": "<string>",
  "type": "<string>"
}

Implementation specification

Use these field types and limits to build your integration. Download the OpenAPI document for the complete contract.

Path parameters

practiceIdstringrequired

Pattern: ^prac_[0-7][0-9a-hjkmnp-tv-z]{25}$

patientIdstringrequired

Pattern: ^pat_[0-7][0-9a-hjkmnp-tv-z]{25}$

Query parameters

statusstring | null
Show schema
Any of · 1: string

string

Allowed: "active", "archived", "all"

Any of · 2: null

null

startingAfterstring | null
Show schema
Any of · 1: string

string

Pattern: ^addr_[0-7][0-9a-hjkmnp-tv-z]{25}$

Any of · 2: null

null

endingBeforestring | null
Show schema
Any of · 1: string

string

Pattern: ^addr_[0-7][0-9a-hjkmnp-tv-z]{25}$

Any of · 2: null

null

limitinteger

Default: 25

Minimum: 1

Maximum: 100

Headers

Affinity-Versionstring

Selects the HTTP API contract for this request only. When omitted, API-key requests use their service account’s stored version. Does not change the stored default.

Pin requests to 2026-09-28.

Affinity-Actor-Idstring

Required for user actors and optional for system actors. Omit both actor headers to use the authenticated service account as a system actor.

Affinity-Actor-Typestring

Use user when a person initiated the action and system for autonomous work. Omit both actor headers to default to system.

Response specifications

200Successful response

application/json

dataobject[]required
Show data fields

Array items · object

idanyrequired
Show id fields
All of · 1: any

any

Pattern: ^addr_[0-7][0-9a-hjkmnp-tv-z]{25}$

addressobjectrequired

No additional properties

Show address fields
cityany & anyrequired
Show city fields
All of · 1: any

any

Pattern: ^[^\u0000\p{Cs}]*$

All of · 2: any

any

Pattern: ^[^\p{Cc}\u200B\u2028-\u202E\u2066-\u2069]*$

countryany & any | null
Show country fields
Any of · 1: any & any
All of · 1: any

any

Pattern: ^[^\u0000\p{Cs}]*$

All of · 2: any

any

Pattern: ^[^\p{Cc}\u200B\u2028-\u202E\u2066-\u2069]*$

Any of · 2: null

null

line1any & anyrequired
Show line1 fields
All of · 1: any

any

Pattern: ^[^\u0000\p{Cs}]*$

All of · 2: any

any

Pattern: ^[^\p{Cc}\u200B\u2028-\u202E\u2066-\u2069]*$

line2any & any | null | null
Show line2 fields
Any of · 1: any & any | null
Any of · 1: any & any
All of · 1: any

any

Pattern: ^[^\u0000\p{Cs}]*$

All of · 2: any

any

Pattern: ^[^\p{Cc}\u200B\u2028-\u202E\u2066-\u2069]*$

Any of · 2: null

null

Any of · 2: null

null

postalCodeany & anyrequired
Show postalCode fields
All of · 1: any

any

Pattern: ^[^\u0000\p{Cs}]*$

All of · 2: any

any

Pattern: ^[^\p{Cc}\u200B\u2028-\u202E\u2066-\u2069]*$

stateany & anyrequired
Show state fields
All of · 1: any

any

Pattern: ^[^\u0000\p{Cs}]*$

All of · 2: any

any

Pattern: ^[^\p{Cc}\u200B\u2028-\u202E\u2066-\u2069]*$

labelanyrequired
Show label fields
All of · 1: any

any

Pattern: ^[^\u0000\p{Cs}]*$

preferredShippingbooleanrequired
recipientNameany & any | nullrequired
Show recipientName fields
Any of · 1: any & any
All of · 1: any

any

Pattern: ^[^\u0000\p{Cs}]*$

All of · 2: any

any

Pattern: ^[^\p{Cc}\u200B\u2028-\u202E\u2066-\u2069]*$

Any of · 2: null

null

archivedAtstring | nullrequired
Show archivedAt fields
Any of · 1: string

string

Any of · 2: null

null

objectstringrequired

Allowed: "list"

hasMorebooleanrequired
urlstringrequired
400HTTP 400

application/json

codestringrequired
dataobject
detailstringrequired
instancestringrequired
requestIdstringrequired
statusintegerrequired

Minimum: 400

Maximum: 599

titlestringrequired
traceIdstring
typestringrequired

Format: uri

401Unauthorized

application/json

codestringrequired
dataobject
detailstringrequired
instancestringrequired
requestIdstringrequired
statusintegerrequired

Minimum: 400

Maximum: 599

titlestringrequired
traceIdstring
typestringrequired

Format: uri

403Forbidden

application/json

codestringrequired
dataobject
detailstringrequired
instancestringrequired
requestIdstringrequired
statusintegerrequired

Minimum: 400

Maximum: 599

titlestringrequired
traceIdstring
typestringrequired

Format: uri

404Not found

application/json

codestringrequired
dataobject
detailstringrequired
instancestringrequired
requestIdstringrequired
statusintegerrequired

Minimum: 400

Maximum: 599

titlestringrequired
traceIdstring
typestringrequired

Format: uri

409Conflict

application/json

codestringrequired
dataobject
detailstringrequired
instancestringrequired
requestIdstringrequired
statusintegerrequired

Minimum: 400

Maximum: 599

titlestringrequired
traceIdstring
typestringrequired

Format: uri

429Too many requests

application/json

codestringrequired
dataobject
detailstringrequired
instancestringrequired
requestIdstringrequired
statusintegerrequired

Minimum: 400

Maximum: 599

titlestringrequired
traceIdstring
typestringrequired

Format: uri

Type to search…

↑↓ navigate↵ selectEsc close