cURL
curl --request POST \
--url https://dev.api.r4technology.io/endpoint/tracking-webhook \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"return_order_id": "ZG12345678",
"store_id": "hou-store-042",
"status": "detail",
"timestamp": "2025-03-15T14:23:17Z",
"description": "Package scanned and received at a dropoff point",
"packages": [
{
"package_id": "01044ed53ce747ec8c115009233f759d_02-010012",
"items": [
{
"id": "050f5297-e022-4903-ac21-0e1c36f63850",
"sku": "SHIRT-BLU-LG",
"title": "Blue Shirt",
"description": "Classic blue button-down shirt",
"variant_description": "Large",
"quantity": 1,
"image": "https://example.com/shirt.jpg"
}
]
}
]
}
'import requests
url = "https://dev.api.r4technology.io/endpoint/tracking-webhook"
payload = {
"return_order_id": "ZG12345678",
"store_id": "hou-store-042",
"status": "detail",
"timestamp": "2025-03-15T14:23:17Z",
"description": "Package scanned and received at a dropoff point",
"packages": [
{
"package_id": "01044ed53ce747ec8c115009233f759d_02-010012",
"items": [
{
"id": "050f5297-e022-4903-ac21-0e1c36f63850",
"sku": "SHIRT-BLU-LG",
"title": "Blue Shirt",
"description": "Classic blue button-down shirt",
"variant_description": "Large",
"quantity": 1,
"image": "https://example.com/shirt.jpg"
}
]
}
]
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
return_order_id: 'ZG12345678',
store_id: 'hou-store-042',
status: 'detail',
timestamp: '2025-03-15T14:23:17Z',
description: 'Package scanned and received at a dropoff point',
packages: [
{
package_id: '01044ed53ce747ec8c115009233f759d_02-010012',
items: [
{
id: '050f5297-e022-4903-ac21-0e1c36f63850',
sku: 'SHIRT-BLU-LG',
title: 'Blue Shirt',
description: 'Classic blue button-down shirt',
variant_description: 'Large',
quantity: 1,
image: 'https://example.com/shirt.jpg'
}
]
}
]
})
};
fetch('https://dev.api.r4technology.io/endpoint/tracking-webhook', 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/endpoint/tracking-webhook",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'return_order_id' => 'ZG12345678',
'store_id' => 'hou-store-042',
'status' => 'detail',
'timestamp' => '2025-03-15T14:23:17Z',
'description' => 'Package scanned and received at a dropoff point',
'packages' => [
[
'package_id' => '01044ed53ce747ec8c115009233f759d_02-010012',
'items' => [
[
'id' => '050f5297-e022-4903-ac21-0e1c36f63850',
'sku' => 'SHIRT-BLU-LG',
'title' => 'Blue Shirt',
'description' => 'Classic blue button-down shirt',
'variant_description' => 'Large',
'quantity' => 1,
'image' => 'https://example.com/shirt.jpg'
]
]
]
]
]),
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/endpoint/tracking-webhook"
payload := strings.NewReader("{\n \"return_order_id\": \"ZG12345678\",\n \"store_id\": \"hou-store-042\",\n \"status\": \"detail\",\n \"timestamp\": \"2025-03-15T14:23:17Z\",\n \"description\": \"Package scanned and received at a dropoff point\",\n \"packages\": [\n {\n \"package_id\": \"01044ed53ce747ec8c115009233f759d_02-010012\",\n \"items\": [\n {\n \"id\": \"050f5297-e022-4903-ac21-0e1c36f63850\",\n \"sku\": \"SHIRT-BLU-LG\",\n \"title\": \"Blue Shirt\",\n \"description\": \"Classic blue button-down shirt\",\n \"variant_description\": \"Large\",\n \"quantity\": 1,\n \"image\": \"https://example.com/shirt.jpg\"\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://dev.api.r4technology.io/endpoint/tracking-webhook")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"return_order_id\": \"ZG12345678\",\n \"store_id\": \"hou-store-042\",\n \"status\": \"detail\",\n \"timestamp\": \"2025-03-15T14:23:17Z\",\n \"description\": \"Package scanned and received at a dropoff point\",\n \"packages\": [\n {\n \"package_id\": \"01044ed53ce747ec8c115009233f759d_02-010012\",\n \"items\": [\n {\n \"id\": \"050f5297-e022-4903-ac21-0e1c36f63850\",\n \"sku\": \"SHIRT-BLU-LG\",\n \"title\": \"Blue Shirt\",\n \"description\": \"Classic blue button-down shirt\",\n \"variant_description\": \"Large\",\n \"quantity\": 1,\n \"image\": \"https://example.com/shirt.jpg\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.api.r4technology.io/endpoint/tracking-webhook")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"return_order_id\": \"ZG12345678\",\n \"store_id\": \"hou-store-042\",\n \"status\": \"detail\",\n \"timestamp\": \"2025-03-15T14:23:17Z\",\n \"description\": \"Package scanned and received at a dropoff point\",\n \"packages\": [\n {\n \"package_id\": \"01044ed53ce747ec8c115009233f759d_02-010012\",\n \"items\": [\n {\n \"id\": \"050f5297-e022-4903-ac21-0e1c36f63850\",\n \"sku\": \"SHIRT-BLU-LG\",\n \"title\": \"Blue Shirt\",\n \"description\": \"Classic blue button-down shirt\",\n \"variant_description\": \"Large\",\n \"quantity\": 1,\n \"image\": \"https://example.com/shirt.jpg\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyEndpoints
Tracking Update
Sends order tracking updates to your endpoint when the status of an order changes. Each update includes the packages that belong to the order, along with the items in each package.
cURL
curl --request POST \
--url https://dev.api.r4technology.io/endpoint/tracking-webhook \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"return_order_id": "ZG12345678",
"store_id": "hou-store-042",
"status": "detail",
"timestamp": "2025-03-15T14:23:17Z",
"description": "Package scanned and received at a dropoff point",
"packages": [
{
"package_id": "01044ed53ce747ec8c115009233f759d_02-010012",
"items": [
{
"id": "050f5297-e022-4903-ac21-0e1c36f63850",
"sku": "SHIRT-BLU-LG",
"title": "Blue Shirt",
"description": "Classic blue button-down shirt",
"variant_description": "Large",
"quantity": 1,
"image": "https://example.com/shirt.jpg"
}
]
}
]
}
'import requests
url = "https://dev.api.r4technology.io/endpoint/tracking-webhook"
payload = {
"return_order_id": "ZG12345678",
"store_id": "hou-store-042",
"status": "detail",
"timestamp": "2025-03-15T14:23:17Z",
"description": "Package scanned and received at a dropoff point",
"packages": [
{
"package_id": "01044ed53ce747ec8c115009233f759d_02-010012",
"items": [
{
"id": "050f5297-e022-4903-ac21-0e1c36f63850",
"sku": "SHIRT-BLU-LG",
"title": "Blue Shirt",
"description": "Classic blue button-down shirt",
"variant_description": "Large",
"quantity": 1,
"image": "https://example.com/shirt.jpg"
}
]
}
]
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
return_order_id: 'ZG12345678',
store_id: 'hou-store-042',
status: 'detail',
timestamp: '2025-03-15T14:23:17Z',
description: 'Package scanned and received at a dropoff point',
packages: [
{
package_id: '01044ed53ce747ec8c115009233f759d_02-010012',
items: [
{
id: '050f5297-e022-4903-ac21-0e1c36f63850',
sku: 'SHIRT-BLU-LG',
title: 'Blue Shirt',
description: 'Classic blue button-down shirt',
variant_description: 'Large',
quantity: 1,
image: 'https://example.com/shirt.jpg'
}
]
}
]
})
};
fetch('https://dev.api.r4technology.io/endpoint/tracking-webhook', 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/endpoint/tracking-webhook",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'return_order_id' => 'ZG12345678',
'store_id' => 'hou-store-042',
'status' => 'detail',
'timestamp' => '2025-03-15T14:23:17Z',
'description' => 'Package scanned and received at a dropoff point',
'packages' => [
[
'package_id' => '01044ed53ce747ec8c115009233f759d_02-010012',
'items' => [
[
'id' => '050f5297-e022-4903-ac21-0e1c36f63850',
'sku' => 'SHIRT-BLU-LG',
'title' => 'Blue Shirt',
'description' => 'Classic blue button-down shirt',
'variant_description' => 'Large',
'quantity' => 1,
'image' => 'https://example.com/shirt.jpg'
]
]
]
]
]),
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/endpoint/tracking-webhook"
payload := strings.NewReader("{\n \"return_order_id\": \"ZG12345678\",\n \"store_id\": \"hou-store-042\",\n \"status\": \"detail\",\n \"timestamp\": \"2025-03-15T14:23:17Z\",\n \"description\": \"Package scanned and received at a dropoff point\",\n \"packages\": [\n {\n \"package_id\": \"01044ed53ce747ec8c115009233f759d_02-010012\",\n \"items\": [\n {\n \"id\": \"050f5297-e022-4903-ac21-0e1c36f63850\",\n \"sku\": \"SHIRT-BLU-LG\",\n \"title\": \"Blue Shirt\",\n \"description\": \"Classic blue button-down shirt\",\n \"variant_description\": \"Large\",\n \"quantity\": 1,\n \"image\": \"https://example.com/shirt.jpg\"\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://dev.api.r4technology.io/endpoint/tracking-webhook")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"return_order_id\": \"ZG12345678\",\n \"store_id\": \"hou-store-042\",\n \"status\": \"detail\",\n \"timestamp\": \"2025-03-15T14:23:17Z\",\n \"description\": \"Package scanned and received at a dropoff point\",\n \"packages\": [\n {\n \"package_id\": \"01044ed53ce747ec8c115009233f759d_02-010012\",\n \"items\": [\n {\n \"id\": \"050f5297-e022-4903-ac21-0e1c36f63850\",\n \"sku\": \"SHIRT-BLU-LG\",\n \"title\": \"Blue Shirt\",\n \"description\": \"Classic blue button-down shirt\",\n \"variant_description\": \"Large\",\n \"quantity\": 1,\n \"image\": \"https://example.com/shirt.jpg\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.api.r4technology.io/endpoint/tracking-webhook")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"return_order_id\": \"ZG12345678\",\n \"store_id\": \"hou-store-042\",\n \"status\": \"detail\",\n \"timestamp\": \"2025-03-15T14:23:17Z\",\n \"description\": \"Package scanned and received at a dropoff point\",\n \"packages\": [\n {\n \"package_id\": \"01044ed53ce747ec8c115009233f759d_02-010012\",\n \"items\": [\n {\n \"id\": \"050f5297-e022-4903-ac21-0e1c36f63850\",\n \"sku\": \"SHIRT-BLU-LG\",\n \"title\": \"Blue Shirt\",\n \"description\": \"Classic blue button-down shirt\",\n \"variant_description\": \"Large\",\n \"quantity\": 1,\n \"image\": \"https://example.com/shirt.jpg\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyThis is a webhook that we send to your endpoint. You cannot call this endpoint.
Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Body
application/json
Tracking update notification
The return order ID for this tracking update
The external ID of the store where the package was dropped off
The new status of the order
ISO 8601 timestamp of the status update
Human-readable description of the status
Packages belonging to this order that have been assigned a package ID. Items not yet assigned to a package are excluded.
Show child attributes
Show child attributes
⌘I
