Skip to main content
POST
/
api
/
v1
/
orders
/
pricing
cURL
curl --request POST \
  --url https://api-staging.getmeadow.com/api/v1/orders/pricing \
  --header 'Content-Type: application/json' \
  --header 'X-Client-Key: <api-key>' \
  --header 'X-Consumer-Key: <api-key>' \
  --data '
{
  "type": "delivery",
  "lineItems": [
    {
      "productOptionId": 123,
      "quantity": 123
    }
  ],
  "customer": {
    "firstName": "<string>",
    "lastName": "<string>",
    "email": "<string>",
    "phone": "<string>",
    "birthday": "<string>"
  },
  "postalCode": "<string>",
  "deliveryFee": 123,
  "deliveryFeeDescription": "<string>"
}
'
{
  "lineItems": [
    {
      "productOptionId": 123,
      "quantity": 123,
      "unitPrice": 123,
      "subtotalPrice": 123,
      "finalPrice": 123,
      "discounts": [
        {
          "amountUsed": 123,
          "description": "<string>"
        }
      ]
    }
  ],
  "totalPrice": 123,
  "netPrice": 123,
  "customerGrandTotal": 123,
  "discounts": [
    {
      "amountUsed": 123,
      "description": "<string>"
    }
  ],
  "credits": [
    {
      "amountUsed": 123,
      "description": "<string>"
    }
  ],
  "adjustments": [
    {
      "amount": 123,
      "description": "<string>"
    }
  ],
  "taxes": [
    {
      "amount": 123,
      "description": "<string>"
    }
  ],
  "orderMinimum": 123,
  "metOrderMinimum": true,
  "idempotencyKey": "<string>"
}

How to display to a customer

When displaying the pricing information to a customer, here is how Meadow displays: Subtotal: totalPrice credits[].descriptioncredits[].amountUsed discounts[].descriptiondiscounts[].amountUsed adjustments[].descriptionadjustments[].amount taxes[].descriptiontaxes[].amount Total: customerGrandTotal Screenshot from our backend app:

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
type
enum<string>
required

The type of the order

Available options:
delivery,
pickup
lineItems
object[]
required

An array of products to buy

customer
object

The customer for this order. This object is optional, but if provided, must have a firstName, lastName and either an email or phone.

postalCode
string

The postal code for this order. This will take into account an organization’s order minimums

deliveryFee
number

A fee that will be passed through and added onto the customerGrandTotal

deliveryFeeDescription
string

A passthrough title for the delivery fee

Response

Order cart pricing response

lineItems
object[]

The line items of this cart

totalPrice
number

The subtotal price before discounts, credits, adjustments are taken into account.

netPrice
number

The final price of the order before payment & delivery fees.

customerGrandTotal
number

The cost of the order that the customer will pay

discounts
object[]

An array of order level discounts

credits
object[]

An array of credits applied. May be store credit or promo codes attached to the customers account.

adjustments
object[]

An array of adjustments made to the order. May be a tax exemption or other future Meadow POS behavior.

taxes
object[]

All of the taxes that will be applied if an order is placed with this cart

orderMinimum
number

The order minimum for this dispensary and postal code

metOrderMinimum
boolean

Whether this cart has met the order minimum or not

idempotencyKey
string

A string that should be used when creating an order to ensure idempotency and avoid double orders due to server miscommunication.