curl --request GET \
--url https://api.loopreturns.com/api/v1/label-requests \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.loopreturns.com/api/v1/label-requests"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.loopreturns.com/api/v1/label-requests', 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/label-requests",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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/label-requests"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/label-requests")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.loopreturns.com/api/v1/label-requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "67329889100573",
"addresses": {
"origin": {
"name": "John Smith",
"company": "Acme, Co",
"address1": "123 Example St",
"address2": "Box 123",
"city": "Columbus",
"state": "OH",
"zip": "12345",
"country": "United States of America",
"country_code": "US",
"phone": "+1 555-555-5555"
},
"destination": {
"name": "John Smith",
"company": "Acme, Co",
"address1": "123 Example St",
"address2": "Box 123",
"city": "Columbus",
"state": "OH",
"zip": "12345",
"country": "United States of America",
"country_code": "US",
"phone": "+1 555-555-5555"
}
},
"parcel": {
"height": 5,
"length": 20.2,
"width": 10.9,
"weight": 65.9
},
"products": [
{
"name": "Product Name",
"price": [
{
"amount": 50000,
"currency": "USD"
},
{
"amount": 25000,
"currency": "CAD"
},
{
"amount": 1500,
"currency": "EUR"
}
],
"sku": "99999999",
"country_of_origin": "USA",
"hs_code": "61051000"
}
],
"errors": [
{
"reason": "INVALID_ADDRESS",
"message": "Failed to generate a label, the origin address is invalid",
"created_at": "2023-04-25T13:25:00-05:00"
}
],
"return_id": 1001,
"shop_id": 50,
"status": "issued",
"created_at": "2023-04-25T13:25:00-05:00"
}
]
}{
"errors": "Unauthorized."
}{
"message": "Resource not found."
}List Label Requests
Retrieve a list of label requests.
The status query parameter accepts exactly three values — issued, cancelled, or
fulfilled. There is no separate status for a request that has reported an error: a
label request with one or more entries in its errors array remains issued and will
keep appearing in status=issued results until it is fulfilled or cancelled. An
integration that polls this endpoint should track which ids it has already reported
errors for, since the status alone will not reveal that — though each returned
LabelRequestResponse does carry that errors array, so a poller can also detect an
already-errored request directly from the payload.
Required API key scope
- Label Requests (Read)
curl --request GET \
--url https://api.loopreturns.com/api/v1/label-requests \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.loopreturns.com/api/v1/label-requests"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.loopreturns.com/api/v1/label-requests', 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/label-requests",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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/label-requests"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/label-requests")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.loopreturns.com/api/v1/label-requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "67329889100573",
"addresses": {
"origin": {
"name": "John Smith",
"company": "Acme, Co",
"address1": "123 Example St",
"address2": "Box 123",
"city": "Columbus",
"state": "OH",
"zip": "12345",
"country": "United States of America",
"country_code": "US",
"phone": "+1 555-555-5555"
},
"destination": {
"name": "John Smith",
"company": "Acme, Co",
"address1": "123 Example St",
"address2": "Box 123",
"city": "Columbus",
"state": "OH",
"zip": "12345",
"country": "United States of America",
"country_code": "US",
"phone": "+1 555-555-5555"
}
},
"parcel": {
"height": 5,
"length": 20.2,
"width": 10.9,
"weight": 65.9
},
"products": [
{
"name": "Product Name",
"price": [
{
"amount": 50000,
"currency": "USD"
},
{
"amount": 25000,
"currency": "CAD"
},
{
"amount": 1500,
"currency": "EUR"
}
],
"sku": "99999999",
"country_of_origin": "USA",
"hs_code": "61051000"
}
],
"errors": [
{
"reason": "INVALID_ADDRESS",
"message": "Failed to generate a label, the origin address is invalid",
"created_at": "2023-04-25T13:25:00-05:00"
}
],
"return_id": 1001,
"shop_id": 50,
"status": "issued",
"created_at": "2023-04-25T13:25:00-05:00"
}
]
}{
"errors": "Unauthorized."
}{
"message": "Resource not found."
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Query Parameters
Returns label requests after or equal to a minimum date. A date-time value in ISO 8601 format. What it represents (for example, when a label, label request, or reported error was created, or a date-range filter bound) depends on the field or parameter referencing this schema.
"2023-04-25T13:25:00-05:00"
Returns label requests before a maximum date. A date-time value in ISO 8601 format. What it represents (for example, when a label, label request, or reported error was created, or a date-range filter bound) depends on the field or parameter referencing this schema.
"2023-04-25T13:25:00-05:00"
Return label requests associated with a specific return_id.
67329889100573
The status of the label request.
issued, cancelled, fulfilled "issued"
The per page limit of label requests to return
0 <= x <= 250The number of label requests to offset.
x >= 0Response
Success
Show child attributes
Show child attributes