curl --request POST \
--url https://api.loopreturns.com/api/2026-10/returns/{returnId}/labels/regenerate \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.loopreturns.com/api/2026-10/returns/{returnId}/labels/regenerate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.loopreturns.com/api/2026-10/returns/{returnId}/labels/regenerate', 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/2026-10/returns/{returnId}/labels/regenerate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/2026-10/returns/{returnId}/labels/regenerate"
req, _ := http.NewRequest("POST", 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.post("https://api.loopreturns.com/api/2026-10/returns/{returnId}/labels/regenerate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.loopreturns.com/api/2026-10/returns/{returnId}/labels/regenerate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "Label regeneration queued",
"returnId": 12345
}{
"errors": "Unauthorized."
}{
"errors": "Unauthorized."
}{
"code": "return_not_found",
"errors": [
"Return not found."
]
}{
"code": "label_in_use",
"errors": [
"Return [12345] has a label that is already in use."
]
}{
"code": "return_not_open",
"errors": [
"Return [12345] is not open."
]
}Regenerate Label
Queue a new Loop label for a return that already has one, for example when the original label expired before the shopper dropped off the package. This does the same thing as a merchant clicking Regenerate label on the return in Loop admin.
The request only checks that the return can be regenerated and then queues the work. The regeneration runs asynchronously in the background, and the response returns before the new label is bought.
Required API key scope
- Returns
A key without the Returns scope gets a 403, even if it has Labels write.
Which returns can be regenerated
- The return must be open.
- The return must not use third party labels. Third party label returns are not supported by this endpoint.
- The return must not have multiple labels enabled.
- The return must have exactly one label bought through Loop.
- That label must still be
neworpre_transit. A label that has been scanned or is already in the carrier network (for examplein_transit,out_for_delivery, ordelivered) is left in place and cannot be regenerated.
Retrieving the New Label
After the request is queued (202 response), call
Get Return Details to read the new
label from the labels array once it is ready.
If the background regeneration fails, the failure is stored the same way as for
Generate Label. The old label has
already been removed at that point, so a retry of this endpoint returns
unexpected_label_count, and a Generate Label call can return label_generation_failed.
Successful Response
Returns HTTP 202 (Accepted) when the label regeneration has been successfully queued. A repeat call while a regeneration for the same return is still pending is also accepted with 202, and the regeneration is not queued again.
Error Responses
- 401 Unauthorized: The request could not be authorized
- 403 Forbidden: The API key does not have the Returns scope
- 404 Not Found (
return_not_found): The specified return does not exist - 409 Conflict (
label_in_use): The label has already been scanned or is in the carrier network, so it is notneworpre_transit. The existing label is left in place - 422 Unprocessable Entity (
return_not_open): The return is not open - 422 Unprocessable Entity (
third_party_labels_not_supported): The return uses third party labels - 422 Unprocessable Entity (
unexpected_label_count): The return does not have exactly one label bought through Loop, or the return has multiple labels enabled. This is also returned when no label is left after a failed regeneration - 422 Unprocessable Entity (
label_generation_failed): A previous label generation or regeneration job for this return failed
curl --request POST \
--url https://api.loopreturns.com/api/2026-10/returns/{returnId}/labels/regenerate \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.loopreturns.com/api/2026-10/returns/{returnId}/labels/regenerate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.loopreturns.com/api/2026-10/returns/{returnId}/labels/regenerate', 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/2026-10/returns/{returnId}/labels/regenerate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/2026-10/returns/{returnId}/labels/regenerate"
req, _ := http.NewRequest("POST", 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.post("https://api.loopreturns.com/api/2026-10/returns/{returnId}/labels/regenerate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.loopreturns.com/api/2026-10/returns/{returnId}/labels/regenerate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "Label regeneration queued",
"returnId": 12345
}{
"errors": "Unauthorized."
}{
"errors": "Unauthorized."
}{
"code": "return_not_found",
"errors": [
"Return not found."
]
}{
"code": "label_in_use",
"errors": [
"Return [12345] has a label that is already in use."
]
}{
"code": "return_not_open",
"errors": [
"Return [12345] is not open."
]
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
The unique identifier for the return, created by Loop.
12345