Skip to main content
POST
cURL
Creates a user-level custom drug for the given user (stored against USER#{user_id}).

Integration Notes

  1. Scope Requirement: Your API token must include the create:custom_drug scope.
  2. Level: This endpoint always creates user-level drugs. Use the bulk endpoint to manage the organization-level catalog.
  3. Response: Returns the created drug, including its custom_drug_id (use it to update/delete the drug or to prefill the prescription form).
  4. Validation: item_generic_name, item_strength, item_form, route_of_administration, quantity, poison_class, and max_repeats are required.

Example Request

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

Body

application/json

Custom drug to create

Custom drug fields supplied by a partner when creating a drug.

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

Custom drug created successfully

success
boolean
statusCode
integer
message
string
code
string
Example:

"SUCCESS"

data
object

A custom drug as exposed to partners. custom_drug_id is the unique identifier used to prefill the prescription form.

timestamp
string
requestId
string