title | description |
---|---|
Responses |
How to handle responses from Meadow endpoints |
You may notice there are extra properties in a response than are documented on the respective endpoint. Generally speaking, you should only ever have to use the properties that we explicitly document. If you have any questions, please feel free to reach out.
The Meadow API is completely JSON based. All of our response's are wrapped in a data
envelope like this:
{
"data": {
"key": "value"
}
}
For endpoints that return multiple items, they will be formatted like this:
{
"data": [
{
"key": "value"
},
{
"key": "value"
}
]
}
Almost all prices/monetary amounts contained in the Meadow API will be represented as a JSON Number in cents. I.E. 24310
is equivalent to $243.10
One notable exception to this rule is product and product option movingAverageCostPerUnit
because they contain more decimal places than 2. These properties will be returned as strings representing dollars. Here is an example:
{
"movingAverageCostPerUnit": "43.097334",
}