curl --request GET \
--url https://api-staging.getmeadow.com/api/v1/order-returns \
--header 'X-Client-Key: <api-key>' \
--header 'X-Consumer-Key: <api-key>'import requests
url = "https://api-staging.getmeadow.com/api/v1/order-returns"
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/order-returns', 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/order-returns",
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/order-returns"
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/order-returns")
.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/order-returns")
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": 361,
"orderId": "12604007",
"refundType": "payment-method",
"refundInitial": -5000,
"refundTotal": -5541,
"creditsTotal": 0,
"discountsTotal": 1000,
"adjustmentAmount": 0,
"adjustmentDescription": "",
"paymentTypeName": "Cash",
"loyaltyTotal": 0,
"voidedAt": null,
"voidedReason": null,
"createdAt": "2024-01-01T21:26:56.051Z",
"lineItems": [
{
"orderLineItemId": 9769,
"type": "return",
"inventoryAction": "vendor",
"quantity": 1,
"reason": "test",
"fulfillAs": []
}
],
"taxes": [
{
"taxId": 240,
"amount": -400,
"description": "Local Tax",
"refunded": true,
"rate": "10",
"included": false,
"exemptable": false,
"type": "standard",
"tier": "1"
},
{
"taxId": 241,
"amount": -660,
"description": "Excise Tax",
"refunded": true,
"rate": "15",
"included": false,
"exemptable": false,
"type": "california-excise",
"tier": "2"
},
{
"taxId": 242,
"amount": -481,
"description": "State Sales Tax",
"refunded": true,
"rate": "9.5",
"included": false,
"exemptable": true,
"type": "standard",
"tier": "3"
}
],
"createdBy": {
"id": 519,
"email": "employee@getmeadow.com",
"firstName": "Employee",
"lastName": "Name"
},
"voidedBy": {}
},
{
"id": 360,
"orderId": "210919262",
"refundType": "payment-method",
"refundInitial": -1000,
"refundTotal": -1265,
"creditsTotal": 0,
"discountsTotal": 0,
"adjustmentAmount": 0,
"adjustmentDescription": "",
"paymentTypeName": "Cash",
"loyaltyTotal": 0,
"voidedAt": null,
"voidedReason": null,
"createdAt": "2023-09-15T17:01:13.656Z",
"lineItems": [
{
"orderLineItemId": 9123,
"type": "exchange",
"inventoryAction": "waste",
"quantity": 1,
"reason": "x",
"fulfillAs": [
{
"optionSum": -1,
"quantityFulfilled": "1",
"productOptionId": 167,
"pkg": {
"label": "STAGING01234567000000004",
"unit": "Grams"
}
}
]
}
],
"taxes": [
{
"taxId": 240,
"amount": -100,
"description": "Local Tax",
"refunded": true,
"rate": "10",
"included": false,
"exemptable": false,
"type": "standard",
"tier": "1"
},
{
"taxId": 241,
"amount": -165,
"description": "Excise Tax",
"refunded": true,
"rate": "15",
"included": false,
"exemptable": false,
"type": "california-excise",
"tier": "2"
},
{
"taxId": 242,
"amount": 0,
"description": "State Sales Tax",
"refunded": true,
"rate": "9.5",
"included": false,
"exemptable": true,
"type": "standard",
"tier": "3"
}
],
"createdBy": {
"id": 519,
"email": "employee@getmeadow.com",
"firstName": "Employee",
"lastName": "Name"
},
"voidedBy": {}
}
]
}{
"error": {
"message": "A description of the error code",
"code": "CODE_OF_ERROR_WILL_BE_HERE"
}
}List order returns
Retrieve all order returns for an organization in reverse chronological order. 50 order returns 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/order-returns \
--header 'X-Client-Key: <api-key>' \
--header 'X-Consumer-Key: <api-key>'import requests
url = "https://api-staging.getmeadow.com/api/v1/order-returns"
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/order-returns', 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/order-returns",
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/order-returns"
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/order-returns")
.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/order-returns")
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": 361,
"orderId": "12604007",
"refundType": "payment-method",
"refundInitial": -5000,
"refundTotal": -5541,
"creditsTotal": 0,
"discountsTotal": 1000,
"adjustmentAmount": 0,
"adjustmentDescription": "",
"paymentTypeName": "Cash",
"loyaltyTotal": 0,
"voidedAt": null,
"voidedReason": null,
"createdAt": "2024-01-01T21:26:56.051Z",
"lineItems": [
{
"orderLineItemId": 9769,
"type": "return",
"inventoryAction": "vendor",
"quantity": 1,
"reason": "test",
"fulfillAs": []
}
],
"taxes": [
{
"taxId": 240,
"amount": -400,
"description": "Local Tax",
"refunded": true,
"rate": "10",
"included": false,
"exemptable": false,
"type": "standard",
"tier": "1"
},
{
"taxId": 241,
"amount": -660,
"description": "Excise Tax",
"refunded": true,
"rate": "15",
"included": false,
"exemptable": false,
"type": "california-excise",
"tier": "2"
},
{
"taxId": 242,
"amount": -481,
"description": "State Sales Tax",
"refunded": true,
"rate": "9.5",
"included": false,
"exemptable": true,
"type": "standard",
"tier": "3"
}
],
"createdBy": {
"id": 519,
"email": "employee@getmeadow.com",
"firstName": "Employee",
"lastName": "Name"
},
"voidedBy": {}
},
{
"id": 360,
"orderId": "210919262",
"refundType": "payment-method",
"refundInitial": -1000,
"refundTotal": -1265,
"creditsTotal": 0,
"discountsTotal": 0,
"adjustmentAmount": 0,
"adjustmentDescription": "",
"paymentTypeName": "Cash",
"loyaltyTotal": 0,
"voidedAt": null,
"voidedReason": null,
"createdAt": "2023-09-15T17:01:13.656Z",
"lineItems": [
{
"orderLineItemId": 9123,
"type": "exchange",
"inventoryAction": "waste",
"quantity": 1,
"reason": "x",
"fulfillAs": [
{
"optionSum": -1,
"quantityFulfilled": "1",
"productOptionId": 167,
"pkg": {
"label": "STAGING01234567000000004",
"unit": "Grams"
}
}
]
}
],
"taxes": [
{
"taxId": 240,
"amount": -100,
"description": "Local Tax",
"refunded": true,
"rate": "10",
"included": false,
"exemptable": false,
"type": "standard",
"tier": "1"
},
{
"taxId": 241,
"amount": -165,
"description": "Excise Tax",
"refunded": true,
"rate": "15",
"included": false,
"exemptable": false,
"type": "california-excise",
"tier": "2"
},
{
"taxId": 242,
"amount": 0,
"description": "State Sales Tax",
"refunded": true,
"rate": "9.5",
"included": false,
"exemptable": true,
"type": "standard",
"tier": "3"
}
],
"createdBy": {
"id": 519,
"email": "employee@getmeadow.com",
"firstName": "Employee",
"lastName": "Name"
},
"voidedBy": {}
}
]
}{
"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 an order return that you want to retrieve all order returns after this one. Pass in the last id in a response to retrieve the next page.
Pass in true if you would like to only receive voided returns. Voided returns are ones that were cancelled and are no longer considered valid.
Response
Order return response
The ID of this return
One of payment-method, store-credit or none
The initial refund before taxes, credits, adjustments, loyalty, and discounts
The final refund total of the return
The amount of credits refunded from the order
The amount of discounts refunded from the order
A manual adjustment of the refund for this return
A description for the adjustment if there is one
The name of the payment type this refund was processed as
The amount of a loyalty redemption returned
The date that this return was voided or null. If there is a value here, it means the return was canceled and is no longer applicable
The reason this return was voided
The date this return was created
An array of line items for this return
Hide child attributes
Hide child attributes
The ID of the lineItems[].id that is being returned
Either return or exchange
One of waste, inventory , or vendor.
The quantity of the order line item being returned
A reason this line item is being returned
Fulfillment information for the packages on this return. See lineItems[].fulfillAs for possible properties
An array of tax information about this return
Hide child attributes
Hide child attributes
The amount of tax proportionally applied to this return
A description of the tax
A boolean of whether this tax was refunded to the customer or not
The tax rate
Whether this tax was included in the price of the products
Whether this tax was exemptable or not
The employee that voided this return (or {} if it is not voided)

