openapi: 3.0.3 info: title: 'TapMedID Partner API' description: 'REST API for integration partners to create and manage TapMedID medical profiles, records and bracelets.' version: 1.0.0 servers: - url: 'https://api.tapmedid.com' tags: - name: 'Getting started' description: "\nEndpoints to verify your integration is wired up correctly." - name: Profiles description: "\nMedical profiles the partner manages. Every action is scoped to the partner's own profiles,\nso ids outside your tenant return `404`. Creating a profile through the API consents it for\nyour management." - name: Bracelets description: "\nBracelets linked to your profiles: list, assign (activate a bracelet allocated to you by\nserial + PIN), update (enable/disable, lost mode, name) and unassign (return to your stock).\nYou can only activate bracelets that were allocated to your organization." - name: 'Emergency view' description: "\nThe at-a-glance emergency view of a profile — exactly what a first responder sees on the\npublic /p/{hash} page: only NON-private records, so the partner can surface the same\ncritical info inside their own app without exposing anything the patient marked private." - name: Allergies description: "\nA profile's allergies and the reactions they cause. Setting `is_private` to true\nkeeps the allergy out of the public emergency view while still storing it on the record." - name: Conditions description: "\nOngoing or past medical conditions and diagnoses for a profile. Setting `is_private`\nto true keeps the condition out of the public emergency view." - name: Medications description: "\nMedications a profile takes, with dosage and whether they are taken as needed.\nSetting `is_private` to true keeps the medication out of the public emergency view." - name: Vaccinations description: "\nVaccinations a profile has received, with the year and optional notes. Setting\n`is_private` to true keeps the vaccination out of the public emergency view." - name: 'Emergency contacts' description: "\nPeople to reach in an emergency — relatives, doctors, or attorneys — with phone,\nmobile and email details and whether they should be notified. Setting `is_private`\nto true keeps the contact out of the public emergency view." - name: Insurances description: "\nHealth insurance policies held by a profile, including company, policy numbers and\nvalidity dates. Setting `is_private` to true keeps the policy out of the public\nemergency view." - name: 'Medical history' description: "\nMedical history entries. One table backs several record kinds via `type`:\ngeneral | test | hospitalization | implanted_device | additional_info.\nGET supports ?type= to filter (e.g. only implanted devices). Setting `is_private`\nto true keeps the entry out of the public emergency view." - name: Documents description: "\nVault documents. Files are uploaded as multipart (`file`) and stored on the PRIVATE disk;\nthey are never publicly served — the API exposes a metadata record plus a signed download\nlink generated on read. Documents default to private, and setting `is_private` to true\nkeeps a document out of the public emergency view." components: securitySchemes: default: type: http scheme: bearer description: 'Your TapMedID account manager issues your API keys. Sandbox keys are prefixed tmid_test_, production keys tmid_live_. Send the key as a Bearer token in the Authorization header.' security: - default: [] paths: /api/v1/ping: get: summary: 'Ping / verify your key' operationId: pingVerifyYourKey description: "Confirms your API key works and echoes which partner and environment it is bound to.\nA good first call when setting up — if this returns `200`, your key and base URL are correct." parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: ok: true environment: sandbox partner: id: 12 name: 'Sunrise Senior Living' time: '2026-07-23T18:04:00+00:00' properties: ok: type: boolean example: true environment: type: string example: sandbox partner: type: object properties: id: type: integer example: 12 name: type: string example: 'Sunrise Senior Living' time: type: string example: '2026-07-23T18:04:00+00:00' tags: - 'Getting started' /api/v1/profiles: get: summary: 'List profiles' operationId: listProfiles description: 'Returns your managed profiles, newest first, paginated.' parameters: - in: query name: per_page description: 'Results per page (max 100). Defaults to 25.' example: 25 required: false schema: type: integer description: 'Results per page (max 100). Defaults to 25.' example: 25 responses: 200: description: '' content: application/json: schema: type: object example: data: - id: 42 full_name: 'Rosa Diaz' blood_type: O+ devices: [] links: first: ... last: ... prev: null next: null meta: current_page: 1 per_page: 25 total: 1 properties: data: type: array example: - id: 42 full_name: 'Rosa Diaz' blood_type: O+ devices: [] items: type: object properties: id: type: integer example: 42 full_name: type: string example: 'Rosa Diaz' blood_type: type: string example: O+ devices: type: array example: [] links: type: object properties: first: type: string example: ... last: type: string example: ... prev: type: string example: null nullable: true next: type: string example: null nullable: true meta: type: object properties: current_page: type: integer example: 1 per_page: type: integer example: 25 total: type: integer example: 1 tags: - Profiles post: summary: 'Create a profile' operationId: createAProfile description: "Creates a managed medical profile. Optionally assign a bracelet in the same call by\nincluding a `device` object with the serial and PIN of a bracelet allocated to you." parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: data: id: 42 full_name: 'Rosa Diaz' blood_type: O+ devices: - id: 7 serial: TMID-0001 activated: true emergency_url: 'https://api.tapmedid.com/p/abc123' properties: data: type: object properties: id: type: integer example: 42 full_name: type: string example: 'Rosa Diaz' blood_type: type: string example: O+ devices: type: array example: - id: 7 serial: TMID-0001 activated: true emergency_url: 'https://api.tapmedid.com/p/abc123' items: type: object properties: id: type: integer example: 7 serial: type: string example: TMID-0001 activated: type: boolean example: true emergency_url: type: string example: 'https://api.tapmedid.com/p/abc123' tags: - Profiles requestBody: required: true content: application/json: schema: type: object properties: first_name: type: string description: 'Must not be greater than 255 characters.' example: b last_name: type: string description: 'Must not be greater than 255 characters.' example: 'n' middle_name: type: string description: 'Must not be greater than 255 characters.' example: g nullable: true gender: type: string description: '' example: unspecified enum: - male - female - other - unspecified nullable: true birth_date: type: string description: 'Must be a valid date.' example: '2026-07-23T17:26:31' nullable: true blood_type: type: string description: '' example: O+ enum: - A+ - A- - B+ - B- - AB+ - AB- - O+ - O- nullable: true organ_donor: type: boolean description: '' example: false nullable: true living_will: type: string description: 'Must not be greater than 255 characters.' example: z nullable: true religion: type: string description: 'Must not be greater than 255 characters.' example: m nullable: true ssn: type: string description: 'Must not be greater than 64 characters.' example: i nullable: true phone: type: string description: 'Must not be greater than 40 characters.' example: 'y' nullable: true alternate_email: type: string description: 'Must be a valid email address. Must not be greater than 255 characters.' example: justina.gaylord@example.org nullable: true address1: type: string description: 'Must not be greater than 255 characters.' example: i nullable: true address2: type: string description: 'Must not be greater than 255 characters.' example: k nullable: true city: type: string description: 'Must not be greater than 120 characters.' example: h nullable: true state: type: string description: 'Must not be greater than 120 characters.' example: w nullable: true zip: type: string description: 'Must not be greater than 20 characters.' example: aykcmyuwpwlvqwrs nullable: true country: type: string description: 'Must be 2 characters.' example: it nullable: true device: type: object description: '' example: null properties: serial: type: string description: 'This field is required when device is present.' example: architecto pin: type: string description: 'This field is required when device is present.' example: architecto name: type: string description: 'Must not be greater than 120 characters.' example: 'n' nullable: true nullable: true required: - first_name - last_name '/api/v1/profiles/{id}': get: summary: 'Get a profile' operationId: getAProfile description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: data: id: 42 full_name: 'Rosa Diaz' blood_type: O+ devices: [] properties: data: type: object properties: id: type: integer example: 42 full_name: type: string example: 'Rosa Diaz' blood_type: type: string example: O+ devices: type: array example: [] tags: - Profiles put: summary: 'Update a profile' operationId: updateAProfile description: 'Send any subset of the profile fields — all are optional here.' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: data: id: 42 full_name: 'Rosa Diaz' blood_type: AB- address: city: Madrid properties: data: type: object properties: id: type: integer example: 42 full_name: type: string example: 'Rosa Diaz' blood_type: type: string example: AB- address: type: object properties: city: type: string example: Madrid tags: - Profiles requestBody: required: false content: application/json: schema: type: object properties: first_name: type: string description: 'Must not be greater than 255 characters.' example: b last_name: type: string description: 'Must not be greater than 255 characters.' example: 'n' middle_name: type: string description: 'Must not be greater than 255 characters.' example: g nullable: true gender: type: string description: '' example: unspecified enum: - male - female - other - unspecified nullable: true birth_date: type: string description: 'Must be a valid date.' example: '2026-07-23T17:26:31' nullable: true blood_type: type: string description: '' example: B+ enum: - A+ - A- - B+ - B- - AB+ - AB- - O+ - O- nullable: true organ_donor: type: boolean description: '' example: false nullable: true living_will: type: string description: 'Must not be greater than 255 characters.' example: z nullable: true religion: type: string description: 'Must not be greater than 255 characters.' example: m nullable: true ssn: type: string description: 'Must not be greater than 64 characters.' example: i nullable: true phone: type: string description: 'Must not be greater than 40 characters.' example: 'y' nullable: true alternate_email: type: string description: 'Must be a valid email address. Must not be greater than 255 characters.' example: justina.gaylord@example.org nullable: true address1: type: string description: 'Must not be greater than 255 characters.' example: i nullable: true address2: type: string description: 'Must not be greater than 255 characters.' example: k nullable: true city: type: string description: 'Must not be greater than 120 characters.' example: h nullable: true state: type: string description: 'Must not be greater than 120 characters.' example: w nullable: true zip: type: string description: 'Must not be greater than 20 characters.' example: aykcmyuwpwlvqwrs nullable: true country: type: string description: 'Must be 2 characters.' example: it nullable: true delete: summary: 'Delete a profile' operationId: deleteAProfile description: "Soft-deletes the profile and returns any bracelets linked to it back to your stock so\nthey can be re-issued. Staff can recover a deleted profile if needed." parameters: [] responses: 204: description: '' content: application/json: schema: type: object example: {} properties: {} tags: - Profiles parameters: - in: path name: id description: 'The ID of the profile.' example: architecto required: true schema: type: string - in: path name: profile description: 'The profile id.' example: 42 required: true schema: type: integer '/api/v1/profiles/{profile}/devices': get: summary: "List a profile's bracelets" operationId: listAProfilesBracelets description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: data: - id: 7 serial: TMID-0001 activated: true enabled: true is_lost: false emergency_url: 'https://api.tapmedid.com/p/abc123' properties: data: type: array example: - id: 7 serial: TMID-0001 activated: true enabled: true is_lost: false emergency_url: 'https://api.tapmedid.com/p/abc123' items: type: object properties: id: type: integer example: 7 serial: type: string example: TMID-0001 activated: type: boolean example: true enabled: type: boolean example: true is_lost: type: boolean example: false emergency_url: type: string example: 'https://api.tapmedid.com/p/abc123' tags: - Bracelets post: summary: 'Assign a bracelet' operationId: assignABracelet description: "Activates a bracelet (matched by serial + PIN) and links it to the profile. The bracelet\nmust be one allocated to your organization and not already linked to another profile." parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: data: id: 7 serial: TMID-0001 activated: true enabled: true emergency_url: 'https://api.tapmedid.com/p/abc123' properties: data: type: object properties: id: type: integer example: 7 serial: type: string example: TMID-0001 activated: type: boolean example: true enabled: type: boolean example: true emergency_url: type: string example: 'https://api.tapmedid.com/p/abc123' tags: - Bracelets requestBody: required: true content: application/json: schema: type: object properties: serial: type: string description: 'The bracelet serial (printed on the device).' example: TMID-0001 pin: type: string description: 'The bracelet PIN.' example: '4821' name: type: string description: 'An optional label, e.g. the room or wearer.' example: 'Room 12' nullable: true required: - serial - pin parameters: - in: path name: profile description: 'The profile id.' example: 42 required: true schema: type: integer '/api/v1/devices/{device}': patch: summary: 'Update a bracelet' operationId: updateABracelet description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: data: id: 7 serial: TMID-0001 enabled: true is_lost: false properties: data: type: object properties: id: type: integer example: 7 serial: type: string example: TMID-0001 enabled: type: boolean example: true is_lost: type: boolean example: false tags: - Bracelets requestBody: required: false content: application/json: schema: type: object properties: enabled: type: boolean description: 'Turn the bracelet on/off.' example: true view_medical_profile: type: boolean description: 'Whether scanning shows the full medical profile.' example: true name: type: string description: 'A label for the bracelet.' example: 'Room 12' is_lost: type: boolean description: 'Put the bracelet into lost mode.' example: false lost_message: type: string description: 'Message shown when the bracelet is scanned in lost mode.' example: 'Please call the front desk.' delete: summary: 'Unassign a bracelet' operationId: unassignABracelet description: "Deactivates the bracelet and returns it to your stock so it can be re-issued to another\nprofile." parameters: [] responses: 204: description: '' content: application/json: schema: type: object example: {} properties: {} tags: - Bracelets parameters: - in: path name: device description: 'The bracelet id.' example: 7 required: true schema: type: integer '/api/v1/profiles/{profile}/emergency': get: summary: "Get a profile's emergency view" operationId: getAProfilesEmergencyView description: "Returns the profile header plus its non-private allergies, conditions, medications,\nvaccinations and emergency contacts — safe to display to first responders." parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: profile: id: 42 full_name: 'Rosa Diaz' blood_type: O+ organ_donor: true allergies: - name: Penicillin reaction: Anaphylaxis conditions: [] medications: [] vaccinations: [] emergency_contacts: - name: 'Dr. House' mobile: '+34600111222' is_doctor: true properties: profile: type: object properties: id: type: integer example: 42 full_name: type: string example: 'Rosa Diaz' blood_type: type: string example: O+ organ_donor: type: boolean example: true allergies: type: array example: - name: Penicillin reaction: Anaphylaxis items: type: object properties: name: type: string example: Penicillin reaction: type: string example: Anaphylaxis conditions: type: array example: [] medications: type: array example: [] vaccinations: type: array example: [] emergency_contacts: type: array example: - name: 'Dr. House' mobile: '+34600111222' is_doctor: true items: type: object properties: name: type: string example: 'Dr. House' mobile: type: string example: '+34600111222' is_doctor: type: boolean example: true tags: - 'Emergency view' parameters: - in: path name: profile description: 'The profile id.' example: 42 required: true schema: type: integer '/api/v1/profiles/{profile}/allergies': get: summary: '' operationId: getApiV1ProfilesProfileAllergies description: '' parameters: [] responses: {} tags: - Allergies post: summary: 'Add an allergy' operationId: addAnAllergy description: '' parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: data: id: 1 name: Penicillin reaction: 'Hives and swelling' is_private: false properties: data: type: object properties: id: type: integer example: 1 name: type: string example: Penicillin reaction: type: string example: 'Hives and swelling' is_private: type: boolean example: false tags: - Allergies requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: 'The allergen name.' example: Penicillin reaction: type: string description: 'The reaction it triggers.' example: 'Hives and swelling' is_private: type: boolean description: 'Hide this allergy from the public emergency view.' example: false required: - name parameters: - in: path name: profile description: 'The profile.' example: architecto required: true schema: type: string '/api/v1/profiles/{profile}/allergies/{record}': get: summary: '' operationId: getApiV1ProfilesProfileAllergiesRecord description: '' parameters: [] responses: {} tags: - Allergies put: summary: 'Update an allergy' operationId: updateAnAllergy description: 'Send any subset of the create fields — all optional here.' parameters: [] responses: {} tags: - Allergies requestBody: required: false content: application/json: schema: type: object properties: name: type: string description: 'The allergen name.' example: Penicillin reaction: type: string description: 'The reaction it triggers.' example: 'Hives and swelling' is_private: type: boolean description: 'Hide this allergy from the public emergency view.' example: false delete: summary: '' operationId: deleteApiV1ProfilesProfileAllergiesRecord description: '' parameters: [] responses: {} tags: - Allergies parameters: - in: path name: profile description: 'The profile.' example: architecto required: true schema: type: string - in: path name: record description: '' example: architecto required: true schema: type: string '/api/v1/profiles/{profile}/conditions': get: summary: '' operationId: getApiV1ProfilesProfileConditions description: '' parameters: [] responses: {} tags: - Conditions post: summary: 'Add a condition' operationId: addACondition description: '' parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: data: id: 1 name: 'Type 2 diabetes' notes: 'Diagnosed 2019, diet controlled' is_private: false properties: data: type: object properties: id: type: integer example: 1 name: type: string example: 'Type 2 diabetes' notes: type: string example: 'Diagnosed 2019, diet controlled' is_private: type: boolean example: false tags: - Conditions requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: 'The condition name.' example: 'Type 2 diabetes' notes: type: string description: 'Additional notes about the condition.' example: 'Diagnosed 2019, diet controlled' is_private: type: boolean description: 'Hide this condition from the public emergency view.' example: false required: - name parameters: - in: path name: profile description: 'The profile.' example: architecto required: true schema: type: string '/api/v1/profiles/{profile}/conditions/{record}': get: summary: '' operationId: getApiV1ProfilesProfileConditionsRecord description: '' parameters: [] responses: {} tags: - Conditions put: summary: 'Update a condition' operationId: updateACondition description: 'Send any subset of the create fields — all optional here.' parameters: [] responses: {} tags: - Conditions requestBody: required: false content: application/json: schema: type: object properties: name: type: string description: 'The condition name.' example: 'Type 2 diabetes' notes: type: string description: 'Additional notes about the condition.' example: 'Diagnosed 2019, diet controlled' is_private: type: boolean description: 'Hide this condition from the public emergency view.' example: false delete: summary: '' operationId: deleteApiV1ProfilesProfileConditionsRecord description: '' parameters: [] responses: {} tags: - Conditions parameters: - in: path name: profile description: 'The profile.' example: architecto required: true schema: type: string - in: path name: record description: '' example: architecto required: true schema: type: string '/api/v1/profiles/{profile}/medications': get: summary: '' operationId: getApiV1ProfilesProfileMedications description: '' parameters: [] responses: {} tags: - Medications post: summary: 'Add a medication' operationId: addAMedication description: '' parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: data: id: 1 name: Enalapril dosage: 10mg as_needed: false is_private: false properties: data: type: object properties: id: type: integer example: 1 name: type: string example: Enalapril dosage: type: string example: 10mg as_needed: type: boolean example: false is_private: type: boolean example: false tags: - Medications requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: 'The medication name.' example: Enalapril dosage: type: string description: 'The dosage taken.' example: 10mg year: type: integer description: 'The year the medication was started.' example: 2021 as_needed: type: boolean description: 'Whether the medication is taken only as needed.' example: false is_private: type: boolean description: 'Hide this medication from the public emergency view.' example: false required: - name parameters: - in: path name: profile description: 'The profile.' example: architecto required: true schema: type: string '/api/v1/profiles/{profile}/medications/{record}': get: summary: '' operationId: getApiV1ProfilesProfileMedicationsRecord description: '' parameters: [] responses: {} tags: - Medications put: summary: 'Update a medication' operationId: updateAMedication description: 'Send any subset of the create fields — all optional here.' parameters: [] responses: {} tags: - Medications requestBody: required: false content: application/json: schema: type: object properties: name: type: string description: 'The medication name.' example: Enalapril dosage: type: string description: 'The dosage taken.' example: 10mg year: type: integer description: 'The year the medication was started.' example: 2021 as_needed: type: boolean description: 'Whether the medication is taken only as needed.' example: false is_private: type: boolean description: 'Hide this medication from the public emergency view.' example: false delete: summary: '' operationId: deleteApiV1ProfilesProfileMedicationsRecord description: '' parameters: [] responses: {} tags: - Medications parameters: - in: path name: profile description: 'The profile.' example: architecto required: true schema: type: string - in: path name: record description: '' example: architecto required: true schema: type: string '/api/v1/profiles/{profile}/vaccinations': get: summary: '' operationId: getApiV1ProfilesProfileVaccinations description: '' parameters: [] responses: {} tags: - Vaccinations post: summary: 'Add a vaccination' operationId: addAVaccination description: '' parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: data: id: 1 name: Tetanus year: 2022 is_private: false properties: data: type: object properties: id: type: integer example: 1 name: type: string example: Tetanus year: type: integer example: 2022 is_private: type: boolean example: false tags: - Vaccinations requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: 'The vaccine name.' example: Tetanus year: type: integer description: 'The year it was administered.' example: 2022 notes: type: string description: 'Additional notes about the vaccination.' example: 'Booster dose' is_private: type: boolean description: 'Hide this vaccination from the public emergency view.' example: false required: - name parameters: - in: path name: profile description: 'The profile.' example: architecto required: true schema: type: string '/api/v1/profiles/{profile}/vaccinations/{record}': get: summary: '' operationId: getApiV1ProfilesProfileVaccinationsRecord description: '' parameters: [] responses: {} tags: - Vaccinations put: summary: 'Update a vaccination' operationId: updateAVaccination description: 'Send any subset of the create fields — all optional here.' parameters: [] responses: {} tags: - Vaccinations requestBody: required: false content: application/json: schema: type: object properties: name: type: string description: 'The vaccine name.' example: Tetanus year: type: integer description: 'The year it was administered.' example: 2022 notes: type: string description: 'Additional notes about the vaccination.' example: 'Booster dose' is_private: type: boolean description: 'Hide this vaccination from the public emergency view.' example: false delete: summary: '' operationId: deleteApiV1ProfilesProfileVaccinationsRecord description: '' parameters: [] responses: {} tags: - Vaccinations parameters: - in: path name: profile description: 'The profile.' example: architecto required: true schema: type: string - in: path name: record description: '' example: architecto required: true schema: type: string '/api/v1/profiles/{profile}/emergency-contacts': get: summary: '' operationId: getApiV1ProfilesProfileEmergencyContacts description: '' parameters: [] responses: {} tags: - 'Emergency contacts' post: summary: 'Add an emergency contact' operationId: addAnEmergencyContact description: '' parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: data: id: 1 name: 'Dr. House' is_doctor: true mobile: '+34600111222' email: doctor@example.com is_private: false properties: data: type: object properties: id: type: integer example: 1 name: type: string example: 'Dr. House' is_doctor: type: boolean example: true mobile: type: string example: '+34600111222' email: type: string example: doctor@example.com is_private: type: boolean example: false tags: - 'Emergency contacts' requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: "The contact's full name." example: 'Dr. House' relation: type: string description: 'Relationship to the profile owner.' example: 'Primary physician' is_doctor: type: boolean description: 'Whether this contact is a doctor.' example: true speciality: type: string description: "The doctor's speciality, if applicable." example: Cardiology phone: type: string description: 'Landline phone number.' example: '+34910111222' phone_ext: type: string description: 'Landline extension.' example: '204' mobile: type: string description: 'Mobile phone number.' example: '+34600111222' email: type: string description: 'Contact email address.' example: doctor@example.com is_attorney: type: boolean description: 'Whether this contact is a legal attorney.' example: false notify: type: boolean description: 'Whether this contact should be notified on emergency access.' example: true lang: type: string description: 'Preferred language code for notifications.' example: es is_private: type: boolean description: 'Hide this contact from the public emergency view.' example: false required: - name parameters: - in: path name: profile description: 'The profile.' example: architecto required: true schema: type: string '/api/v1/profiles/{profile}/emergency-contacts/{record}': get: summary: '' operationId: getApiV1ProfilesProfileEmergencyContactsRecord description: '' parameters: [] responses: {} tags: - 'Emergency contacts' put: summary: 'Update an emergency contact' operationId: updateAnEmergencyContact description: 'Send any subset of the create fields — all optional here.' parameters: [] responses: {} tags: - 'Emergency contacts' requestBody: required: false content: application/json: schema: type: object properties: name: type: string description: "The contact's full name." example: 'Dr. House' relation: type: string description: 'Relationship to the profile owner.' example: 'Primary physician' is_doctor: type: boolean description: 'Whether this contact is a doctor.' example: true speciality: type: string description: "The doctor's speciality, if applicable." example: Cardiology phone: type: string description: 'Landline phone number.' example: '+34910111222' phone_ext: type: string description: 'Landline extension.' example: '204' mobile: type: string description: 'Mobile phone number.' example: '+34600111222' email: type: string description: 'Contact email address.' example: doctor@example.com is_attorney: type: boolean description: 'Whether this contact is a legal attorney.' example: false notify: type: boolean description: 'Whether this contact should be notified on emergency access.' example: true lang: type: string description: 'Preferred language code for notifications.' example: es is_private: type: boolean description: 'Hide this contact from the public emergency view.' example: false delete: summary: '' operationId: deleteApiV1ProfilesProfileEmergencyContactsRecord description: '' parameters: [] responses: {} tags: - 'Emergency contacts' parameters: - in: path name: profile description: 'The profile.' example: architecto required: true schema: type: string - in: path name: record description: '' example: architecto required: true schema: type: string '/api/v1/profiles/{profile}/insurances': get: summary: '' operationId: getApiV1ProfilesProfileInsurances description: '' parameters: [] responses: {} tags: - Insurances post: summary: 'Add an insurance policy' operationId: addAnInsurancePolicy description: '' parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: data: id: 1 company: Aetna policy_number: A-12345 is_private: false properties: data: type: object properties: id: type: integer example: 1 company: type: string example: Aetna policy_number: type: string example: A-12345 is_private: type: boolean example: false tags: - Insurances requestBody: required: true content: application/json: schema: type: object properties: company: type: string description: 'The insurance company.' example: Aetna policy_name: type: string description: 'The policy name or plan.' example: 'PPO Gold' policy_number: type: string description: 'The policy number.' example: A-12345 medicare: type: string description: 'Medicare identifier, if any.' example: 1EG4-TE5-MK73 medicaid: type: string description: 'Medicaid identifier, if any.' example: MD-998877 hmo: type: string description: 'HMO identifier, if any.' example: HMO-4521 agent_name: type: string description: "The insurance agent's name." example: 'Sarah Connor' valid_from: type: string description: 'The date the policy takes effect (YYYY-MM-DD).' example: '2025-01-01' expires_at: type: string description: 'The date the policy expires (YYYY-MM-DD).' example: '2025-12-31' description: type: string description: 'Additional notes about the policy.' example: 'Covers dental and vision' is_private: type: boolean description: 'Hide this policy from the public emergency view.' example: false required: - company parameters: - in: path name: profile description: 'The profile.' example: architecto required: true schema: type: string '/api/v1/profiles/{profile}/insurances/{record}': get: summary: '' operationId: getApiV1ProfilesProfileInsurancesRecord description: '' parameters: [] responses: {} tags: - Insurances put: summary: 'Update an insurance policy' operationId: updateAnInsurancePolicy description: 'Send any subset of the create fields — all optional here.' parameters: [] responses: {} tags: - Insurances requestBody: required: false content: application/json: schema: type: object properties: company: type: string description: 'The insurance company.' example: Aetna policy_name: type: string description: 'The policy name or plan.' example: 'PPO Gold' policy_number: type: string description: 'The policy number.' example: A-12345 medicare: type: string description: 'Medicare identifier, if any.' example: 1EG4-TE5-MK73 medicaid: type: string description: 'Medicaid identifier, if any.' example: MD-998877 hmo: type: string description: 'HMO identifier, if any.' example: HMO-4521 agent_name: type: string description: "The insurance agent's name." example: 'Sarah Connor' valid_from: type: string description: 'The date the policy takes effect (YYYY-MM-DD).' example: '2025-01-01' expires_at: type: string description: 'The date the policy expires (YYYY-MM-DD).' example: '2025-12-31' description: type: string description: 'Additional notes about the policy.' example: 'Covers dental and vision' is_private: type: boolean description: 'Hide this policy from the public emergency view.' example: false delete: summary: '' operationId: deleteApiV1ProfilesProfileInsurancesRecord description: '' parameters: [] responses: {} tags: - Insurances parameters: - in: path name: profile description: 'The profile.' example: architecto required: true schema: type: string - in: path name: record description: '' example: architecto required: true schema: type: string '/api/v1/profiles/{profile}/medical-history': get: summary: 'List medical history entries' operationId: listMedicalHistoryEntries description: '' parameters: - in: query name: type description: 'Filter by kind: general, test, hospitalization, implanted_device, additional_info.' example: implanted_device required: false schema: type: string description: 'Filter by kind: general, test, hospitalization, implanted_device, additional_info.' example: implanted_device responses: {} tags: - 'Medical history' post: summary: 'Add a medical history entry' operationId: addAMedicalHistoryEntry description: '' parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: data: id: 1 type: hospitalization name: Appendectomy is_private: false properties: data: type: object properties: id: type: integer example: 1 type: type: string example: hospitalization name: type: string example: Appendectomy is_private: type: boolean example: false tags: - 'Medical history' requestBody: required: true content: application/json: schema: type: object properties: type: type: string description: 'The kind of entry: general, test, hospitalization, implanted_device, additional_info.' example: hospitalization name: type: string description: 'A short label for the entry.' example: Appendectomy description: type: string description: 'A fuller description of the entry.' example: 'Laparoscopic appendix removal' test_date: type: string description: 'For test entries, the date of the test (YYYY-MM-DD).' example: '2024-03-15' hospital_from: type: string description: 'For hospitalizations, the admission date (YYYY-MM-DD).' example: '2024-03-14' hospital_to: type: string description: 'For hospitalizations, the discharge date (YYYY-MM-DD).' example: '2024-03-16' hospital_reason: type: string description: 'For hospitalizations, the reason for admission.' example: 'Acute appendicitis' is_private: type: boolean description: 'Hide this entry from the public emergency view.' example: false required: - type parameters: - in: path name: profile description: 'The profile.' example: architecto required: true schema: type: string '/api/v1/profiles/{profile}/medical-history/{record}': get: summary: '' operationId: getApiV1ProfilesProfileMedicalHistoryRecord description: '' parameters: [] responses: {} tags: - 'Medical history' put: summary: 'Update a medical history entry' operationId: updateAMedicalHistoryEntry description: 'Send any subset of the create fields — all optional here.' parameters: [] responses: {} tags: - 'Medical history' requestBody: required: false content: application/json: schema: type: object properties: type: type: string description: 'The kind of entry: general, test, hospitalization, implanted_device, additional_info.' example: hospitalization name: type: string description: 'A short label for the entry.' example: Appendectomy description: type: string description: 'A fuller description of the entry.' example: 'Laparoscopic appendix removal' test_date: type: string description: 'For test entries, the date of the test (YYYY-MM-DD).' example: '2024-03-15' hospital_from: type: string description: 'For hospitalizations, the admission date (YYYY-MM-DD).' example: '2024-03-14' hospital_to: type: string description: 'For hospitalizations, the discharge date (YYYY-MM-DD).' example: '2024-03-16' hospital_reason: type: string description: 'For hospitalizations, the reason for admission.' example: 'Acute appendicitis' is_private: type: boolean description: 'Hide this entry from the public emergency view.' example: false delete: summary: '' operationId: deleteApiV1ProfilesProfileMedicalHistoryRecord description: '' parameters: [] responses: {} tags: - 'Medical history' parameters: - in: path name: profile description: 'The profile.' example: architecto required: true schema: type: string - in: path name: record description: '' example: architecto required: true schema: type: string '/api/v1/profiles/{profile}/documents': get: summary: '' operationId: getApiV1ProfilesProfileDocuments description: '' parameters: [] responses: {} tags: - Documents post: summary: 'Upload a document' operationId: uploadADocument description: "Send as `multipart/form-data`. The file is stored on the private disk and a signed\ndownload URL is returned in the response." parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: data: id: 1 title: 'Insurance card' category: Insurance is_private: true download_url: 'https://example.com/files/documents/1' properties: data: type: object properties: id: type: integer example: 1 title: type: string example: 'Insurance card' category: type: string example: Insurance is_private: type: boolean example: true download_url: type: string example: 'https://example.com/files/documents/1' tags: - Documents requestBody: required: true content: multipart/form-data: schema: type: object properties: title: type: string description: 'The document title.' example: 'Insurance card' category: type: string description: 'A grouping label.' example: Insurance is_private: type: boolean description: 'Hide this document from the public emergency view.' example: true file: type: string format: binary description: 'The file to upload (max 20 MB).' required: - title - file parameters: - in: path name: profile description: 'The profile.' example: architecto required: true schema: type: string '/api/v1/profiles/{profile}/documents/{record}': get: summary: '' operationId: getApiV1ProfilesProfileDocumentsRecord description: '' parameters: [] responses: {} tags: - Documents put: summary: 'Update a document' operationId: updateADocument description: "Send as `multipart/form-data`. Send any subset of the fields — all optional here.\nInclude `file` only to replace the stored file." parameters: [] responses: {} tags: - Documents requestBody: required: false content: multipart/form-data: schema: type: object properties: title: type: string description: 'The document title.' example: 'Insurance card' category: type: string description: 'A grouping label.' example: Insurance is_private: type: boolean description: 'Hide this document from the public emergency view.' example: true file: type: string format: binary description: 'Replace the stored file (max 20 MB).' delete: summary: '' operationId: deleteApiV1ProfilesProfileDocumentsRecord description: '' parameters: [] responses: {} tags: - Documents parameters: - in: path name: profile description: 'The profile.' example: architecto required: true schema: type: string - in: path name: record description: '' example: architecto required: true schema: type: string