curl --request PATCH \
--url https://api.cubbo.com/v1/orders/{order_id}/convert-to-click-and-collect \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"store_id": 1234,
"service_code": "CUBBOCNCESTEST001"
}
'import requests
url = "https://api.cubbo.com/v1/orders/{order_id}/convert-to-click-and-collect"
payload = {
"store_id": 1234,
"service_code": "CUBBOCNCESTEST001"
}
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({store_id: 1234, service_code: 'CUBBOCNCESTEST001'})
};
fetch('https://api.cubbo.com/v1/orders/{order_id}/convert-to-click-and-collect', 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/{order_id}/convert-to-click-and-collect",
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([
'store_id' => 1234,
'service_code' => 'CUBBOCNCESTEST001'
]),
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/{order_id}/convert-to-click-and-collect"
payload := strings.NewReader("{\n \"store_id\": 1234,\n \"service_code\": \"CUBBOCNCESTEST001\"\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/{order_id}/convert-to-click-and-collect")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"store_id\": 1234,\n \"service_code\": \"CUBBOCNCESTEST001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cubbo.com/v1/orders/{order_id}/convert-to-click-and-collect")
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 \"store_id\": 1234,\n \"service_code\": \"CUBBOCNCESTEST001\"\n}"
response = http.request(request)
puts response.read_body{
"id": 987654,
"store_id": 1234,
"order_number": "ORD-0001",
"status": "shipped",
"channel_created_at": "2026-01-10T14:02:11.000Z",
"order_date": "2026-01-10T14:02:11.000Z",
"shipping_date": "2026-01-11T18:30:00.000Z",
"pending_at": "2026-01-10T14:05:00.000Z",
"shipping_email": "buyer@example.com",
"shipping_address_1": "Av. Ejemplo 123",
"shipping_status": "shipment_in_transit",
"is_paid": true,
"is_cod": false,
"cod_amount": null,
"requires_document_return": false,
"requires_pickup_on_delivery": false,
"has_carrier_insurance": false,
"has_missing_info": false,
"missing_info": null,
"currency": "MXN",
"total_price": "899.00",
"discount_price": "0.00",
"buyer_shipping_price": "0.00",
"extra_fees_price": "0.0",
"is_pick_and_ship": false,
"pick_n_ship_status": null,
"is_b2b": false,
"is_first_time_buyer": true,
"is_subscription_renewal": false,
"is_click_and_collect": false,
"click_and_collect_metadata": {
"name": "Pickup point name",
"address": "Pickup point address",
"zipcode": "01000",
"description": "Punto fisico - Centro",
"carrier_name": "ESTAFETA",
"pickup_codes": {}
},
"is_multi_package": false,
"shipping": {
"first_name": "Ana",
"last_name": "Example",
"company": null,
"phone": "+525500000000",
"address_1": "Av. Ejemplo 123",
"address_2": null,
"email": "buyer@example.com",
"zip_code": "01000",
"country": "MX",
"state": "CDMX",
"city": "Ciudad de Mexico",
"city_code": null,
"number": "123",
"interior_number": null,
"neighborhood": "Centro",
"references": "Blue door"
},
"billing": {
"first_name": "Ana",
"last_name": "Example",
"company": null,
"phone": "+525500000000",
"tax_id": "000.000.000-00",
"tax_regime": null,
"state_registration": null,
"address_1": "Av. Ejemplo 123",
"address_2": null,
"number": "123",
"interior_number": null,
"neighborhood": "Centro",
"email": "buyer@example.com",
"zip_code": "01000",
"country": "MX",
"state": "CDMX",
"city": "Ciudad de Mexico"
},
"delivery_tracking": [
{
"shipping_number": "TRK000000001",
"tracking_url": "https://carrier.example.com/track/TRK000000001",
"cubbo_tracking_url": "https://tracking.example.com/orders/abc123",
"service_id": "express",
"shipping_status": "shipment_in_transit",
"package_index": 1,
"total_packages": 1
}
],
"return_shipping_labels": [
{
"shipping_number": "RTN000000001",
"tracking_url": "https://carrier.example.com/track/RTN000000001"
}
],
"proof_of_delivery": {
"id": 3101,
"recipient_name": "Ana Example",
"recipient_relationship": "self",
"format": "image",
"files": [
{
"path": "/rails/active_storage/blobs/redirect/example/pod.jpg",
"filename": "pod.jpg",
"byte_size": 120340,
"content_type": "image/jpeg",
"thumbnail_path": "/rails/active_storage/representations/example/pod.jpg"
}
]
},
"estimated_time_arrival": "2026-01-13T00:00:00.000Z",
"latest_estimated_time_arrival_range": {
"range_begin": "2026-01-13T06:00:00.000Z",
"range_end": "2026-01-14T05:59:59.000Z"
},
"delivered_at": null,
"updated_at": "2026-01-11T18:31:00.000Z",
"channel_order_id": "5566778899",
"channel_name": "shopify",
"channel_shipping_line_code": "standard",
"warehouse_timezone": "America/Mexico_City",
"shipping_method": {
"id": 42,
"shipping_name": "DHL Express",
"carrier_name": "DHL",
"capitalized_carrier": "Dhl",
"is_active": true,
"shipping_type": "national",
"delivery_type": "Ground",
"country": "MX",
"is_cod": false,
"extended_zone": true,
"po_box_dropoff": true,
"provides_pod": false,
"contract_provider": null,
"enable_multipackage": false,
"non_working_days": [
0,
6
],
"dispatch_carrier_alias": null,
"handles_fragile": false,
"multipackage_label_mode": "bulk",
"generates_label_per_package": false,
"carrier_supports_per_box_label": false
},
"order_lines": [
{
"id": 5551,
"name": "Red T-shirt M",
"sku": "SKU-RED-M",
"quantity": 2,
"generated": false,
"price_per_item": "449.5",
"discount_per_item": "0.0",
"product": {
"id": 777,
"name": "Red T-shirt M",
"billing_name": "T-shirt",
"description": null,
"has_imei": false,
"is_fragile": false,
"is_kit": false,
"bar_code": "7500000000001",
"is_dropshipping": false,
"is_scannable": true,
"price": "449.5",
"weight": 0.3,
"product_codes": [
{
"id": 9001,
"sku": "SKU-RED-M"
}
]
},
"stock_units": [
{
"id": 31001,
"status": "PICKED",
"product_id": 777,
"picked_at": "2026-01-11T15:00:00.000Z",
"created_at": "2025-12-01T10:00:00.000Z",
"updated_at": "2026-01-11T15:00:00.000Z",
"imei": {
"id": 12,
"imei": "000000000000000"
},
"unit_code": "UC-0001"
}
]
}
],
"invoices": [
{
"id": 7801,
"invoice_type": "WEBMANIA",
"status": "APPROVED",
"invoiceable_id": 987654,
"invoiceable_type": "Order",
"operation_nature": "Venda de mercadoria",
"operation_type": "OUTGOING",
"key": "00000000000000000000000000000000000000000000",
"xml_file": {
"path": "/rails/active_storage/blobs/redirect/example/nfe.xml",
"filename": "nfe.xml",
"byte_size": 10240,
"content_type": "application/xml",
"url": "https://api.cubbo.com/rails/active_storage/blobs/redirect/example/nfe.xml"
},
"pdf_file": {
"path": "/rails/active_storage/blobs/redirect/example/nfe.xml",
"filename": "nfe.xml",
"byte_size": 10240,
"content_type": "application/xml",
"url": "https://api.cubbo.com/rails/active_storage/blobs/redirect/example/nfe.xml"
},
"label_pdf_file": {
"path": "/rails/active_storage/blobs/redirect/example/nfe.xml",
"filename": "nfe.xml",
"byte_size": 10240,
"content_type": "application/xml",
"url": "https://api.cubbo.com/rails/active_storage/blobs/redirect/example/nfe.xml"
}
}
],
"store": {
"id": 1234,
"name": "Example Store"
},
"channel_integration": {
"id": 55,
"channel_type_name": "shopify"
},
"return": {
"id": 501,
"status": "pending",
"return_type": "SIMPLE_RETURN",
"notes": null,
"created_at": "2026-01-20T10:00:00.000Z",
"expected_products": [
{
"product_id": 777,
"quantity": 1
}
]
},
"created_by_return": {
"id": 501,
"status": "pending",
"return_type": "SIMPLE_RETURN",
"notes": null,
"created_at": "2026-01-20T10:00:00.000Z",
"expected_products": [
{
"product_id": 777,
"quantity": 1
}
]
},
"order_histories": [
{
"id": 120001,
"order_id": 987654,
"created_by_id": null,
"previous_status": "packing",
"new_status": "shipped",
"action": "order_status_update",
"metadata": {},
"origin": "shipping_webhook",
"reference_timestamp": "2026-01-11T18:30:00.000Z",
"timestamp": "2026-01-11T18:30:00.000Z",
"incident_description": null,
"difal_error_description": null,
"created_by_cubbo_user": false,
"created_at": "2026-01-11T18:31:00.000Z",
"updated_at": "2026-01-11T18:31:00.000Z"
}
]
}Convert an order to click and collect
Changes an order’s delivery to pickup at the point identified by service_code (obtained
from GET /orders/{order_id}/pickup-points) and reprocesses it with the pickup carrier.
On success the full updated order is returned.
- The order must be in a pre-label status (paused orders are allowed) and must not be click and collect already.
- Click and collect must be enabled for the store, and the point’s carrier must be one the store allows. The store’s order-editing restrictions apply.
- The pickup option must not cost more than the order’s original shipping unless the store waived that check. Orders shipped by carriers not billed through Cubbo, or international orders, cannot be converted.
- Business rejections answer 422 with a stable
code. OnALREADY_CLICK_AND_COLLECTthe body also carries the order’s currentclick_and_collect_metadata(public fields only) so a client retrying after a timeout can tell whether its own conversion won. - If the conversion succeeds but the order cannot be rendered, the response is still
200 with
{"converted": true}; fetch the order to see its new state. - Unknown orders, orders of other accounts and orders your credential cannot update all answer the same 404 body.
curl --request PATCH \
--url https://api.cubbo.com/v1/orders/{order_id}/convert-to-click-and-collect \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"store_id": 1234,
"service_code": "CUBBOCNCESTEST001"
}
'import requests
url = "https://api.cubbo.com/v1/orders/{order_id}/convert-to-click-and-collect"
payload = {
"store_id": 1234,
"service_code": "CUBBOCNCESTEST001"
}
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({store_id: 1234, service_code: 'CUBBOCNCESTEST001'})
};
fetch('https://api.cubbo.com/v1/orders/{order_id}/convert-to-click-and-collect', 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/{order_id}/convert-to-click-and-collect",
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([
'store_id' => 1234,
'service_code' => 'CUBBOCNCESTEST001'
]),
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/{order_id}/convert-to-click-and-collect"
payload := strings.NewReader("{\n \"store_id\": 1234,\n \"service_code\": \"CUBBOCNCESTEST001\"\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/{order_id}/convert-to-click-and-collect")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"store_id\": 1234,\n \"service_code\": \"CUBBOCNCESTEST001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cubbo.com/v1/orders/{order_id}/convert-to-click-and-collect")
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 \"store_id\": 1234,\n \"service_code\": \"CUBBOCNCESTEST001\"\n}"
response = http.request(request)
puts response.read_body{
"id": 987654,
"store_id": 1234,
"order_number": "ORD-0001",
"status": "shipped",
"channel_created_at": "2026-01-10T14:02:11.000Z",
"order_date": "2026-01-10T14:02:11.000Z",
"shipping_date": "2026-01-11T18:30:00.000Z",
"pending_at": "2026-01-10T14:05:00.000Z",
"shipping_email": "buyer@example.com",
"shipping_address_1": "Av. Ejemplo 123",
"shipping_status": "shipment_in_transit",
"is_paid": true,
"is_cod": false,
"cod_amount": null,
"requires_document_return": false,
"requires_pickup_on_delivery": false,
"has_carrier_insurance": false,
"has_missing_info": false,
"missing_info": null,
"currency": "MXN",
"total_price": "899.00",
"discount_price": "0.00",
"buyer_shipping_price": "0.00",
"extra_fees_price": "0.0",
"is_pick_and_ship": false,
"pick_n_ship_status": null,
"is_b2b": false,
"is_first_time_buyer": true,
"is_subscription_renewal": false,
"is_click_and_collect": false,
"click_and_collect_metadata": {
"name": "Pickup point name",
"address": "Pickup point address",
"zipcode": "01000",
"description": "Punto fisico - Centro",
"carrier_name": "ESTAFETA",
"pickup_codes": {}
},
"is_multi_package": false,
"shipping": {
"first_name": "Ana",
"last_name": "Example",
"company": null,
"phone": "+525500000000",
"address_1": "Av. Ejemplo 123",
"address_2": null,
"email": "buyer@example.com",
"zip_code": "01000",
"country": "MX",
"state": "CDMX",
"city": "Ciudad de Mexico",
"city_code": null,
"number": "123",
"interior_number": null,
"neighborhood": "Centro",
"references": "Blue door"
},
"billing": {
"first_name": "Ana",
"last_name": "Example",
"company": null,
"phone": "+525500000000",
"tax_id": "000.000.000-00",
"tax_regime": null,
"state_registration": null,
"address_1": "Av. Ejemplo 123",
"address_2": null,
"number": "123",
"interior_number": null,
"neighborhood": "Centro",
"email": "buyer@example.com",
"zip_code": "01000",
"country": "MX",
"state": "CDMX",
"city": "Ciudad de Mexico"
},
"delivery_tracking": [
{
"shipping_number": "TRK000000001",
"tracking_url": "https://carrier.example.com/track/TRK000000001",
"cubbo_tracking_url": "https://tracking.example.com/orders/abc123",
"service_id": "express",
"shipping_status": "shipment_in_transit",
"package_index": 1,
"total_packages": 1
}
],
"return_shipping_labels": [
{
"shipping_number": "RTN000000001",
"tracking_url": "https://carrier.example.com/track/RTN000000001"
}
],
"proof_of_delivery": {
"id": 3101,
"recipient_name": "Ana Example",
"recipient_relationship": "self",
"format": "image",
"files": [
{
"path": "/rails/active_storage/blobs/redirect/example/pod.jpg",
"filename": "pod.jpg",
"byte_size": 120340,
"content_type": "image/jpeg",
"thumbnail_path": "/rails/active_storage/representations/example/pod.jpg"
}
]
},
"estimated_time_arrival": "2026-01-13T00:00:00.000Z",
"latest_estimated_time_arrival_range": {
"range_begin": "2026-01-13T06:00:00.000Z",
"range_end": "2026-01-14T05:59:59.000Z"
},
"delivered_at": null,
"updated_at": "2026-01-11T18:31:00.000Z",
"channel_order_id": "5566778899",
"channel_name": "shopify",
"channel_shipping_line_code": "standard",
"warehouse_timezone": "America/Mexico_City",
"shipping_method": {
"id": 42,
"shipping_name": "DHL Express",
"carrier_name": "DHL",
"capitalized_carrier": "Dhl",
"is_active": true,
"shipping_type": "national",
"delivery_type": "Ground",
"country": "MX",
"is_cod": false,
"extended_zone": true,
"po_box_dropoff": true,
"provides_pod": false,
"contract_provider": null,
"enable_multipackage": false,
"non_working_days": [
0,
6
],
"dispatch_carrier_alias": null,
"handles_fragile": false,
"multipackage_label_mode": "bulk",
"generates_label_per_package": false,
"carrier_supports_per_box_label": false
},
"order_lines": [
{
"id": 5551,
"name": "Red T-shirt M",
"sku": "SKU-RED-M",
"quantity": 2,
"generated": false,
"price_per_item": "449.5",
"discount_per_item": "0.0",
"product": {
"id": 777,
"name": "Red T-shirt M",
"billing_name": "T-shirt",
"description": null,
"has_imei": false,
"is_fragile": false,
"is_kit": false,
"bar_code": "7500000000001",
"is_dropshipping": false,
"is_scannable": true,
"price": "449.5",
"weight": 0.3,
"product_codes": [
{
"id": 9001,
"sku": "SKU-RED-M"
}
]
},
"stock_units": [
{
"id": 31001,
"status": "PICKED",
"product_id": 777,
"picked_at": "2026-01-11T15:00:00.000Z",
"created_at": "2025-12-01T10:00:00.000Z",
"updated_at": "2026-01-11T15:00:00.000Z",
"imei": {
"id": 12,
"imei": "000000000000000"
},
"unit_code": "UC-0001"
}
]
}
],
"invoices": [
{
"id": 7801,
"invoice_type": "WEBMANIA",
"status": "APPROVED",
"invoiceable_id": 987654,
"invoiceable_type": "Order",
"operation_nature": "Venda de mercadoria",
"operation_type": "OUTGOING",
"key": "00000000000000000000000000000000000000000000",
"xml_file": {
"path": "/rails/active_storage/blobs/redirect/example/nfe.xml",
"filename": "nfe.xml",
"byte_size": 10240,
"content_type": "application/xml",
"url": "https://api.cubbo.com/rails/active_storage/blobs/redirect/example/nfe.xml"
},
"pdf_file": {
"path": "/rails/active_storage/blobs/redirect/example/nfe.xml",
"filename": "nfe.xml",
"byte_size": 10240,
"content_type": "application/xml",
"url": "https://api.cubbo.com/rails/active_storage/blobs/redirect/example/nfe.xml"
},
"label_pdf_file": {
"path": "/rails/active_storage/blobs/redirect/example/nfe.xml",
"filename": "nfe.xml",
"byte_size": 10240,
"content_type": "application/xml",
"url": "https://api.cubbo.com/rails/active_storage/blobs/redirect/example/nfe.xml"
}
}
],
"store": {
"id": 1234,
"name": "Example Store"
},
"channel_integration": {
"id": 55,
"channel_type_name": "shopify"
},
"return": {
"id": 501,
"status": "pending",
"return_type": "SIMPLE_RETURN",
"notes": null,
"created_at": "2026-01-20T10:00:00.000Z",
"expected_products": [
{
"product_id": 777,
"quantity": 1
}
]
},
"created_by_return": {
"id": 501,
"status": "pending",
"return_type": "SIMPLE_RETURN",
"notes": null,
"created_at": "2026-01-20T10:00:00.000Z",
"expected_products": [
{
"product_id": 777,
"quantity": 1
}
]
},
"order_histories": [
{
"id": 120001,
"order_id": 987654,
"created_by_id": null,
"previous_status": "packing",
"new_status": "shipped",
"action": "order_status_update",
"metadata": {},
"origin": "shipping_webhook",
"reference_timestamp": "2026-01-11T18:30:00.000Z",
"timestamp": "2026-01-11T18:30:00.000Z",
"incident_description": null,
"difal_error_description": null,
"created_by_cubbo_user": false,
"created_at": "2026-01-11T18:31:00.000Z",
"updated_at": "2026-01-11T18:31:00.000Z"
}
]
}Authorizations
Body
Response
Order converted. The body is the updated order (with order_lines and shipping_method), or {"converted": true} if the order could not be rendered.
- Option 1
- Option 2
An order as returned by the Orders endpoints. Scalar fields are always available; associations
(shipping_method, order_lines, invoices, store, channel_integration, return,
created_by_return, order_histories) are present only when the endpoint includes them. Each
endpoint's response description lists the fields it returns.
Fulfillment status of an order. processing, picking and packing all mean the order is being
prepared in the warehouse. holded means the order is on hold. packed is unused.
initial, unpaid, empty, pending, error, cancelation_window, entirely_dropshipping, backorder, processing, picking, packing, packed, shipped, canceled, holded, interrupted, returned, return_arrived, returning, reentered, awaiting_fulfillment_request, awaiting_dropoff, arrived_at_warehouse "shipped"
Carrier-side status of the shipment.
shipment_created, awaiting_collection, shipment_collected, shipment_in_transit, shipment_out_for_delivery, shipment_delivered, shipment_partially_delivered, shipment_with_incident, shipment_to_be_self_collected, shipment_canceled, shipment_returned, shipment_not_defined "shipment_in_transit"