Get Label Request
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."
}Label Requests
Get Label Request
Get details about a single label request.
Required API key scope
- Label Requests (Read)
GET
/
label-requests
/
{id}
Get Label Request
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
oauth2label-requests-read
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.
Example:
67329889100573
Response
Success
The unique identifier for the label request, created by Loop.
Example:
"67329889100573"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The return id of the return.
Example:
1001
The id of the shop belonging to the merchant.
Example:
50
The status of the label request.
Available options:
issued, cancelled, fulfilled Example:
"issued"
The date the label was created.
Example:
"2023-04-25T13:25:00-05:00"
⌘I