curl --request GET \
--url https://api.loopreturns.com/api/v1/label-requests/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.loopreturns.com/api/v1/label-requests/{id}"
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/{id}', 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/{id}",
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/{id}"
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/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.loopreturns.com/api/v1/label-requests/{id}")
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{
"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."
}Get Label Request
Get details about a single label request.
Required API key scope
- Label Requests (Read)
curl --request GET \
--url https://api.loopreturns.com/api/v1/label-requests/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.loopreturns.com/api/v1/label-requests/{id}"
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/{id}', 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/{id}",
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/{id}"
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/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.loopreturns.com/api/v1/label-requests/{id}")
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{
"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.
Path Parameters
The unique identifier for the label request, created by Loop.
67329889100573
Response
Success
The unique identifier for the label request, created by Loop. Note that this
field is serialized as a string here, while the id path parameter (for example
on GET /label-requests/{id}) and CreateLabelRequest.label_request_id are
integers — callers should not assume a single JSON type for this identifier
across calls.
"67329889100573"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
An append-only history of errors reported for this label request via
POST /label-requests/{id}/errors. Its presence does not close or cancel the
request.
Show child attributes
Show child attributes
The return id of the return.
1001
The id of the shop belonging to the merchant.
50
The status of the label request.
issued, cancelled, fulfilled "issued"
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"