Skip to main content
POST
/
v1
/
organizations
/
{organization_id}
/
custom-drugs
cURL
curl --request POST \
  --url https://api.sandbox.parchmenthealth.io/external/v1/organizations/{organization_id}/custom-drugs \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-organization-secret: <x-organization-secret>' \
  --data '
[
  {
    "item_generic_name": "<string>",
    "item_strength": "<string>",
    "item_form": "<string>",
    "route_of_administration": "<string>",
    "quantity": "<string>",
    "max_repeats": "<string>",
    "poison_class": "<string>",
    "item_trade_name": "<string>",
    "brand_name": "<string>",
    "custom_product_id": "<string>",
    "description": "<string>",
    "patient_instructions": "<string>",
    "doctor_instructions": "<string>"
  }
]
'
{
  "success": true,
  "statusCode": 123,
  "message": "<string>",
  "code": "SUCCESS",
  "data": {
    "total": 123,
    "successCount": 123,
    "failureCount": 123,
    "failures": [
      {
        "index": 123,
        "error": "<string>"
      }
    ]
  },
  "timestamp": "<string>",
  "requestId": "<string>"
}

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.

Bulk-creates organization-level custom drugs (the shared org catalog, stored against ORGANIZATION#{organization_id}).

Integration Notes

  1. Scope Requirement: Your API token must include the create:custom_drug scope.
  2. Level: This endpoint creates organization-level drugs. Use the user-level endpoint to add a drug for a specific prescriber.
  3. Body: A non-empty JSON array of custom drug objects (a single drug is a one-element array).
  4. Partial success: Each item is processed independently. The response reports successCount, failureCount, and the first 50 failures (with the 1-based index and error). HTTP 200 is returned if at least one item succeeded; 400 if all failed.

Example Request

[
  {
    "item_generic_name": "Amoxicillin",
    "item_strength": "500mg",
    "item_form": "Capsule",
    "route_of_administration": "Oral",
    "quantity": "20",
    "max_repeats": "2",
    "poison_class": "S4"
  },
  {
    "item_generic_name": "Ibuprofen",
    "item_strength": "200mg",
    "item_form": "Tablet",
    "route_of_administration": "Oral",
    "quantity": "30",
    "max_repeats": "1",
    "poison_class": "S2"
  }
]

Example Response

{
  "success": true,
  "statusCode": 200,
  "message": "Created 2 of 2 custom drugs successfully",
  "code": "SUCCESS",
  "data": { "total": 2, "successCount": 2, "failureCount": 0, "failures": [] },
  "timestamp": "2024-01-25T09:15:00.000Z",
  "requestId": "req_1706171700000_abc123"
}

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

Body

application/json

Non-empty array of custom drugs to create at organization level

item_generic_name
string
required
Maximum string length: 280
item_strength
string
required
Maximum string length: 100
item_form
string
required
Maximum string length: 50
route_of_administration
string
required
Maximum string length: 50
quantity
string
required

String or number; coerced to string

max_repeats
string
required

String or number; coerced to string

poison_class
string
required
Maximum string length: 2
item_trade_name
string
Maximum string length: 280
brand_name
string
Maximum string length: 100
custom_product_id
string
Maximum string length: 50
description
string
Maximum string length: 280
patient_instructions
string
Maximum string length: 250
doctor_instructions
string
Maximum string length: 50

Response

Bulk create processed (at least one succeeded)

success
boolean
statusCode
integer
message
string
code
string
Example:

"SUCCESS"

data
object
timestamp
string
requestId
string