Skip to main content
POST
/
api
/
v1
/
purchase-orders
cURL
curl --request POST \
  --url https://api-staging.getmeadow.com/api/v1/purchase-orders \
  --header 'Content-Type: application/json' \
  --header 'X-Client-Key: <api-key>' \
  --header 'X-Consumer-Key: <api-key>' \
  --data '
{
  "lineItems": [
    {
      "productId": 123,
      "amount": "<string>",
      "costPerUnit": "<string>",
      "productOptionId": 123
    }
  ],
  "notes": "<string>",
  "paymentTerms": "net15",
  "paymentTermsDueDate": "<string>",
  "expectedAt": "<string>",
  "externalInvoiceNumber": "<string>",
  "inventoryVendorId": 123,
  "inventoryVendor": {
    "name": "<string>",
    "email": "<string>",
    "phone": "<string>",
    "sellerPermitNumber": "<string>",
    "notes": "<string>",
    "street1": "<string>",
    "street2": "<string>",
    "postalCode": "<string>",
    "city": "<string>",
    "state": "<string>"
  }
}
'
{
  "data": {
    "createdAt": "2024-12-12T07:53:37.793Z",
    "expectedAt": "2024-12-25",
    "finalTotal": 71225,
    "id": 6741,
    "inventoryVendor": {
      "id": 308,
      "organizationId": 25,
      "name": "Awesome Distribution, Inc.",
      "phone": null,
      "notes": null,
      "createdAt": "2024-12-12T07:53:37.776Z",
      "updatedAt": "2024-12-12T07:53:37.776Z",
      "archivedAt": null,
      "email": null,
      "sellerPermitNumber": null,
      "street1": null,
      "street2": null,
      "city": null,
      "state": null,
      "postalCode": null
    },
    "inventoryVendorId": 308,
    "lineItems": [
      {
        "amount": "35",
        "caExcisePerUnit": "0",
        "costPerUnit": "20.35",
        "createdAt": "2024-12-12T07:53:37.797Z",
        "finalTotal": 71225,
        "id": 33555,
        "product": {
          "id": 11867,
          "organizationId": 25,
          "brand": {
            "id": 2238,
            "name": "Awesome Cannabis",
            "createdAt": "2024-12-12T03:08:58.012Z",
            "updatedAt": "2024-12-12T03:08:58.012Z",
            "description": null
          },
          "inventoryType": "option",
          "createdAt": "2024-12-12T04:08:00.429Z",
          "updatedAt": "2024-12-12T05:06:35.447Z",
          "deletedAt": null,
          "description": null,
          "isActive": false,
          "isFeatured": false,
          "name": "Blue Dream",
          "strainType": "hybrid-sativa",
          "isCompliant": false,
          "unit": "gram"
        },
        "productId": 11867,
        "productOption": {
          "id": 15472,
          "name": "Eighth",
          "amount": 3.5,
          "price": 4700,
          "salesPrice": null,
          "createdAt": "2024-12-12T04:08:00.433Z",
          "updatedAt": "2024-12-12T07:09:11.770Z",
          "upc": null,
          "content": "3.5"
        },
        "productOptionId": 15472,
        "subtotal": 71225,
        "updatedAt": "2024-12-12T07:53:37.797Z"
      }
    ],
    "organizationId": 25,
    "paymentTermsDueDate": null,
    "shippingHandlingFee": 0,
    "status": "open",
    "subtotal": 71225,
    "totalAmount": "35",
    "updatedAt": "2024-12-12T07:53:37.812Z"
  }
}

Authorizations

X-Consumer-Key
string
header
required

The key assigned to your company and provided via Meadow

X-Client-Key
string
header
required

The key generated and provided by our mutual client

Body

application/json
lineItems
object[]
required

The products for this purchase order

notes
string

Any relevant notes

paymentTerms
enum<string>
Available options:
net15,
net30,
net60,
cod,
custom
paymentTermsDueDate
string

If payment terms is custom then this field is required. Date formatted as YYYY-MM-DD for when payment is due.

expectedAt
string

Expected delivery date formatted as YYYY-MM-DD

externalInvoiceNumber
string

Use this to store a 3rd party ID for the PO

inventoryVendorId
number

The inventory vendor ID obtained from list or create PO. Alternatively you can use inventoryVendor.name

inventoryVendor
object

Response

Create product response

id
number

The ID of the purchase order

organizationId
number

The client organization ID

status
enum<string>

If closed no more edits can be made to this PO.

Available options:
open,
closed
finalTotal
number

Total in cents for the PO

subtotal
number

Total in cents for the PO minus any shipping & handling

inventoryVendorId
number

The ID of the inventory vendor

lineItems
object[]

The line items of the purchase order