curl --request GET \
--url https://api.loopreturns.com/api/v1/happy-returns/shipments \
--header 'X-Authorization: <api-key>'import requests
url = "https://api.loopreturns.com/api/v1/happy-returns/shipments"
headers = {"X-Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Authorization': '<api-key>'}};
fetch('https://api.loopreturns.com/api/v1/happy-returns/shipments', 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.loopreturns.com/api/v1/happy-returns/shipments",
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-Authorization: <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.loopreturns.com/api/v1/happy-returns/shipments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Authorization", "<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.loopreturns.com/api/v1/happy-returns/shipments")
.header("X-Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.loopreturns.com/api/v1/happy-returns/shipments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"current_page": 1,
"data": [
{
"loop_shipment_id": 12345,
"happy_returns_shipment_id": "123456",
"line_item_count": 2,
"return_count": 1,
"created_at": "2024-03-19T12:34:56+00:00",
"updated_at": "2024-03-20T12:34:56+00:00"
}
],
"first_page_url": "https://api.loopreturns.com/api/v1/happy-returns/shipments/list?from=2022-01-01&to=2023-03-01&page=1",
"from": 1,
"last_page": 1,
"last_page_url": "https://api.loopreturns.com/api/v1/happy-returns/shipments/list?from=2022-01-01&to=2023-03-01&page=1",
"next_page_url": "<string>",
"path": "https://api.loopreturns.com/api/v1/happy-returns/shipments/list",
"per_page": 200,
"prev_page_url": "<string>",
"to": 1,
"total": 1
}{
"errors": "Unauthorized."
}{
"message": "Not Found"
}{
"message": "The from field must be a valid ATOM date.",
"errors": {
"from": [
"The from field must be a valid ATOM date."
]
}
}Get Shipments
Get information about all Happy Returns shipments created within a given timeframe. The response is a paginated list of shipments, with up to 200 shipments per page.
If no date range is provided, the response will return data from the last 24 hours.
Required API key scope
- Happy Returns Shipments (Read)
curl --request GET \
--url https://api.loopreturns.com/api/v1/happy-returns/shipments \
--header 'X-Authorization: <api-key>'import requests
url = "https://api.loopreturns.com/api/v1/happy-returns/shipments"
headers = {"X-Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Authorization': '<api-key>'}};
fetch('https://api.loopreturns.com/api/v1/happy-returns/shipments', 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.loopreturns.com/api/v1/happy-returns/shipments",
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-Authorization: <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.loopreturns.com/api/v1/happy-returns/shipments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Authorization", "<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.loopreturns.com/api/v1/happy-returns/shipments")
.header("X-Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.loopreturns.com/api/v1/happy-returns/shipments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"current_page": 1,
"data": [
{
"loop_shipment_id": 12345,
"happy_returns_shipment_id": "123456",
"line_item_count": 2,
"return_count": 1,
"created_at": "2024-03-19T12:34:56+00:00",
"updated_at": "2024-03-20T12:34:56+00:00"
}
],
"first_page_url": "https://api.loopreturns.com/api/v1/happy-returns/shipments/list?from=2022-01-01&to=2023-03-01&page=1",
"from": 1,
"last_page": 1,
"last_page_url": "https://api.loopreturns.com/api/v1/happy-returns/shipments/list?from=2022-01-01&to=2023-03-01&page=1",
"next_page_url": "<string>",
"path": "https://api.loopreturns.com/api/v1/happy-returns/shipments/list",
"per_page": 200,
"prev_page_url": "<string>",
"to": 1,
"total": 1
}{
"errors": "Unauthorized."
}{
"message": "Not Found"
}{
"message": "The from field must be a valid ATOM date.",
"errors": {
"from": [
"The from field must be a valid ATOM date."
]
}
}Authorizations
Query Parameters
The start date and time for the shipment list, using the ISO 8601 date format.
"2024-01-01T00:00:00.000Z"
The end date and time for the shipment list, using the ISO 8601 date format.
"2024-03-31T23:59:59.000Z"
The page number of paginated results to return.
x >= 11
Response
Success
The identifier associated with the current page.
1
The data for each entry in the shipment list.
Show child attributes
Show child attributes
The link to the first page of paginated results.
"https://api.loopreturns.com/api/v1/happy-returns/shipments/list?from=2022-01-01&to=2023-03-01&page=1"
The number of the first shipment on the page.
1
The identifier associated with the last page.
1
The link to the last page of paginated results.
"https://api.loopreturns.com/api/v1/happy-returns/shipments/list?from=2022-01-01&to=2023-03-01&page=1"
The link to the next page of paginated results.
The endpoint's path.
"https://api.loopreturns.com/api/v1/happy-returns/shipments/list"
The number of shipments per page.
200
The link to the previous page of paginated results.
The number of the last shipment on the page.
1
The total number of shipments returned.
1