curl --request GET \
--url https://api-staging.getmeadow.com/api/v1/purchase-orders \
--header 'X-Client-Key: <api-key>' \
--header 'X-Consumer-Key: <api-key>'import requests
url = "https://api-staging.getmeadow.com/api/v1/purchase-orders"
headers = {
"X-Consumer-Key": "<api-key>",
"X-Client-Key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Consumer-Key': '<api-key>', 'X-Client-Key': '<api-key>'}
};
fetch('https://api-staging.getmeadow.com/api/v1/purchase-orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-staging.getmeadow.com/api/v1/purchase-orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Client-Key: <api-key>",
"X-Consumer-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-staging.getmeadow.com/api/v1/purchase-orders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Consumer-Key", "<api-key>")
req.Header.Add("X-Client-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-staging.getmeadow.com/api/v1/purchase-orders")
.header("X-Consumer-Key", "<api-key>")
.header("X-Client-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.getmeadow.com/api/v1/purchase-orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Consumer-Key"] = '<api-key>'
request["X-Client-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": 642,
"status": "open",
"notes": "test notes",
"expectedAt": "2024-01-25",
"paymentStatus": "unpaid",
"paymentTerms": "custom",
"paymentTermsDueDate": "2024-02-02",
"totalAmount": "45",
"totalAmountReceived": "50",
"subtotal": 37700,
"finalTotal": 38000,
"caExciseTotal": 0,
"shippingHandlingFee": 300,
"shippingHandlingFeeExcise": 0,
"amountPaid": 0,
"amountOutstanding": 38000,
"externalInvoiceNumber": "123456",
"createdAt": "2024-01-24T00:29:39.641Z",
"vendor": {
"id": 3,
"name": "Emerald Green 420 Distributors",
"phone": "",
"notes": "On time distributor",
"email": "",
"sellerPermitNumber": "420247123",
"street1": "420 Main Street",
"street2": null,
"city": "San Francisco",
"state": "CA",
"postalCode": "94103",
"createdAt": "2017-02-20T11:29:03.882-08:00"
},
"lineItems": [
{
"id": 1037,
"amount": "7",
"costPerUnit": "5.00",
"subtotal": 3500,
"amountReceived": "50",
"finalTotal": 3500,
"caExcisePerUnit": "0",
"caExciseTotal": 0,
"createdAt": "2024-01-24T00:29:39.656Z",
"receptions": [
{
"inventoryLocationId": 88,
"amount": "50",
"createdAt": "2024-01-24T00:30:47.181Z"
}
],
"product": {
"id": 675,
"name": "#Lunchbreak",
"unit": "gram",
"strainType": "sativa",
"createdAt": "2019-07-17T17:14:58.523Z",
"primaryCategory": {
"id": 8,
"name": "Flowers",
"cannabisType": "non-concentrated",
"createdAt": "2016-04-02T08:03:27.028Z"
}
}
},
{
"id": 1038,
"amount": "38",
"costPerUnit": "9.00",
"subtotal": 34200,
"amountReceived": "0",
"finalTotal": 34200,
"caExcisePerUnit": "0",
"caExciseTotal": 0,
"createdAt": "2024-01-24T00:29:39.656Z",
"receptions": [],
"product": {
"id": 9759,
"name": "41 Unicornz",
"unit": "item",
"strainType": "sativa",
"createdAt": "2023-10-02T18:33:52.134Z",
"primaryCategory": {
"id": 253,
"name": "Vapes",
"cannabisType": "concentrated",
"createdAt": "2023-04-14T21:25:36.473Z"
}
}
}
]
},
{
"id": 641,
"status": "open",
"notes": null,
"expectedAt": null,
"paymentStatus": "unpaid",
"paymentTerms": null,
"paymentTermsDueDate": null,
"totalAmount": "1",
"totalAmountReceived": "0",
"subtotal": 100,
"finalTotal": 100,
"caExciseTotal": 0,
"shippingHandlingFee": 0,
"shippingHandlingFeeExcise": 0,
"amountPaid": 0,
"amountOutstanding": 100,
"externalInvoiceNumber": null,
"createdAt": "2024-01-10T22:38:48.857Z",
"vendor": null,
"lineItems": [
{
"id": 1036,
"amount": "1",
"costPerUnit": "1.00",
"subtotal": 100,
"amountReceived": "0",
"finalTotal": 100,
"caExcisePerUnit": "0",
"caExciseTotal": 0,
"createdAt": "2024-01-10T22:38:48.864Z",
"receptions": [],
"product": {
"id": 10039,
"name": "Blue Dream",
"unit": "gram",
"strainType": "sativa",
"createdAt": "2024-01-10T22:38:00.373Z",
"primaryCategory": {
"id": 8,
"name": "Flowers",
"cannabisType": "non-concentrated",
"createdAt": "2016-04-02T08:03:27.028Z"
}
}
}
]
}
]
}{
"error": {
"message": "A description of the error code",
"code": "CODE_OF_ERROR_WILL_BE_HERE"
}
}List purchase orders
Retrieve all purchase orders for an organization in reverse chronological order. 50 purchase orders will be returned at a time and may be paginated using the startingAfter query parameter.
curl --request GET \
--url https://api-staging.getmeadow.com/api/v1/purchase-orders \
--header 'X-Client-Key: <api-key>' \
--header 'X-Consumer-Key: <api-key>'import requests
url = "https://api-staging.getmeadow.com/api/v1/purchase-orders"
headers = {
"X-Consumer-Key": "<api-key>",
"X-Client-Key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Consumer-Key': '<api-key>', 'X-Client-Key': '<api-key>'}
};
fetch('https://api-staging.getmeadow.com/api/v1/purchase-orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-staging.getmeadow.com/api/v1/purchase-orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Client-Key: <api-key>",
"X-Consumer-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-staging.getmeadow.com/api/v1/purchase-orders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Consumer-Key", "<api-key>")
req.Header.Add("X-Client-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-staging.getmeadow.com/api/v1/purchase-orders")
.header("X-Consumer-Key", "<api-key>")
.header("X-Client-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.getmeadow.com/api/v1/purchase-orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Consumer-Key"] = '<api-key>'
request["X-Client-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": 642,
"status": "open",
"notes": "test notes",
"expectedAt": "2024-01-25",
"paymentStatus": "unpaid",
"paymentTerms": "custom",
"paymentTermsDueDate": "2024-02-02",
"totalAmount": "45",
"totalAmountReceived": "50",
"subtotal": 37700,
"finalTotal": 38000,
"caExciseTotal": 0,
"shippingHandlingFee": 300,
"shippingHandlingFeeExcise": 0,
"amountPaid": 0,
"amountOutstanding": 38000,
"externalInvoiceNumber": "123456",
"createdAt": "2024-01-24T00:29:39.641Z",
"vendor": {
"id": 3,
"name": "Emerald Green 420 Distributors",
"phone": "",
"notes": "On time distributor",
"email": "",
"sellerPermitNumber": "420247123",
"street1": "420 Main Street",
"street2": null,
"city": "San Francisco",
"state": "CA",
"postalCode": "94103",
"createdAt": "2017-02-20T11:29:03.882-08:00"
},
"lineItems": [
{
"id": 1037,
"amount": "7",
"costPerUnit": "5.00",
"subtotal": 3500,
"amountReceived": "50",
"finalTotal": 3500,
"caExcisePerUnit": "0",
"caExciseTotal": 0,
"createdAt": "2024-01-24T00:29:39.656Z",
"receptions": [
{
"inventoryLocationId": 88,
"amount": "50",
"createdAt": "2024-01-24T00:30:47.181Z"
}
],
"product": {
"id": 675,
"name": "#Lunchbreak",
"unit": "gram",
"strainType": "sativa",
"createdAt": "2019-07-17T17:14:58.523Z",
"primaryCategory": {
"id": 8,
"name": "Flowers",
"cannabisType": "non-concentrated",
"createdAt": "2016-04-02T08:03:27.028Z"
}
}
},
{
"id": 1038,
"amount": "38",
"costPerUnit": "9.00",
"subtotal": 34200,
"amountReceived": "0",
"finalTotal": 34200,
"caExcisePerUnit": "0",
"caExciseTotal": 0,
"createdAt": "2024-01-24T00:29:39.656Z",
"receptions": [],
"product": {
"id": 9759,
"name": "41 Unicornz",
"unit": "item",
"strainType": "sativa",
"createdAt": "2023-10-02T18:33:52.134Z",
"primaryCategory": {
"id": 253,
"name": "Vapes",
"cannabisType": "concentrated",
"createdAt": "2023-04-14T21:25:36.473Z"
}
}
}
]
},
{
"id": 641,
"status": "open",
"notes": null,
"expectedAt": null,
"paymentStatus": "unpaid",
"paymentTerms": null,
"paymentTermsDueDate": null,
"totalAmount": "1",
"totalAmountReceived": "0",
"subtotal": 100,
"finalTotal": 100,
"caExciseTotal": 0,
"shippingHandlingFee": 0,
"shippingHandlingFeeExcise": 0,
"amountPaid": 0,
"amountOutstanding": 100,
"externalInvoiceNumber": null,
"createdAt": "2024-01-10T22:38:48.857Z",
"vendor": null,
"lineItems": [
{
"id": 1036,
"amount": "1",
"costPerUnit": "1.00",
"subtotal": 100,
"amountReceived": "0",
"finalTotal": 100,
"caExcisePerUnit": "0",
"caExciseTotal": 0,
"createdAt": "2024-01-10T22:38:48.864Z",
"receptions": [],
"product": {
"id": 10039,
"name": "Blue Dream",
"unit": "gram",
"strainType": "sativa",
"createdAt": "2024-01-10T22:38:00.373Z",
"primaryCategory": {
"id": 8,
"name": "Flowers",
"cannabisType": "non-concentrated",
"createdAt": "2016-04-02T08:03:27.028Z"
}
}
}
]
}
]
}{
"error": {
"message": "A description of the error code",
"code": "CODE_OF_ERROR_WILL_BE_HERE"
}
}Authorizations
The key assigned to your company and provided via Meadow
The key generated and provided by our mutual client
Query Parameters
The id for a purchase order that you want to retrieve all purchase orders after this one. Pass in the last id in a response to retrieve the next page.
Response
List purchase orders response
The ID of the purchase order
Either open or closed
User entered notes for this purchase order
A date for when this purchase order is expected in YYYY-MM-DD
Either paid, unpaid, or partial
One of net15, net30, net60, cod or custom
The payment terms due date
The total amount (quantity) of product on this purchase order
The total amount (quantity) of product received on this purchase order
The subtotal of the purchase order in cents
The final total of the purchase order in cents
The number for pre-2023 California excise of this purchase order in cents
The shipping fee in cents
The number for pre-2023 California excise of the shipping and handling fee
The amount paid for this purchase order in cents
The amount still left to be paid in cents
The external invoice number
When this purchase order was created
Information about the loyalty of the customer (Can be null)
Hide child attributes
Hide child attributes
The id for this vendor
The name of this vendor
The phone for this vendor
User entered notes about this vendor
The email of this vendor
The license number for this vendor
When this vendor was created
All of the line items for this purchase order
Hide child attributes
Hide child attributes
The id of this line item
The amount (quantity) for the product in this line item
The cost for each amount of this line item in dollars
The subtotal for this line item in cents
The final total for this line item in cents
The amount that has been received thus far
The amount of pre-2023 California excise tax per unit in dollars
The total amount of pre-2023 California excise tax for this line item in cents
All of the receptions for this purchase order line item
The product that this line item is for
Hide child attributes
Hide child attributes
The ID of the product
The name of the product
Either gram or item
The strain type of the product
The category for this product
Hide child attributes
Hide child attributes
ID of the category
The name of the category
One of the following values:
non-concentrated - Flower or other non-concentrated THC products
concentrated - Concentrated THC products (Example: Edibles, Concentrates)
immature-plant - Cannabis plants
none - This product does not contain cannabis
mi-infused-solids - Cannabis infused solids (only in Michigan) (Example: edibles)
mi-infused-fluids - Cannabis infused fluids (only in Michigan) (Example: drinks)
edibles - Edible product (only used in New Jersey & Massachusetts)

