Update shipping contact and address fields
curl --request PATCH \
--url https://api.cubbo.com/v1/orders/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"shipping_address_1": "Calle Falsa 123",
"shipping_number": "123",
"shipping_number_int": "4",
"shipping_neighborhood": "Centro",
"shipping_zip_code": "06600",
"shipping_references": "Blue door, ring twice"
}
'import requests
url = "https://api.cubbo.com/v1/orders/{id}"
payload = {
"shipping_address_1": "Calle Falsa 123",
"shipping_number": "123",
"shipping_number_int": "4",
"shipping_neighborhood": "Centro",
"shipping_zip_code": "06600",
"shipping_references": "Blue door, ring twice"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
shipping_address_1: 'Calle Falsa 123',
shipping_number: '123',
shipping_number_int: '4',
shipping_neighborhood: 'Centro',
shipping_zip_code: '06600',
shipping_references: 'Blue door, ring twice'
})
};
fetch('https://api.cubbo.com/v1/orders/{id}', 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/orders/{id}",
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([
'shipping_address_1' => 'Calle Falsa 123',
'shipping_number' => '123',
'shipping_number_int' => '4',
'shipping_neighborhood' => 'Centro',
'shipping_zip_code' => '06600',
'shipping_references' => 'Blue door, ring twice'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.cubbo.com/v1/orders/{id}"
payload := strings.NewReader("{\n \"shipping_address_1\": \"Calle Falsa 123\",\n \"shipping_number\": \"123\",\n \"shipping_number_int\": \"4\",\n \"shipping_neighborhood\": \"Centro\",\n \"shipping_zip_code\": \"06600\",\n \"shipping_references\": \"Blue door, ring twice\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.cubbo.com/v1/orders/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"shipping_address_1\": \"Calle Falsa 123\",\n \"shipping_number\": \"123\",\n \"shipping_number_int\": \"4\",\n \"shipping_neighborhood\": \"Centro\",\n \"shipping_zip_code\": \"06600\",\n \"shipping_references\": \"Blue door, ring twice\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cubbo.com/v1/orders/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"shipping_address_1\": \"Calle Falsa 123\",\n \"shipping_number\": \"123\",\n \"shipping_number_int\": \"4\",\n \"shipping_neighborhood\": \"Centro\",\n \"shipping_zip_code\": \"06600\",\n \"shipping_references\": \"Blue door, ring twice\"\n}"
response = http.request(request)
puts response.read_body{
"shipping_address_1": "Calle Falsa 123",
"shipping_number": "123",
"shipping_number_int": "4",
"shipping_neighborhood": "Centro",
"shipping_zip_code": "06600",
"shipping_references": "Blue door, ring twice"
}Orders
Update shipping contact and address fields
Partially updates the recipient and shipping address of an order. Send only the fields you want
to change; a field that is absent or null is left untouched, an empty string clears it. The
response echoes exactly the fields you changed with their saved values.
- Allowed in every status except
shipped,returning,returned,return_arrivedandreentered. UnlikePUT /orders/{id}, this works duringprocessing,pickingandpacking(for example to fix an address before the label is generated). - An order in
pendinggoes back toinitialand is re-processed; an order in another editable status is re-processed without a status change. Orders incanceled,interruptedor in fulfillment (processing,picking,packing) are saved but not re-processed. - At least one field must be provided.
- Colombia: changing
shipping_cityorshipping_stateclears the order’scity_code, and the city and province decide the destination again. To keep deciding by code, usePUT /orders/{id}withshipping.city_code. - Requires an API user with the “orders update” permission and access to the store. The order
must also be editable for your store: a Brazilian order whose NF-e was approved more than
24 hours ago, or a store with order editing restricted by Cubbo, is answered with
401.
PATCH
/
orders
/
{id}
Update shipping contact and address fields
curl --request PATCH \
--url https://api.cubbo.com/v1/orders/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"shipping_address_1": "Calle Falsa 123",
"shipping_number": "123",
"shipping_number_int": "4",
"shipping_neighborhood": "Centro",
"shipping_zip_code": "06600",
"shipping_references": "Blue door, ring twice"
}
'import requests
url = "https://api.cubbo.com/v1/orders/{id}"
payload = {
"shipping_address_1": "Calle Falsa 123",
"shipping_number": "123",
"shipping_number_int": "4",
"shipping_neighborhood": "Centro",
"shipping_zip_code": "06600",
"shipping_references": "Blue door, ring twice"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
shipping_address_1: 'Calle Falsa 123',
shipping_number: '123',
shipping_number_int: '4',
shipping_neighborhood: 'Centro',
shipping_zip_code: '06600',
shipping_references: 'Blue door, ring twice'
})
};
fetch('https://api.cubbo.com/v1/orders/{id}', 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/orders/{id}",
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([
'shipping_address_1' => 'Calle Falsa 123',
'shipping_number' => '123',
'shipping_number_int' => '4',
'shipping_neighborhood' => 'Centro',
'shipping_zip_code' => '06600',
'shipping_references' => 'Blue door, ring twice'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.cubbo.com/v1/orders/{id}"
payload := strings.NewReader("{\n \"shipping_address_1\": \"Calle Falsa 123\",\n \"shipping_number\": \"123\",\n \"shipping_number_int\": \"4\",\n \"shipping_neighborhood\": \"Centro\",\n \"shipping_zip_code\": \"06600\",\n \"shipping_references\": \"Blue door, ring twice\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.cubbo.com/v1/orders/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"shipping_address_1\": \"Calle Falsa 123\",\n \"shipping_number\": \"123\",\n \"shipping_number_int\": \"4\",\n \"shipping_neighborhood\": \"Centro\",\n \"shipping_zip_code\": \"06600\",\n \"shipping_references\": \"Blue door, ring twice\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cubbo.com/v1/orders/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"shipping_address_1\": \"Calle Falsa 123\",\n \"shipping_number\": \"123\",\n \"shipping_number_int\": \"4\",\n \"shipping_neighborhood\": \"Centro\",\n \"shipping_zip_code\": \"06600\",\n \"shipping_references\": \"Blue door, ring twice\"\n}"
response = http.request(request)
puts response.read_body{
"shipping_address_1": "Calle Falsa 123",
"shipping_number": "123",
"shipping_number_int": "4",
"shipping_neighborhood": "Centro",
"shipping_zip_code": "06600",
"shipping_references": "Blue door, ring twice"
}Authorizations
Body
application/json
Partial update of the shipping contact and address. Send only the fields to change; at least one is required.
Response
The fields that were updated, with the values now stored on the order.
Only the fields that were sent in the request, with the values now stored on the order.