cURL
curl --request PATCH \
--url https://dev.api.r4technology.io/order \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"return_order_id": "<string>",
"items": [
{
"id": "<string>",
"sku": "<string>",
"title": "<string>",
"price": "<string>",
"variant_id": "<string>",
"description": "<string>",
"return_reason": "<string>",
"dry_clean_service": true,
"photo_url": "<string>"
}
],
"email": "jsmith@example.com",
"name": "<string>",
"destination_id": "<string>",
"seller_id": "<string>",
"expiration_date": "2023-12-25",
"delivery_address": {
"address_line_1": "<string>",
"address_line_2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>"
}
}
'import requests
url = "https://dev.api.r4technology.io/order"
payload = {
"return_order_id": "<string>",
"items": [
{
"id": "<string>",
"sku": "<string>",
"title": "<string>",
"price": "<string>",
"variant_id": "<string>",
"description": "<string>",
"return_reason": "<string>",
"dry_clean_service": True,
"photo_url": "<string>"
}
],
"email": "jsmith@example.com",
"name": "<string>",
"destination_id": "<string>",
"seller_id": "<string>",
"expiration_date": "2023-12-25",
"delivery_address": {
"address_line_1": "<string>",
"address_line_2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>"
}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
return_order_id: '<string>',
items: [
{
id: '<string>',
sku: '<string>',
title: '<string>',
price: '<string>',
variant_id: '<string>',
description: '<string>',
return_reason: '<string>',
dry_clean_service: true,
photo_url: '<string>'
}
],
email: 'jsmith@example.com',
name: '<string>',
destination_id: '<string>',
seller_id: '<string>',
expiration_date: '2023-12-25',
delivery_address: {
address_line_1: '<string>',
address_line_2: '<string>',
city: '<string>',
state: '<string>',
zip: '<string>'
}
})
};
fetch('https://dev.api.r4technology.io/order', 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://dev.api.r4technology.io/order",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'return_order_id' => '<string>',
'items' => [
[
'id' => '<string>',
'sku' => '<string>',
'title' => '<string>',
'price' => '<string>',
'variant_id' => '<string>',
'description' => '<string>',
'return_reason' => '<string>',
'dry_clean_service' => true,
'photo_url' => '<string>'
]
],
'email' => 'jsmith@example.com',
'name' => '<string>',
'destination_id' => '<string>',
'seller_id' => '<string>',
'expiration_date' => '2023-12-25',
'delivery_address' => [
'address_line_1' => '<string>',
'address_line_2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zip' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://dev.api.r4technology.io/order"
payload := strings.NewReader("{\n \"return_order_id\": \"<string>\",\n \"items\": [\n {\n \"id\": \"<string>\",\n \"sku\": \"<string>\",\n \"title\": \"<string>\",\n \"price\": \"<string>\",\n \"variant_id\": \"<string>\",\n \"description\": \"<string>\",\n \"return_reason\": \"<string>\",\n \"dry_clean_service\": true,\n \"photo_url\": \"<string>\"\n }\n ],\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\",\n \"destination_id\": \"<string>\",\n \"seller_id\": \"<string>\",\n \"expiration_date\": \"2023-12-25\",\n \"delivery_address\": {\n \"address_line_1\": \"<string>\",\n \"address_line_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://dev.api.r4technology.io/order")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"return_order_id\": \"<string>\",\n \"items\": [\n {\n \"id\": \"<string>\",\n \"sku\": \"<string>\",\n \"title\": \"<string>\",\n \"price\": \"<string>\",\n \"variant_id\": \"<string>\",\n \"description\": \"<string>\",\n \"return_reason\": \"<string>\",\n \"dry_clean_service\": true,\n \"photo_url\": \"<string>\"\n }\n ],\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\",\n \"destination_id\": \"<string>\",\n \"seller_id\": \"<string>\",\n \"expiration_date\": \"2023-12-25\",\n \"delivery_address\": {\n \"address_line_1\": \"<string>\",\n \"address_line_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.api.r4technology.io/order")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"return_order_id\": \"<string>\",\n \"items\": [\n {\n \"id\": \"<string>\",\n \"sku\": \"<string>\",\n \"title\": \"<string>\",\n \"price\": \"<string>\",\n \"variant_id\": \"<string>\",\n \"description\": \"<string>\",\n \"return_reason\": \"<string>\",\n \"dry_clean_service\": true,\n \"photo_url\": \"<string>\"\n }\n ],\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\",\n \"destination_id\": \"<string>\",\n \"seller_id\": \"<string>\",\n \"expiration_date\": \"2023-12-25\",\n \"delivery_address\": {\n \"address_line_1\": \"<string>\",\n \"address_line_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"code": "Success",
"message": "Order received successfully.",
"return_order_id": "TRNZABCDEFGHIJKLMNOP",
"qr_code_url": "https://the-return-public-assets.s3.amazonaws.com/qr-codes/TRNZABCDEFGHIJKLMNOP.png"
}{
"error": 123,
"message": "<string>"
}Endpoints
Update Order
Update a return order with customer information and line items
PATCH
/
order
cURL
curl --request PATCH \
--url https://dev.api.r4technology.io/order \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"return_order_id": "<string>",
"items": [
{
"id": "<string>",
"sku": "<string>",
"title": "<string>",
"price": "<string>",
"variant_id": "<string>",
"description": "<string>",
"return_reason": "<string>",
"dry_clean_service": true,
"photo_url": "<string>"
}
],
"email": "jsmith@example.com",
"name": "<string>",
"destination_id": "<string>",
"seller_id": "<string>",
"expiration_date": "2023-12-25",
"delivery_address": {
"address_line_1": "<string>",
"address_line_2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>"
}
}
'import requests
url = "https://dev.api.r4technology.io/order"
payload = {
"return_order_id": "<string>",
"items": [
{
"id": "<string>",
"sku": "<string>",
"title": "<string>",
"price": "<string>",
"variant_id": "<string>",
"description": "<string>",
"return_reason": "<string>",
"dry_clean_service": True,
"photo_url": "<string>"
}
],
"email": "jsmith@example.com",
"name": "<string>",
"destination_id": "<string>",
"seller_id": "<string>",
"expiration_date": "2023-12-25",
"delivery_address": {
"address_line_1": "<string>",
"address_line_2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>"
}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
return_order_id: '<string>',
items: [
{
id: '<string>',
sku: '<string>',
title: '<string>',
price: '<string>',
variant_id: '<string>',
description: '<string>',
return_reason: '<string>',
dry_clean_service: true,
photo_url: '<string>'
}
],
email: 'jsmith@example.com',
name: '<string>',
destination_id: '<string>',
seller_id: '<string>',
expiration_date: '2023-12-25',
delivery_address: {
address_line_1: '<string>',
address_line_2: '<string>',
city: '<string>',
state: '<string>',
zip: '<string>'
}
})
};
fetch('https://dev.api.r4technology.io/order', 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://dev.api.r4technology.io/order",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'return_order_id' => '<string>',
'items' => [
[
'id' => '<string>',
'sku' => '<string>',
'title' => '<string>',
'price' => '<string>',
'variant_id' => '<string>',
'description' => '<string>',
'return_reason' => '<string>',
'dry_clean_service' => true,
'photo_url' => '<string>'
]
],
'email' => 'jsmith@example.com',
'name' => '<string>',
'destination_id' => '<string>',
'seller_id' => '<string>',
'expiration_date' => '2023-12-25',
'delivery_address' => [
'address_line_1' => '<string>',
'address_line_2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zip' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://dev.api.r4technology.io/order"
payload := strings.NewReader("{\n \"return_order_id\": \"<string>\",\n \"items\": [\n {\n \"id\": \"<string>\",\n \"sku\": \"<string>\",\n \"title\": \"<string>\",\n \"price\": \"<string>\",\n \"variant_id\": \"<string>\",\n \"description\": \"<string>\",\n \"return_reason\": \"<string>\",\n \"dry_clean_service\": true,\n \"photo_url\": \"<string>\"\n }\n ],\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\",\n \"destination_id\": \"<string>\",\n \"seller_id\": \"<string>\",\n \"expiration_date\": \"2023-12-25\",\n \"delivery_address\": {\n \"address_line_1\": \"<string>\",\n \"address_line_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://dev.api.r4technology.io/order")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"return_order_id\": \"<string>\",\n \"items\": [\n {\n \"id\": \"<string>\",\n \"sku\": \"<string>\",\n \"title\": \"<string>\",\n \"price\": \"<string>\",\n \"variant_id\": \"<string>\",\n \"description\": \"<string>\",\n \"return_reason\": \"<string>\",\n \"dry_clean_service\": true,\n \"photo_url\": \"<string>\"\n }\n ],\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\",\n \"destination_id\": \"<string>\",\n \"seller_id\": \"<string>\",\n \"expiration_date\": \"2023-12-25\",\n \"delivery_address\": {\n \"address_line_1\": \"<string>\",\n \"address_line_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.api.r4technology.io/order")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"return_order_id\": \"<string>\",\n \"items\": [\n {\n \"id\": \"<string>\",\n \"sku\": \"<string>\",\n \"title\": \"<string>\",\n \"price\": \"<string>\",\n \"variant_id\": \"<string>\",\n \"description\": \"<string>\",\n \"return_reason\": \"<string>\",\n \"dry_clean_service\": true,\n \"photo_url\": \"<string>\"\n }\n ],\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\",\n \"destination_id\": \"<string>\",\n \"seller_id\": \"<string>\",\n \"expiration_date\": \"2023-12-25\",\n \"delivery_address\": {\n \"address_line_1\": \"<string>\",\n \"address_line_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"code": "Success",
"message": "Order received successfully.",
"return_order_id": "TRNZABCDEFGHIJKLMNOP",
"qr_code_url": "https://the-return-public-assets.s3.amazonaws.com/qr-codes/TRNZABCDEFGHIJKLMNOP.png"
}{
"error": 123,
"message": "<string>"
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Body
application/json
Order details including customer information and items to return
R4 return order identifier to update
Array of line items to return
Show child attributes
Show child attributes
Customer email address
Customer name
Destination identifier where the package will ultimately be transfered to from our consolidation hub
Seller identifier that identifies the original seller of the item
The date after which the order will no longer be accepted at a dropoff location
Optional delivery address for the order
Show child attributes
Show child attributes
⌘I
