Update a replenishment
curl --request PATCH \
--url https://api.cubbo.com/v1/replenishments/{replenishment_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"notes": "Arrives on two pallets",
"products": [
{
"sku": "SKU-RED-M",
"quantity": 120,
"unit_value": "12.50"
},
{
"sku": "SKU-GREEN-L",
"quantity": 30
}
]
}
'import requests
url = "https://api.cubbo.com/v1/replenishments/{replenishment_id}"
payload = {
"notes": "Arrives on two pallets",
"products": [
{
"sku": "SKU-RED-M",
"quantity": 120,
"unit_value": "12.50"
},
{
"sku": "SKU-GREEN-L",
"quantity": 30
}
]
}
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({
notes: 'Arrives on two pallets',
products: [
{sku: 'SKU-RED-M', quantity: 120, unit_value: '12.50'},
{sku: 'SKU-GREEN-L', quantity: 30}
]
})
};
fetch('https://api.cubbo.com/v1/replenishments/{replenishment_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/replenishments/{replenishment_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([
'notes' => 'Arrives on two pallets',
'products' => [
[
'sku' => 'SKU-RED-M',
'quantity' => 120,
'unit_value' => '12.50'
],
[
'sku' => 'SKU-GREEN-L',
'quantity' => 30
]
]
]),
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/replenishments/{replenishment_id}"
payload := strings.NewReader("{\n \"notes\": \"Arrives on two pallets\",\n \"products\": [\n {\n \"sku\": \"SKU-RED-M\",\n \"quantity\": 120,\n \"unit_value\": \"12.50\"\n },\n {\n \"sku\": \"SKU-GREEN-L\",\n \"quantity\": 30\n }\n ]\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/replenishments/{replenishment_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"notes\": \"Arrives on two pallets\",\n \"products\": [\n {\n \"sku\": \"SKU-RED-M\",\n \"quantity\": 120,\n \"unit_value\": \"12.50\"\n },\n {\n \"sku\": \"SKU-GREEN-L\",\n \"quantity\": 30\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cubbo.com/v1/replenishments/{replenishment_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 \"notes\": \"Arrives on two pallets\",\n \"products\": [\n {\n \"sku\": \"SKU-RED-M\",\n \"quantity\": 120,\n \"unit_value\": \"12.50\"\n },\n {\n \"sku\": \"SKU-GREEN-L\",\n \"quantity\": 30\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 55001,
"status": "REQUESTED",
"store_id": 1234,
"notes": "Arrives on two pallets",
"created_at": "2026-10-12T14:03:11.512Z",
"expected_arrived_at": "2026-11-02T15:00:00.000Z",
"sell_ahead": false,
"declared_value": null,
"warehouse_id": 7,
"replenishment_products": [
{
"product_id": 9001,
"expected_quantity": 120,
"unit_value": "12.5",
"product": {
"id": 9001,
"name": "Red T-shirt M",
"bar_code": "7501234567890",
"is_scannable": true,
"product_codes": [
{
"id": 31001,
"sku": "SKU-RED-M"
}
]
}
},
{
"product_id": 9003,
"expected_quantity": 30,
"unit_value": null,
"product": {
"id": 9003,
"name": "Green T-shirt L",
"bar_code": "7501234567892",
"is_scannable": true,
"product_codes": [
{
"id": 31003,
"sku": "SKU-GREEN-L"
}
]
}
}
],
"warehouse": {
"id": 7,
"name": "Mexico City",
"unique_code": "MX-CDMX-1",
"address1": "Av. Ejemplo 123",
"address2": null,
"zip_code": "01000",
"city": "Ciudad de México",
"state": "CDMX",
"country": "MX"
}
}Replenishments
Update a replenishment
Updates the notes and the announced lines of a replenishment that has not started receiving.
- Allowed only while the status is
WITHOUT_SCHEDULING,PENDINGorREQUESTED. Once the shipment is in transit or at the warehouse the update is refused. - Not available for sell-ahead replenishments, nor for replenishments bound to a Brazilian
warehouse (code
br_warehouse_not_supported): on the Brazilian path the declared values become the NF-e of entry and must not change afterwards. productsis a partial update: each listed SKU either replaces the quantity (and, when sent, theunit_value) of its existing line, or is added as a new line. Lines you do not list are left untouched; lines cannot be removed through this endpoint. Omittingunit_valuekeeps the stored value.- If the replenishment has a booked receiving appointment at a warehouse with native scheduling
and the new quantities need more dock capacity than reserved, Cubbo tries to extend the booked
time slots; when they cannot fit, the update is refused with code
reschedule_requiredand nothing is changed. Reschedule the appointment first, then retry. - Errors raised by business rules use the
{error, code, context}envelope (codemay be an empty string andcontextnull); parameter errors use the plain{error}envelope.
PATCH
/
replenishments
/
{replenishment_id}
Update a replenishment
curl --request PATCH \
--url https://api.cubbo.com/v1/replenishments/{replenishment_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"notes": "Arrives on two pallets",
"products": [
{
"sku": "SKU-RED-M",
"quantity": 120,
"unit_value": "12.50"
},
{
"sku": "SKU-GREEN-L",
"quantity": 30
}
]
}
'import requests
url = "https://api.cubbo.com/v1/replenishments/{replenishment_id}"
payload = {
"notes": "Arrives on two pallets",
"products": [
{
"sku": "SKU-RED-M",
"quantity": 120,
"unit_value": "12.50"
},
{
"sku": "SKU-GREEN-L",
"quantity": 30
}
]
}
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({
notes: 'Arrives on two pallets',
products: [
{sku: 'SKU-RED-M', quantity: 120, unit_value: '12.50'},
{sku: 'SKU-GREEN-L', quantity: 30}
]
})
};
fetch('https://api.cubbo.com/v1/replenishments/{replenishment_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/replenishments/{replenishment_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([
'notes' => 'Arrives on two pallets',
'products' => [
[
'sku' => 'SKU-RED-M',
'quantity' => 120,
'unit_value' => '12.50'
],
[
'sku' => 'SKU-GREEN-L',
'quantity' => 30
]
]
]),
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/replenishments/{replenishment_id}"
payload := strings.NewReader("{\n \"notes\": \"Arrives on two pallets\",\n \"products\": [\n {\n \"sku\": \"SKU-RED-M\",\n \"quantity\": 120,\n \"unit_value\": \"12.50\"\n },\n {\n \"sku\": \"SKU-GREEN-L\",\n \"quantity\": 30\n }\n ]\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/replenishments/{replenishment_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"notes\": \"Arrives on two pallets\",\n \"products\": [\n {\n \"sku\": \"SKU-RED-M\",\n \"quantity\": 120,\n \"unit_value\": \"12.50\"\n },\n {\n \"sku\": \"SKU-GREEN-L\",\n \"quantity\": 30\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cubbo.com/v1/replenishments/{replenishment_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 \"notes\": \"Arrives on two pallets\",\n \"products\": [\n {\n \"sku\": \"SKU-RED-M\",\n \"quantity\": 120,\n \"unit_value\": \"12.50\"\n },\n {\n \"sku\": \"SKU-GREEN-L\",\n \"quantity\": 30\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 55001,
"status": "REQUESTED",
"store_id": 1234,
"notes": "Arrives on two pallets",
"created_at": "2026-10-12T14:03:11.512Z",
"expected_arrived_at": "2026-11-02T15:00:00.000Z",
"sell_ahead": false,
"declared_value": null,
"warehouse_id": 7,
"replenishment_products": [
{
"product_id": 9001,
"expected_quantity": 120,
"unit_value": "12.5",
"product": {
"id": 9001,
"name": "Red T-shirt M",
"bar_code": "7501234567890",
"is_scannable": true,
"product_codes": [
{
"id": 31001,
"sku": "SKU-RED-M"
}
]
}
},
{
"product_id": 9003,
"expected_quantity": 30,
"unit_value": null,
"product": {
"id": 9003,
"name": "Green T-shirt L",
"bar_code": "7501234567892",
"is_scannable": true,
"product_codes": [
{
"id": 31003,
"sku": "SKU-GREEN-L"
}
]
}
}
],
"warehouse": {
"id": 7,
"name": "Mexico City",
"unique_code": "MX-CDMX-1",
"address1": "Av. Ejemplo 123",
"address2": null,
"zip_code": "01000",
"city": "Ciudad de México",
"state": "CDMX",
"country": "MX"
}
}Authorizations
Body
application/json
Response
Replenishment updated
Replenishment as returned by create and update.
Lifecycle status of a replenishment.
WITHOUT_SCHEDULING: created at a warehouse that books receiving appointments natively, but no appointment has been scheduled yet.PENDING: registered but not yet requested to the warehouse (pre-arrival).REQUESTED: announced to the warehouse and awaiting arrival; the initial status at warehouses without native appointment scheduling, and the status after an appointment is booked.IN_TRANSIT: the shipment is on its way to the warehouse.RECEIVED: the shipment was recorded at the dock; counting has not started.PROCESSING: the warehouse is receiving and counting the units (stock has arrived).IN_PUTAWAY: received units are being placed in storage locations.COMPLETED: receiving and putaway finished;completed_atis set.CANCELED: the replenishment was canceled; it no longer counts for external-reference uniqueness.
Available options:
WITHOUT_SCHEDULING, PENDING, REQUESTED, IN_TRANSIT, RECEIVED, PROCESSING, IN_PUTAWAY, COMPLETED, CANCELED Example:
"REQUESTED"