curl --request GET \
--url https://api.loopreturns.com/api/v1/happy-returns/shipments/{id}/items \
--header 'X-Authorization: <api-key>'import requests
url = "https://api.loopreturns.com/api/v1/happy-returns/shipments/{id}/items"
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/{id}/items', 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/{id}/items",
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/{id}/items"
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/{id}/items")
.header("X-Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.loopreturns.com/api/v1/happy-returns/shipments/{id}/items")
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": [
{
"carrier": "ups",
"happy_returns_return_bag_barcodes": [
"HRABCDEF-1234-1"
],
"happy_returns_rma_id": "HRABCDEF",
"happy_returns_shipment_id": "45678",
"item_title": "T-Shirt",
"order_name": "#1234",
"po_number": "PO-123456",
"return_id": 123,
"shipment_id": 12345,
"shipping_box_barcode": "SB-12345678",
"sku": "SKU-123456",
"tracking_number": "1Z1234567890",
"variant_title": "Blue",
"created_at": "2024-03-19T12:34:56+00:00"
}
],
"first_page_url": "https://api.loopreturns.com/api/v1/happy-returns/shipments/123/items?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "https://api.loopreturns.com/api/v1/happy-returns/shipments/123/items?page=1",
"next_page_url": "<string>",
"path": "https://api.loopreturns.com/api/v1/happy-returns/shipments/123/items",
"per_page": 200,
"prev_page_url": "<string>",
"to": 1,
"total": 1
}{
"errors": "Unauthorized."
}{
"message": "Not Found"
}Get Shipment Items
Get all items for a Happy Returns shipment.
Required API key scope
- Happy Returns Shipments (Read)
curl --request GET \
--url https://api.loopreturns.com/api/v1/happy-returns/shipments/{id}/items \
--header 'X-Authorization: <api-key>'import requests
url = "https://api.loopreturns.com/api/v1/happy-returns/shipments/{id}/items"
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/{id}/items', 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/{id}/items",
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/{id}/items"
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/{id}/items")
.header("X-Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.loopreturns.com/api/v1/happy-returns/shipments/{id}/items")
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": [
{
"carrier": "ups",
"happy_returns_return_bag_barcodes": [
"HRABCDEF-1234-1"
],
"happy_returns_rma_id": "HRABCDEF",
"happy_returns_shipment_id": "45678",
"item_title": "T-Shirt",
"order_name": "#1234",
"po_number": "PO-123456",
"return_id": 123,
"shipment_id": 12345,
"shipping_box_barcode": "SB-12345678",
"sku": "SKU-123456",
"tracking_number": "1Z1234567890",
"variant_title": "Blue",
"created_at": "2024-03-19T12:34:56+00:00"
}
],
"first_page_url": "https://api.loopreturns.com/api/v1/happy-returns/shipments/123/items?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "https://api.loopreturns.com/api/v1/happy-returns/shipments/123/items?page=1",
"next_page_url": "<string>",
"path": "https://api.loopreturns.com/api/v1/happy-returns/shipments/123/items",
"per_page": 200,
"prev_page_url": "<string>",
"to": 1,
"total": 1
}{
"errors": "Unauthorized."
}{
"message": "Not Found"
}Authorizations
Path Parameters
The unique identifier associated with the shipment, assigned by Loop.
Query Parameters
The page number of paginated results to return.
1
Response
Success
The identifier associated with the current page.
1
The data for each item in the shipment.
Show child attributes
Show child attributes
The link to the first page of paginated results.
"https://api.loopreturns.com/api/v1/happy-returns/shipments/123/items?page=1"
The number of the first item 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/123/items?page=1"
The link to the next page of paginated results.
The endpoint's path.
"https://api.loopreturns.com/api/v1/happy-returns/shipments/123/items"
The number of items per page.
200
The link to the previous page of paginated results.
The number of the last item on the page.
1
The total number of items returned.
1