Skip to main content
GET
/
happy-returns
/
shipments
/
{id}
/
items
Get Shipment Items
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": 123,
  "data": [
    {
      "carrier": "<string>",
      "happy_returns_return_bag_barcodes": [
        "<string>"
      ],
      "happy_returns_rma_id": "<string>",
      "happy_returns_shipment_id": "<string>",
      "item_title": "<string>",
      "order_name": "<string>",
      "po_number": "<string>",
      "return_id": 123,
      "shipment_id": 123,
      "shipping_box_barcode": "<string>",
      "sku": "<string>",
      "tracking_number": "<string>",
      "variant_title": "<string>",
      "created_at": "2023-11-07T05:31:56Z"
    }
  ],
  "first_page_url": "<string>",
  "from": 123,
  "last_page": 123,
  "last_page_url": "<string>",
  "next_page_url": "<string>",
  "path": "<string>",
  "per_page": 123,
  "prev_page_url": "<string>",
  "to": 123,
  "total": 123
}
{
"errors": "<string>"
}
{
"message": "<string>"
}

Authorizations

X-Authorization
string
header
required

Path Parameters

id
integer
required

The unique identifier associated with the shipment, assigned by Loop.

Query Parameters

page
integer

The page number of paginated results to return.

Example:

1

Response

Success

current_page
integer

The identifier associated with the current page.

Example:

1

data
object[]

The data for each item in the shipment.

first_page_url
string

The link to the first page of paginated results.

Example:

"https://api.loopreturns.com/api/v1/happy-returns/shipments/123/items?page=1"

from
integer

The number of the first item on the page.

Example:

1

last_page
integer

The identifier associated with the last page.

Example:

1

last_page_url
string

The link to the last page of paginated results.

Example:

"https://api.loopreturns.com/api/v1/happy-returns/shipments/123/items?page=1"

next_page_url
string | null

The link to the next page of paginated results.

path
string

The endpoint's path.

Example:

"https://api.loopreturns.com/api/v1/happy-returns/shipments/123/items"

per_page
integer

The number of items per page.

Example:

200

prev_page_url
string | null

The link to the previous page of paginated results.

to
integer

The number of the last item on the page.

Example:

1

total
integer

The total number of items returned.

Example:

1