Skip to main content
GET
/
v1
/
organizations
/
{organization_id}
/
users
/
{user_id}
/
custom-drugs
cURL
curl --request GET \
  --url https://api.sandbox.parchmenthealth.io/external/v1/organizations/{organization_id}/users/{user_id}/custom-drugs \
  --header 'Authorization: Bearer <token>' \
  --header 'x-organization-secret: <x-organization-secret>'
{
  "success": true,
  "statusCode": 200,
  "message": "Retrieved 2 custom drugs successfully",
  "code": "SUCCESS",
  "data": [
    {
      "custom_drug_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "item_generic_name": "Amoxicillin",
      "item_trade_name": "Amoxil",
      "brand_name": "Amoxil",
      "item_strength": "500mg",
      "item_form": "Capsule",
      "route_of_administration": "Oral",
      "quantity": "20",
      "max_repeats": "2",
      "poison_class": "S4",
      "custom_product_id": "EK-12345",
      "description": "Antibiotic",
      "patient_instructions": "Take one capsule twice daily",
      "doctor_instructions": "Review after course"
    }
  ],
  "timestamp": "2024-01-15T10:30:00.000Z",
  "requestId": "req_1705312200000_abc123"
}

Documentation Index

Fetch the complete documentation index at: https://docs.parchmenthealth.io/llms.txt

Use this file to discover all available pages before exploring further.

Response Examples

Success Response (200 OK)

{
  "success": true,
  "statusCode": 200,
  "message": "Retrieved 2 custom drugs successfully",
  "code": "SUCCESS",
  "data": [
    {
      "custom_drug_id": "fc37ba32-8837-4c4b-9e5d-ef2d4f15c9ea",
      "item_generic_name": "Semaglutide 1.34 mg/mL injection, 1 x 1.5 mL pen device",
      "item_trade_name": "Wegovy 0.5 mg Multidose Flextouch 1.34 mg/mL injection, 1.5 mL pen device",
      "brand_name": "Wegovy Flextouch",
      "item_strength": "1.34 mg/mL",
      "item_form": "Solution for injection",
      "route_of_administration": "Subcutaneous",
      "quantity": "1",
      "max_repeats": "5",
      "poison_class": "S4"
    },
    {
      "custom_drug_id": "1b9358d7-6576-46dd-9770-3047fb1916c0",
      "item_generic_name": "Custom Drug with product ID",
      "item_strength": "100mg",
      "item_form": "Capsule",
      "route_of_administration": "Oral",
      "quantity": "40",
      "max_repeats": "1",
      "poison_class": "S2",
      "custom_product_id": "12345",
      "patient_instructions": "Take one capsule twice daily",
      "doctor_instructions": "Review after course"
    }
  ],
  "timestamp": "2024-01-25T09:15:00.000Z",
  "requestId": "req_1706171700000_abc123"
}

No Custom Drugs (200 OK)

{
  "success": true,
  "statusCode": 200,
  "message": "Retrieved 0 custom drugs successfully",
  "code": "SUCCESS",
  "data": [],
  "timestamp": "2024-01-25T09:15:00.000Z",
  "requestId": "req_1706171700000_def456"
}

Invalid Parameters (400 Bad Request)

{
  "success": false,
  "statusCode": 400,
  "error": {
    "type": "https://parchment.health/errors/bad-request",
    "title": "Bad Request",
    "detail": "Organization ID is required"
  },
  "timestamp": "2024-01-25T09:15:00.000Z",
  "requestId": "req_1706171700000_ghi789"
}

Unauthorized (401)

{
  "success": false,
  "statusCode": 401,
  "error": {
    "type": "https://parchment.health/errors/authentication-required",
    "title": "Unauthorized",
    "detail": "Insufficient scope"
  },
  "timestamp": "2024-01-25T09:15:00.000Z",
  "requestId": "req_1706171700000_jkl012"
}

Response Fields

Success Response Data

The response returns an array of custom drug objects. Optional fields are omitted when not set on the drug.
FieldTypeDescription
custom_drug_idstringUnique identifier for the custom drug (use this to prefill a form)
item_generic_namestringGeneric name of the drug
item_trade_namestringTrade name of the drug (optional)
brand_namestringBrand name (optional)
item_strengthstringStrength, e.g. 500mg
item_formstringDosage form, e.g. Capsule
route_of_administrationstringRoute, e.g. Oral
quantitystringDefault quantity
max_repeatsstringMaximum repeats
poison_classstringPoison schedule, e.g. S4
custom_product_idstringPartner-supplied product identifier (optional)
descriptionstringFree-text description (optional)
patient_instructionsstringDefault patient instructions (optional)
doctor_instructionsstringDefault doctor instructions (optional)

Common Response Fields

All responses include these standard fields:
FieldTypeDescription
successbooleanIndicates if the request was successful
statusCodenumberHTTP status code
messagestringHuman-readable status message
codestringOperation code (SUCCESS on 200)
timestampstringISO 8601 timestamp of the response
requestIdstringUnique identifier for debugging

Path Parameters

ParameterTypeRequiredDescription
organization_idstringYesOrganization identifier
user_idstringYesUser identifier

Status Codes

CodeStatusDescription
200OKCustom drugs retrieved successfully (including empty list)
400Bad RequestInvalid request format or missing parameters
401UnauthorizedAuthentication required, token invalid, or scope invalid
500Internal Server ErrorUnexpected server error

Integration Notes

  1. Scope Requirement: Your API token must include the read:custom_drug scope.
  2. Combined List: Returns both organization-level and user-level custom drugs for the user.
  3. Prefill: Use custom_drug_id to prefill the prescription form via query parameters.
  4. Optional Fields: Fields that are not set on a drug are omitted from the response.
  5. Store Request ID: Always log the requestId for debugging support requests.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-organization-secret
string
required

Organization secret for authentication - provided by Parchment

Path Parameters

organization_id
string<uuid>
required

Organization ID

user_id
string
required

User ID

Response

Custom drugs retrieved successfully

success
boolean
statusCode
integer
message
string
code
string
Example:

"SUCCESS"

data
object[]
timestamp
string
requestId
string