Skip to main content
POST
cURL
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. Organization admin/owner required: The acting user (the token’s user_id) must be an organization owner or admin. A token that carries the correct scope but whose user is a non-admin (e.g. a prescriber) is rejected with 401 Unauthorized. This restriction applies only to the organization-level (bulk) endpoints; the user-level custom-drug endpoints have no such requirement.
  3. Level: This endpoint creates organization-level drugs. Use the user-level endpoint to add a drug for a specific prescriber.
  4. Body: A non-empty JSON array of custom drug objects (a single drug is a one-element array).
  5. 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

Example Response

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