AffinityRx Account API

The organization and mode that the API key acts for.

GitHub OpenAPI

Operations 1

GET /v1/account Read the organization and mode you act as #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/affinityrx-com:affinityrx-com-account-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

affinityrx-com-account-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Affinity Account API
  version: '2026-11-01'
  contact:
    email: support@affinityrx.com
    name: Affinity API Support
    url: https://docs.affinityrx.com
  license:
    name: AffinityRx Terms of Service
    url: https://affinityrx.com/legal/terms
  termsOfService: https://affinityrx.com/legal/terms
  description: Affinity API for platforms and practices that order from the pharmacy network. If a response or a page is wrong or unclear, send `POST /v1/feedback` with an `Idempotency-Key`, a short message and the `requestId` from the response. Do not include patient information.
servers:
- url: https://api.affinityrx.com
security: []
tags:
- name: Account
  description: The organization and mode that the API key acts for.
paths:
  /v1/account:
    get:
      tags:
      - Account
      operationId: account.get
      parameters:
      - description: The dated API version this request is written against.
        in: header
        name: Affinity-Version
        required: true
        schema:
          default: '2026-11-01'
          enum:
          - '2026-11-01'
          type: string
      security:
      - apiKey: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: AccountGetResponse
                $ref: '#/components/schemas/Account'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-Affinity-Trace-Id:
              $ref: '#/components/headers/X-Affinity-Trace-Id'
            X-Api-Version:
              $ref: '#/components/headers/X-Api-Version'
        '400':
          description: Bad Request
          content:
            application/problem+json:
              schema:
                title: AccountGet400Response
                $ref: '#/components/schemas/Problem'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-Affinity-Trace-Id:
              $ref: '#/components/headers/X-Affinity-Trace-Id'
            X-Api-Version:
              $ref: '#/components/headers/X-Api-Version'
        '401':
          description: Unauthorized
          content:
            application/problem+json:
              schema:
                title: AccountGet401Response
                $ref: '#/components/schemas/Problem'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-Affinity-Trace-Id:
              $ref: '#/components/headers/X-Affinity-Trace-Id'
            X-Api-Version:
              $ref: '#/components/headers/X-Api-Version'
        '403':
          description: Forbidden
          content:
            application/problem+json:
              schema:
                title: AccountGet403Response
                $ref: '#/components/schemas/Problem'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-Affinity-Trace-Id:
              $ref: '#/components/headers/X-Affinity-Trace-Id'
            X-Api-Version:
              $ref: '#/components/headers/X-Api-Version'
        '404':
          description: Not Found
          content:
            application/problem+json:
              schema:
                title: AccountGet404Response
                $ref: '#/components/schemas/Problem'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-Affinity-Trace-Id:
              $ref: '#/components/headers/X-Affinity-Trace-Id'
            X-Api-Version:
              $ref: '#/components/headers/X-Api-Version'
        '429':
          description: Too Many Requests
          content:
            application/problem+json:
              schema:
                title: AccountGet429Response
                $ref: '#/components/schemas/Problem429'
          headers:
            Retry-After:
              $ref: '#/components/headers/Retry-After'
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-Affinity-Trace-Id:
              $ref: '#/components/headers/X-Affinity-Trace-Id'
            X-Api-Version:
              $ref: '#/components/headers/X-Api-Version'
        '500':
          description: Internal Server Error
          content:
            application/problem+json:
              schema:
                title: AccountGet500Response
                $ref: '#/components/schemas/Problem'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-Affinity-Trace-Id:
              $ref: '#/components/headers/X-Affinity-Trace-Id'
            X-Api-Version:
              $ref: '#/components/headers/X-Api-Version'
        '503':
          description: Service Unavailable
          content:
            application/problem+json:
              schema:
                title: AccountGet503Response
                $ref: '#/components/schemas/Problem'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-Affinity-Trace-Id:
              $ref: '#/components/headers/X-Affinity-Trace-Id'
            X-Api-Version:
              $ref: '#/components/headers/X-Api-Version'
            Retry-After:
              $ref: '#/components/headers/Retry-After'
      description: Read the organization and Test or Live mode selected by the API key.
      summary: Read the organization and mode you act as
components:
  headers:
    X-Request-Id:
      description: Identifies this request. A problem response also returns it as `requestId`.
      schema:
        type: string
    X-Api-Version:
      description: The resolved API version. Absent when no version resolved.
      schema:
        type: string
    X-Affinity-Trace-Id:
      description: The request trace ID, also returned as traceId in problems.
      schema:
        pattern: ^[0-9a-f]{32}$
        type: string
    Retry-After:
      description: Seconds to wait before retrying.
      schema:
        minimum: 1
        type: integer
  schemas:
    Account:
      type: object
      properties:
        id:
          type: string
          pattern: ^(plat|prac|pharm)_[0-7][0-9a-hjkmnp-tv-z]{25}$
          description: The public record identifier.
          examples:
          - prac_01j2y8m6jcc9tt24af5pw9x1bc
        name:
          type: string
          description: The name.
        phone:
          anyOf:
          - type: string
          - type: 'null'
          description: The contact phone number.
        address:
          anyOf:
          - $ref: '#/components/schemas/Address'
          - type: 'null'
          description: The US mailing address.
        liveEnabled:
          type: boolean
          description: Effective Live access. A managed practice requires both its own Live setting and its platform's Live access.
        createdAt:
          type: string
          description: When the record was created.
          format: date-time
        mode:
          type: string
          description: The Test or Live mode selected by the API key.
          x-extensible-enum:
          - test
          - live
        type:
          type: string
          description: The organization type.
          x-extensible-enum:
          - platform
          - practice
          - pharmacy
      required:
      - id
      - name
      - phone
      - address
      - liveEnabled
      - createdAt
      - mode
      - type
      additionalProperties:
        description: A field that this API version can add. Ignore fields that you do not know.
    Problem429:
      allOf:
      - $ref: '#/components/schemas/Problem'
      - properties:
          data:
            type: object
            properties:
              retryAfterSeconds:
                type: integer
                minimum: 1
                maximum: 9007199254740991
            required:
            - retryAfterSeconds
            additionalProperties:
              description: A field that this API version can add. Ignore fields that you do not know.
        type: object
    Address:
      type: object
      properties:
        line1:
          type: string
          description: The street address.
        line2:
          anyOf:
          - type: string
          - type: 'null'
          description: The apartment or suite, or null when there is none.
        city:
          type: string
          description: The city name.
        state:
          type: string
          description: The two-letter US state code.
        postalCode:
          type: string
          description: The US ZIP code.
      required:
      - line1
      - line2
      - city
      - state
      - postalCode
      description: The US mailing address.
      additionalProperties:
        description: A field that this API version can add. Ignore fields that you do not know.
    Problem:
      properties:
        code:
          description: A stable code for the problem. Branch on it, not on detail.
          type: string
        detail:
          description: What went wrong and what to do, for a person to read.
          type: string
        title:
          description: A short summary of the problem's type.
          type: string
        type:
          description: A URI that names the problem's type.
          type: string
        issues:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                description: A stable code for this field's problem.
              field:
                type: string
                description: The field as one string, such as `patient.address.state` or `prescriptions[0].quantity`.
              message:
                type: string
                description: What is wrong with the field and what to send, for a person to read.
              path:
                type: array
                items:
                  anyOf:
                  - type: string
                  - type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                description: The field as a list of property names and array indexes.
            required:
            - code
            - field
            - message
            - path
            additionalProperties:
              description: A field that this API version can add. Ignore fields that you do not know.
          description: One entry for each field that the request got wrong, when the problem is about fields.
        instance:
          description: The path of the request.
          type: string
        requestId:
          description: Identifies the request, as its X-Request-Id header does. Send it when you report a problem.
          type: string
        status:
          description: The HTTP status code of the response.
          type: integer
        traceId:
          description: The request trace ID.
          type: string
      required:
      - code
      - detail
      - instance
      - requestId
      - status
      - title
      - type
      type: object
      additionalProperties:
        description: A field that this API version can add. Ignore fields that you do not know.
  securitySchemes:
    apiKey:
      bearerFormat: sk_test_… or sk_live_…
      description: 'Send Authorization: Bearer <key> with an active API key from the Affinity dashboard. Test and Live keys act in their mode.'
      scheme: bearer
      type: http