Skip to main content
POST
cURL
Creates organization-level custom drugs. Send a JSON array; a single drug is a one-element array. Each item is processed on its own, so one bad item does not block the rest. created[] returns the custom_drug_id of every drug created, with your custom_product_id echoed back. Store it: it is the id for the per-item update and delete endpoints.

Example Request

Example Response

Field Rules

Status Codes

Notes

  • Requires the create:custom_drug scope.
  • failures lists the first 50 failed items with their 1-based index.
  • Use the user-level create endpoint for a prescriber’s personal drug.

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

Schedule with the S prefix, S2 to S9. A bare digit is rejected.

Maximum string length: 2
Pattern: ^S[2-9]$
Example:

"S4"

item_trade_name
string
Maximum string length: 280
brand_name
string
Maximum string length: 100
custom_product_id
string

Your own identifier for this drug. Never generated by Parchment. Not checked for uniqueness.

Maximum string length: 50
Example:

"EK-12345"

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