Pillwise Cabinet API

The Cabinet API from Pillwise — 8 operation(s) for cabinet.

GitHub OpenAPI

Operations 10

DELETE /v1/members/{member_ref} Delete members by member ref #
GET /v1/members/{member_ref}/cabinet Get members by member ref cabinet #
PUT /v1/members/{member_ref}/cabinet/items Replace members by member ref cabinet items #
PATCH /v1/members/{member_id}/cabinet/items/{item_id} Update members by member id cabinet items by item id #
POST /v1/members/{member_id}/cabinet/items/{item_id}/end Create members by member id cabinet items by item id end #
GET /v1/members/{member_id}/cabinet/export Get members by member id cabinet export #
GET /v1/webhooks List this tenant's webhook subscriptions #
POST /v1/webhooks Register an HTTPS endpoint #
GET /v1/webhooks/{id} Get webhooks by id #
DELETE /v1/webhooks/{id} Delete webhooks by id #

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/pillwise-dev:pillwise-dev-cabinet-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

pillwise-dev-cabinet-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Pillwise Dev Cabinet API
  version: 0.1.0
  license:
    name: Proprietary
  description: 'Operations tagged Cabinet across 2 of this provider''s published API definitions: pillwise-dev-openapi.json, pillwise-dev-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.pillwise.dev
  description: Future public API
security:
- bearerAuth: []
tags:
- name: Cabinet
paths:
  /v1/members/{member_ref}:
    delete:
      tags:
      - Cabinet
      description: 'Needs `cabinet:write`. Deletes the member and everything held for them: items, code tags, idempotency records and the member token. The audit trail keeps a `member.delete` row with the member id only. Frees a slot in the tenant''s member band.'
      parameters:
      - in: path
        name: member_ref
        required: true
        schema:
          type: string
          example: their_member_id
        description: Caller member id or Pillwise member UUID
      responses:
        '204':
          description: Deleted
        '404':
          description: member_not_found
      summary: Delete members by member ref
      x-summary-source: derived
      operationId: deleteV1MembersByMemberRef
      x-operation-id-source: derived
    servers:
    - url: https://api.pillwise.dev
      description: Future public API
  /v1/members/{member_ref}/cabinet:
    get:
      tags:
      - Cabinet
      parameters:
      - in: path
        name: member_ref
        required: true
        schema:
          type: string
          example: their_member_id
        description: Caller member id or Pillwise member UUID
      responses:
        '200':
          description: 'Completed forms + codes + member_id. Each item''s `drift` lists its pinned codes that differ from the drug answering for it now: its own id''s, or, when the catalog retired that id, the drug that answers for it. `{"field": "pillwise_id", "current": null}` means nothing in the catalog answers for the item any more. Each item''s `catalog` says where its drug stands: `status` is `current`, `superseded` (the catalog retired its id; `superseded_by` lists the drugs that answer for it now, best first), `retired` (nothing does) or `unbound` (the item names no catalog drug); a retired id also has `last_version`, the last catalog version that had it (`GET /v1/drugs/{id}?graph_version=` shows the drug as it was, for a year), and `last_seen`, when that version was built.'
      summary: Get members by member ref cabinet
      x-summary-source: derived
      operationId: getV1MembersByMemberRefCabinet
      x-operation-id-source: derived
    servers:
    - url: https://api.pillwise.dev
      description: Future public API
  /v1/members/{member_ref}/cabinet/items:
    put:
      tags:
      - Cabinet
      description: 'Send an Idempotency-Key to make retries safe. A repeat with the same key, member ref and body within 24 hours returns the first item with `Idempotent-Replayed: true`; the same key with a different request is a 422 `idempotency_key_reused`. Without the header every PUT adds an item. A `codes.pillwise_id` the catalog has retired is stored as the drug that answers for it now; one nothing answers for (and no other code names a drug) is a 422 `unknown_pillwise_id`.'
      parameters:
      - in: path
        name: member_ref
        required: true
        schema:
          type: string
      - in: header
        name: Idempotency-Key
        required: false
        schema:
          type: string
          minLength: 1
          maxLength: 255
          pattern: ^[\x21-\x7e]+$
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CabinetItemWrite'
            example:
              answers:
                confirmed_name: lisinopril
                form: tablet
                strength: '10'
                strength_unit: mg
                route: oral
                frequency: daily
                prn: false
                start_on: '2026-01-15'
              codes:
                pillwise_id: pw_d_lisinopril
      responses:
        '200':
          description: Stored item and member_id
        '422':
          description: unknown_pillwise_id, idempotency_key_reused, strength_not_on_product, ndc_not_on_product or member_item_cap
      summary: Replace members by member ref cabinet items
      x-summary-source: derived
      operationId: putV1MembersByMemberRefCabinetItems
      x-operation-id-source: derived
    servers:
    - url: https://api.pillwise.dev
      description: Future public API
  /v1/members/{member_id}/cabinet/items/{item_id}:
    patch:
      tags:
      - Cabinet
      parameters:
      - in: path
        name: member_id
        required: true
        schema:
          type: string
          format: uuid
      - in: path
        name: item_id
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CabinetAnswers'
      responses:
        '200':
          description: Patched answers (codes stay pinned)
      summary: Update members by member id cabinet items by item id
      x-summary-source: derived
      operationId: patchV1MembersByMemberIdCabinetItemsByItemId
      x-operation-id-source: derived
    servers:
    - url: https://api.pillwise.dev
      description: Future public API
  /v1/members/{member_id}/cabinet/items/{item_id}/end:
    post:
      tags:
      - Cabinet
      parameters:
      - in: path
        name: member_id
        required: true
        schema:
          type: string
          format: uuid
      - in: path
        name: item_id
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Item marked ended
      summary: Create members by member id cabinet items by item id end
      x-summary-source: derived
      operationId: postV1MembersByMemberIdCabinetItemsByItemIdEnd
      x-operation-id-source: derived
    servers:
    - url: https://api.pillwise.dev
      description: Future public API
  /v1/members/{member_id}/cabinet/export:
    get:
      tags:
      - Cabinet
      parameters:
      - in: path
        name: member_id
        required: true
        schema:
          type: string
          format: uuid
      - in: query
        name: target
        schema:
          type: string
          enum:
          - generic
          - sunfire
          default: generic
      description: Needs the `cabinet:export` scope. Every export is audited (`cabinet.export`).
      responses:
        '200':
          description: Code bundle for downstream systems
        '400':
          description: bad_target (not one of the listed targets)
        '403':
          description: forbidden_scope (key lacks cabinet:export)
      summary: Get members by member id cabinet export
      x-summary-source: derived
      operationId: getV1MembersByMemberIdCabinetExport
      x-operation-id-source: derived
    servers:
    - url: https://api.pillwise.dev
      description: Future public API
  /v1/webhooks:
    get:
      tags:
      - Cabinet
      summary: List this tenant's webhook subscriptions
      responses:
        '200':
          description: Hooks without secrets
      operationId: getV1Webhooks
      x-operation-id-source: derived
    post:
      tags:
      - Cabinet
      summary: Register an HTTPS endpoint
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - url
              additionalProperties: false
              properties:
                url:
                  type: string
                  description: HTTPS on a public address. Private, shared, link-local, metadata and internal names are refused here and again at every delivery (the name is resolved then), and redirects are not followed.
                events:
                  type: array
                  items:
                    type: string
                    enum:
                    - recall.issued
                    - cabinet.affected
                  default:
                  - cabinet.affected
      responses:
        '201':
          description: Subscription created; secret shown once
        '400':
          description: invalid_url, invalid_events, or webhook_limit
      operationId: postV1Webhooks
      x-operation-id-source: derived
    servers:
    - url: https://api.pillwise.dev
      description: Future public API
  /v1/webhooks/{id}:
    get:
      tags:
      - Cabinet
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Hook without secret
        '404':
          description: Unknown or other tenant
      summary: Get webhooks by id
      x-summary-source: derived
      operationId: getV1WebhooksById
      x-operation-id-source: derived
    delete:
      tags:
      - Cabinet
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Deleted
        '404':
          description: Unknown or other tenant
      summary: Delete webhooks by id
      x-summary-source: derived
      operationId: deleteV1WebhooksById
      x-operation-id-source: derived
    servers:
    - url: https://api.pillwise.dev
      description: Future public API
components:
  schemas:
    CabinetAnswers:
      type: object
      properties:
        confirmed_name:
          type: string
        form:
          type: string
        strength:
          type: string
        frequency:
          type: string
        instructions:
          type: string
        status:
          type: string
    CabinetItemWrite:
      type: object
      required:
      - answers
      properties:
        answers:
          type: object
          required:
          - confirmed_name
          properties:
            confirmed_name:
              type: string
            form:
              type: string
            strength:
              type: string
            strength_unit:
              type: string
            route:
              type: string
            frequency:
              type: string
            prn:
              type: boolean
            quantity:
              type: string
            days_supply:
              type: integer
            start_on:
              type: string
              format: date
            end_on:
              type: string
              format: date
            instructions:
              type: string
            entered_by:
              type: string
              enum:
              - self
              - caregiver
              - clinician
              - claim
              - barcode
        codes:
          type: object
          properties:
            rxcui:
              type: string
            rxcui_ingredient:
              type: string
            ndc11:
              type: string
            ndc_basis:
              type: string
              enum:
              - asserted
              - representative
            ndc_candidates:
              type: array
              items:
                type: object
                properties:
                  ndc11:
                    type: string
                  ndc_display:
                    type: string
                  description:
                    type: string
            ndc_fda:
              type: string
            ndc_display:
              type: string
            unii:
              type: array
              items:
                type: string
            spl_set_id:
              type: string
            application_number:
              type: string
            te_code:
              type: string
            pillwise_id:
              type: string
        resolved:
          type: object
          properties:
            pick_level:
              type: string
            search_hit_id:
              type: string
            confidence:
              type: string
            jurisdiction:
              type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: pw_live_
      description: 'Live keys start `pw_live_`; sandbox keys start `pw_test_` and share the same API with a 500-lookup monthly cap. Minted from the account pages or by an operator (`pillwise key create`). Shown once. A Cabinet PUT that would add a member past the tenant''s band returns 402 member_cap_reached. Scopes: index:read, cabinet:read, cabinet:write, cabinet:export. Cabinet reads and exports are audited like writes. Successful Index responses may include X-Quota-Used, X-Quota-Limit, X-Quota-Remaining, X-Quota-Period, X-Quota-Overage-Until.

        '
x-refined-from:
- pillwise-dev-openapi.json
- pillwise-dev-openapi.json