Skip to main content
POST
Create a purchase order

Authorizations

Authorization
string
header
required

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

Body

application/json
clinic_id
integer
required

The ID of the clinic this purchase order belongs to

order_datetime
string<date-time>
required

The datetime when the order was placed

purchase_order_items
PurchaseOrderItemCreateSchema · object[]
required

The line items to include in the purchase order

Minimum array length: 1
supplier
string
required

The name of the supplier for this order

po_number
string | null

An optional purchase order number. If omitted, one is auto-generated.

Response

201 - application/json

Created

clinic_id
integer
required

The ID of the clinic this purchase order belongs to

created
string<date-time>
required

The datetime this object was created.

effective_total
integer
required

The effective total of the order, in cents

id
integer
required

The unique identifier for the purchase order

modified
string<date-time>
required

The datetime this object was last modified; changes to related entities will not update this field.

order_datetime
string<date-time>
required

The datetime when the order was placed

po_number
string
required

The purchase order number

purchase_order_items
ExternalPurchaseOrderItemSchema · object[]
required

The line items included in this purchase order

raw_total
integer
required

The raw total of the order, in cents

status
enum<string>
required

The current status of the purchase order

Available options:
DRAFT,
PENDING,
PARTIALLY_RECEIVED,
FULLY_RECEIVED,
CANCELED,
RETURNED,
CLOSED
supplier
string
required

The name of the supplier for this order