List Label Requests
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."
}Label Requests
List Label Requests
Retrieve a list of label requests.
Required API key scope
- Label Requests (Read)
GET
/
label-requests
List Label Requests
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
oauth2label-requests-read
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. The date the label was created.
Example:
"2023-04-25T13:25:00-05:00"
Returns label requests before a maximum date. The date the label was created.
Example:
"2023-04-25T13:25:00-05:00"
Return label requests associated with a specific return_id.
Example:
67329889100573
The status of the label request.
Available options:
issued, cancelled, fulfilled Example:
"issued"
The per page limit of label requests to return
Required range:
0 <= x <= 250The number of label requests to offset.
Required range:
x >= 0Response
Success
Show child attributes
Show child attributes
⌘I