Cancel a pending return
curl --request PATCH \
--url https://api.cubbo.com/v1/returns/{return_id}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cubbo.com/v1/returns/{return_id}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.patch(url, headers=headers)
print(response.text)const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cubbo.com/v1/returns/{return_id}/cancel', 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.cubbo.com/v1/returns/{return_id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
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.cubbo.com/v1/returns/{return_id}/cancel"
req, _ := http.NewRequest("PATCH", 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.patch("https://api.cubbo.com/v1/returns/{return_id}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cubbo.com/v1/returns/{return_id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": 98765,
"status": "CANCELLED",
"return_type": "TO_BE_DETERMINED",
"resolved_at": "2026-10-12T16:00:00.000Z",
"created_at": "2026-10-12T15:04:05.123Z"
}Returns
Cancel a pending return
Cancels a return that is still PENDING (not yet resolved or received). Any stock reserved
for the return (for example replacement items of an exchange, or units of a return by
carrier) is released back to available inventory. Cancelling is a resolution of the return:
your API credentials need the permission to resolve returns.
- Only
PENDINGreturns can be cancelled; any other status answers 422RETURN_NOT_CANCELABLE. - The request body is empty.
- After cancellation the order can receive a new return request.
PATCH
/
returns
/
{return_id}
/
cancel
Cancel a pending return
curl --request PATCH \
--url https://api.cubbo.com/v1/returns/{return_id}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cubbo.com/v1/returns/{return_id}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.patch(url, headers=headers)
print(response.text)const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cubbo.com/v1/returns/{return_id}/cancel', 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.cubbo.com/v1/returns/{return_id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
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.cubbo.com/v1/returns/{return_id}/cancel"
req, _ := http.NewRequest("PATCH", 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.patch("https://api.cubbo.com/v1/returns/{return_id}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cubbo.com/v1/returns/{return_id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": 98765,
"status": "CANCELLED",
"return_type": "TO_BE_DETERMINED",
"resolved_at": "2026-10-12T16:00:00.000Z",
"created_at": "2026-10-12T15:04:05.123Z"
}Authorizations
Response
The return, now cancelled.
Response of PATCH /returns/{return_id}/cancel.
Lifecycle status of a return.
PENDING: created and waiting for a decision (review of a customer request, or decision on an order returned by the carrier).REQUESTED: resolved; the customer has the return instructions and the goods are expected back.ORDERED: resolved by creating a new (replacement or resend) order.CANCELLED: cancelled before the goods came back; reserved stock was released.ARRIVED_AT_WAREHOUSE: the package arrived at the warehouse and is waiting to be processed.AWAITING_INSPECTION: the package was opened and is waiting for inspection of its contents.RECEIVED: the goods were checked in and are being re-entered into inventory.REENTERED: the goods were fully re-entered into inventory; the return is complete.UNSUCCESSFUL: closed without receiving anything; every expected product was missing on reception.
Available options:
PENDING, REQUESTED, ORDERED, CANCELLED, ARRIVED_AT_WAREHOUSE, AWAITING_INSPECTION, RECEIVED, REENTERED, UNSUCCESSFUL Example:
"PENDING"
What kind of return this is.
TO_BE_DETERMINED: requested by the customer or by you, not yet reviewed; the outcome (simple return, exchange, rejection) is decided later.SIMPLE_RETURN: the customer sends the goods back; no replacement is shipped.EXCHANGE: the customer sends the goods back and replacement items (exchange_products) are reserved to ship once the return arrives.IMMEDIATE_EXCHANGE: replacement items ship right away, before the return arrives (created from the Cubbo app, not through this API).RETURNED_BY_CARRIER: the carrier could not deliver the order and brought it back; decide it withPOST /returns/{return_id}/decision.UNIDENTIFIED: a package arrived at the warehouse that could not be matched to an order (created by warehouse staff).
Available options:
TO_BE_DETERMINED, SIMPLE_RETURN, EXCHANGE, IMMEDIATE_EXCHANGE, RETURNED_BY_CARRIER, UNIDENTIFIED Example:
"TO_BE_DETERMINED"