Contents
Returns
Returns come from the sales channel, where the customer opens them. Nucleo follows them to the warehouse and records what arrived and in which condition.
| Status | Meaning |
|---|---|
requested | Opened on the sales channel. |
awaiting_receipt | The warehouse knows it is coming. |
in_transit | The parcel is travelling back. |
received | Arrived at the warehouse, being checked. |
compliant | Every item arrived, in sellable condition. |
not_compliant | Something is missing or not sellable: the merchant's customer service is alerted. |
closed | Done. |
cancelled | Cancelled. |
Base URL, authentication and conventions of this API are on the Commerce API page.
/returnsList returns
returns:read scope.Returns sorted by last update, oldest first. Scope returns:read.
Query parameters
statusstringOnly returns in this status.
One ofrequestedawaiting_receiptin_transitreceivedcompliantnot_compliantclosedcancelledExample:requestedupdated_sincestring (date-time)Only items updated at or after this time (ISO 8601). Encode
+as%2Bif you send an offset.Example:2026-10-13T08:00:00ZcursorstringThe
next_cursorof the previous page. Keepstatusandupdated_sincethe same; a differentstatusanswers400 invalid_cursor.limitintegerItems per page.
min 1max 200default 50Example:50
Responses
200A page of returns.application/json
HeadersX-Request-IdThe id of this call. Quote it if you contact support; errors repeat it asrequest_id.
dataarray of ReturnrequiredAttributes of each item
idstringrequirednumberstring | nullorder_idstring | nullorder_numberstring | nullstatusstringrequiredOne ofrequestedawaiting_receiptin_transitreceivedcompliantnot_compliantclosedcancelledreason_codestring | nullreason_textstring | nullcustomer_notestring | nullcurrencystringtotalMoneyChild attributes
amountstringrequiredDecimal string with two decimals.
Example:180.00currencystringrequiredISO 4217 code.
Example:EUR
created_atstring (date-time) | nullupdated_atstring (date-time) | nullreceived_atstring (date-time) | nullclosed_atstring (date-time) | nullcancelled_atstring (date-time) | nulllinesarray of objectrequiredAttributes of each item
skustring | nullbarcodestring | nulltitlestring | nullquantity_requestedintegerquantity_receivedintegerreason_codestring | nulloutcomestring | nullThe condition the warehouse found —
sellable,damaged, ormixedwhen the pieces differ;nulluntil checked.
refundsarray of RefundAttributes of each item
idstringreturn_idstring | nullThe return it belongs to, if any.
refunded_atstring (date-time) | nulltotalMoneyChild attributes
amountstringrequiredDecimal string with two decimals.
Example:180.00currencystringrequiredISO 4217 code.
Example:EUR
shippingMoneyChild attributes
amountstringrequiredDecimal string with two decimals.
Example:180.00currencystringrequiredISO 4217 code.
Example:EUR
linesarray of objectAttributes of each item
line_idstring | nullskustring | nullbarcodestring | nullquantityintegersubtotalMoneyChild attributes
amountstringrequiredDecimal string with two decimals.
Example:180.00currencystringrequiredISO 4217 code.
Example:EUR
next_cursorstring | nullrequired
400The request is not valid:
validation_failed(withdetailsper parameter or field),invalid_cursor,invalid_json(the body is not a JSON object) orunknown_item(withdetailsper line, for examplelines.0). application/jsonHeadersX-Request-IdThe id of this call. Quote it if you contact support; errors repeat it asrequest_id.
errorobjectrequiredChild attributes
codestringrequiredMachine-readable code. Branch on this, never on
message.messagestringrequiredrequest_idstringrequireddetailsobjectFor
validation_failed, the messages per parameter.
401
unauthorized: the key is missing or wrong, or the call comes from an IP outside the connection's allowlist.application/jsonHeadersX-Request-IdThe id of this call. Quote it if you contact support; errors repeat it asrequest_id.
errorobjectrequiredChild attributes
codestringrequiredMachine-readable code. Branch on this, never on
message.messagestringrequiredrequest_idstringrequireddetailsobjectFor
validation_failed, the messages per parameter.
403The key is right but cannot do this:
insufficient_scope(the key lacks the scope of the call),connection_pausedorconnection_not_active(the connection is paused or not turned on yet). application/jsonHeadersX-Request-IdThe id of this call. Quote it if you contact support; errors repeat it asrequest_id.
errorobjectrequiredChild attributes
codestringrequiredMachine-readable code. Branch on this, never on
message.messagestringrequiredrequest_idstringrequireddetailsobjectFor
validation_failed, the messages per parameter.
429
rate_limited: wait for the seconds inRetry-After.application/jsonHeadersX-Request-IdThe id of this call. Quote it if you contact support; errors repeat it asrequest_id.Retry-AfterSeconds to wait before the next call.
errorobjectrequiredChild attributes
codestringrequiredMachine-readable code. Branch on this, never on
message.messagestringrequiredrequest_idstringrequireddetailsobjectFor
validation_failed, the messages per parameter.
curl -X GET 'https://api-commerce.nucleoplatform.com/api/commerce/v1/returns?status=requested&updated_since=2026-10-13T08%3A00%3A00Z&limit=50' \
-H "Authorization: Bearer $NUCLEO_ACCESS_TOKEN" \
-H 'Accept: application/json'const res = await fetch("https://api-commerce.nucleoplatform.com/api/commerce/v1/returns?status=requested&updated_since=2026-10-13T08%3A00%3A00Z&limit=50", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.NUCLEO_ACCESS_TOKEN}`,
Accept: "application/json",
},
});
const data = await res.json();
console.log(res.status, data);<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
$response = $client->request('GET', 'https://api-commerce.nucleoplatform.com/api/commerce/v1/returns?status=requested&updated_since=2026-10-13T08%3A00%3A00Z&limit=50', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('NUCLEO_ACCESS_TOKEN'),
'Accept' => 'application/json',
],
'http_errors' => false,
]);
echo $response->getStatusCode(), PHP_EOL;
echo $response->getBody();{
"data": [
{
"id": "string",
"number": "string",
"order_id": "string",
"order_number": "string",
"status": "requested",
"reason_code": "string",
"reason_text": "string",
"customer_note": "string",
"currency": "string",
"total": {
"amount": "180.00",
"currency": "EUR"
},
"created_at": "2026-10-01T09:30:00Z",
"updated_at": "2026-10-01T09:30:00Z",
"received_at": "2026-10-01T09:30:00Z",
"closed_at": "2026-10-01T09:30:00Z",
"cancelled_at": "2026-10-01T09:30:00Z",
"lines": [
{
"sku": "string",
"barcode": "string",
"title": "string",
"quantity_requested": 1,
"quantity_received": 1,
"reason_code": "string",
"outcome": "string"
}
],
"refunds": [
{
"id": "string",
"return_id": "string",
"refunded_at": "2026-10-01T09:30:00Z",
"total": {
"amount": "180.00",
"currency": "EUR"
},
"shipping": {
"amount": "180.00",
"currency": "EUR"
},
"lines": [
{}
]
}
]
}
],
"next_cursor": "string"
}{
"error": {
"code": "validation_failed",
"message": "The request is not valid.",
"request_id": "1f7e3c2a-9b8d-4e6f-a5c4-3b2a1d0e9f8c",
"details": {
"status": [
"Must be one of: received, on_hold, in_fulfillment, shipped, delivered, cancellation_requested, cancelled."
]
}
}
}{
"error": {
"code": "unauthorized",
"message": "Missing or invalid API key.",
"request_id": "1f7e3c2a-9b8d-4e6f-a5c4-3b2a1d0e9f8c"
}
}{
"error": {
"code": "insufficient_scope",
"message": "This API key does not have the orders:read scope.",
"request_id": "1f7e3c2a-9b8d-4e6f-a5c4-3b2a1d0e9f8c"
}
}{
"error": {
"code": "rate_limited",
"message": "Too many requests: retry after the number of seconds in Retry-After.",
"request_id": "1f7e3c2a-9b8d-4e6f-a5c4-3b2a1d0e9f8c"
}
}/returns/{return}Get a return
returns:read scope.One return, by number or id. Scope returns:read.
Path parameters
returnstringrequiredThe return's number (as shown in Nucleo) or its
id.Example:R-1042-1
Responses
200The return.application/json
HeadersX-Request-IdThe id of this call. Quote it if you contact support; errors repeat it asrequest_id.
idstringrequirednumberstring | nullorder_idstring | nullorder_numberstring | nullstatusstringrequiredOne ofrequestedawaiting_receiptin_transitreceivedcompliantnot_compliantclosedcancelledreason_codestring | nullreason_textstring | nullcustomer_notestring | nullcurrencystringtotalMoneyChild attributes
amountstringrequiredDecimal string with two decimals.
Example:180.00currencystringrequiredISO 4217 code.
Example:EUR
created_atstring (date-time) | nullupdated_atstring (date-time) | nullreceived_atstring (date-time) | nullclosed_atstring (date-time) | nullcancelled_atstring (date-time) | nulllinesarray of objectrequiredAttributes of each item
skustring | nullbarcodestring | nulltitlestring | nullquantity_requestedintegerquantity_receivedintegerreason_codestring | nulloutcomestring | nullThe condition the warehouse found —
sellable,damaged, ormixedwhen the pieces differ;nulluntil checked.
refundsarray of RefundAttributes of each item
idstringreturn_idstring | nullThe return it belongs to, if any.
refunded_atstring (date-time) | nulltotalMoneyChild attributes
amountstringrequiredDecimal string with two decimals.
Example:180.00currencystringrequiredISO 4217 code.
Example:EUR
shippingMoneyChild attributes
amountstringrequiredDecimal string with two decimals.
Example:180.00currencystringrequiredISO 4217 code.
Example:EUR
linesarray of objectAttributes of each item
line_idstring | nullskustring | nullbarcodestring | nullquantityintegersubtotalMoneyChild attributes
amountstringrequiredDecimal string with two decimals.
Example:180.00currencystringrequiredISO 4217 code.
Example:EUR
401
unauthorized: the key is missing or wrong, or the call comes from an IP outside the connection's allowlist.application/jsonHeadersX-Request-IdThe id of this call. Quote it if you contact support; errors repeat it asrequest_id.
errorobjectrequiredChild attributes
codestringrequiredMachine-readable code. Branch on this, never on
message.messagestringrequiredrequest_idstringrequireddetailsobjectFor
validation_failed, the messages per parameter.
403The key is right but cannot do this:
insufficient_scope(the key lacks the scope of the call),connection_pausedorconnection_not_active(the connection is paused or not turned on yet). application/jsonHeadersX-Request-IdThe id of this call. Quote it if you contact support; errors repeat it asrequest_id.
errorobjectrequiredChild attributes
codestringrequiredMachine-readable code. Branch on this, never on
message.messagestringrequiredrequest_idstringrequireddetailsobjectFor
validation_failed, the messages per parameter.
404
order_not_foundorreturn_not_found.application/jsonHeadersX-Request-IdThe id of this call. Quote it if you contact support; errors repeat it asrequest_id.
errorobjectrequiredChild attributes
codestringrequiredMachine-readable code. Branch on this, never on
message.messagestringrequiredrequest_idstringrequireddetailsobjectFor
validation_failed, the messages per parameter.
429
rate_limited: wait for the seconds inRetry-After.application/jsonHeadersX-Request-IdThe id of this call. Quote it if you contact support; errors repeat it asrequest_id.Retry-AfterSeconds to wait before the next call.
errorobjectrequiredChild attributes
codestringrequiredMachine-readable code. Branch on this, never on
message.messagestringrequiredrequest_idstringrequireddetailsobjectFor
validation_failed, the messages per parameter.
curl -X GET https://api-commerce.nucleoplatform.com/api/commerce/v1/returns/R-1042-1 \
-H "Authorization: Bearer $NUCLEO_ACCESS_TOKEN" \
-H 'Accept: application/json'const res = await fetch("https://api-commerce.nucleoplatform.com/api/commerce/v1/returns/R-1042-1", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.NUCLEO_ACCESS_TOKEN}`,
Accept: "application/json",
},
});
const data = await res.json();
console.log(res.status, data);<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
$response = $client->request('GET', 'https://api-commerce.nucleoplatform.com/api/commerce/v1/returns/R-1042-1', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('NUCLEO_ACCESS_TOKEN'),
'Accept' => 'application/json',
],
'http_errors' => false,
]);
echo $response->getStatusCode(), PHP_EOL;
echo $response->getBody();{
"id": "string",
"number": "string",
"order_id": "string",
"order_number": "string",
"status": "requested",
"reason_code": "string",
"reason_text": "string",
"customer_note": "string",
"currency": "string",
"total": {
"amount": "180.00",
"currency": "EUR"
},
"created_at": "2026-10-01T09:30:00Z",
"updated_at": "2026-10-01T09:30:00Z",
"received_at": "2026-10-01T09:30:00Z",
"closed_at": "2026-10-01T09:30:00Z",
"cancelled_at": "2026-10-01T09:30:00Z",
"lines": [
{
"sku": "string",
"barcode": "string",
"title": "string",
"quantity_requested": 1,
"quantity_received": 1,
"reason_code": "string",
"outcome": "string"
}
],
"refunds": [
{
"id": "string",
"return_id": "string",
"refunded_at": "2026-10-01T09:30:00Z",
"total": {
"amount": "180.00",
"currency": "EUR"
},
"shipping": {
"amount": "180.00",
"currency": "EUR"
},
"lines": [
{
"line_id": "string",
"sku": "string",
"barcode": "string",
"quantity": 1,
"subtotal": {
"amount": "180.00",
"currency": "EUR"
}
}
]
}
]
}{
"error": {
"code": "unauthorized",
"message": "Missing or invalid API key.",
"request_id": "1f7e3c2a-9b8d-4e6f-a5c4-3b2a1d0e9f8c"
}
}{
"error": {
"code": "insufficient_scope",
"message": "This API key does not have the orders:read scope.",
"request_id": "1f7e3c2a-9b8d-4e6f-a5c4-3b2a1d0e9f8c"
}
}{
"error": {
"code": "order_not_found",
"message": "Order 1042 not found.",
"request_id": "1f7e3c2a-9b8d-4e6f-a5c4-3b2a1d0e9f8c"
}
}{
"error": {
"code": "rate_limited",
"message": "Too many requests: retry after the number of seconds in Retry-After.",
"request_id": "1f7e3c2a-9b8d-4e6f-a5c4-3b2a1d0e9f8c"
}
}