2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a order could not be created, etc.). Codes in the 5xx range indicate an error with Meadow’s servers (which should happen very infrequently).
Error Response
When an error is returned, it will be in the following formatA human readable string to describe the error to a developer
A code pertaining to a specific Meadow error (Example:
INVALID_API_CREDENTIALS)Some errors will contain additional information in this object to help debug the issue
Example
Error Codes
Below is a list of error codes that Meadow may return on various requests. This list does not contain every single error that is possible, so we encourage you to handle unknown codes that you have not seen before.INSUFFICIENT_PERMISSIONS
The X-Client-Key is valid but does not have the proper permissions for that endpoint
INVALID_API_CREDENTIALS
Thrown when either the X-Consumer-Key or X-Client-Key provided is invalid
INVALID_CHILD_RESOURCE
Thrown when data submitted is not owned by the parent resource specified (Example: Submitting options that belong to another product)
INVALID_IDEMPOTENCY_KEY
TheidempotencyKey submitted is not a valid uuid v4. We recommend using the idempotencyKey returned from pricing so you do not run into this error.
INVALID_INVENTORY_TYPE
A product option ID was or was not passed when it was supposed to. Check the inventoryType of the product. If it is option then productOptionId should be passed, otherwise do not include this ID in the purchase order line item.
INVALID_PARAMS
One or more of the properties in the request body is invalid.
INVALID_ORDER
An order was unable to be created for an unknown reason
INVALID_ORDER_QUANTITY
Thrown when a line item has an invalid quantity
INVALID_ORDER_TYPE
Throw when an order type (example: pickup) is submitted but the organization does not allow that type of order
MISSING_PARAMS
The request body is missing a required parameter
NON_ZERO_INVENTORY
This product has non zero inventory and the product (or option) cannot be deleted. Ask the client organization to zero out the inventory.
ORDER_MINIMUM_NOT_MET
Organizations may set minimums for orders. This is thrown if the final total is under the minimum.
OUT_OF_STOCK
Thrown when there is not enough inventory of a product or product option to create an order
PRODUCT_CATEGORY_NOT_FOUND
We could not find the category. Please use the product categories API to get a list of valid category names.
PRODUCT_IS_INACTIVE
Thrown when an organization has removed a product from their menu, but an order was submitted with it.
PURCHASE_LIMIT_EXCEEDED
Each state has its own set of purchase limits. When an order would put a customer over the limit, this error is thrown
PURCHASE_ORDER_CLOSED
The purchase order status is closed and no more updates can be made. You can ask the organization to reopen from Meadow.
PURCHASE_ORDER_LINE_ITEM_RECEIVED
This line item has been received and cannot be edited or deleted.
PURCHASE_ORDER_MISSING_CUSTOM_DATE
For customer payment terms, paymentTermsDueDate must be submitted.

