List click-and-collect pickup points eligible for an order
curl --request GET \
--url https://api.cubbo.com/v1/orders/{order_id}/pickup-points \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cubbo.com/v1/orders/{order_id}/pickup-points"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cubbo.com/v1/orders/{order_id}/pickup-points', 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}/pickup-points",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cubbo.com/v1/orders/{order_id}/pickup-points"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cubbo.com/v1/orders/{order_id}/pickup-points")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cubbo.com/v1/orders/{order_id}/pickup-points")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"cnc_eligible": true,
"pickup_points": [
{
"carrier": "ESTAFETA",
"service_code": "CUBBOCNCESTEST001",
"name": "Sucursal Centro",
"address": "Av. Reforma 123, CDMX",
"distance_km": 1.2,
"schedule": "Lun a Vie: 10:00-18:00, Sab: 10:00-14:00, Dom: cerrado"
},
{
"carrier": "CUBBO",
"service_code": "CUBBOCNCCUBBOCUBBO001",
"name": "Punto Cubbo Centro",
"address": "Calle Centro 300, CDMX, 06000",
"distance_km": 0.8,
"schedule": "Lunes a Sabado: 10:00-20:00"
}
]
}Click and collect
List click-and-collect pickup points eligible for an order
Returns the pickup points (carrier branches and Cubbo points) near a postal code to which
the order could be converted with
PATCH /orders/{order_id}/convert-to-click-and-collect. Only points whose conversion
would be accepted are listed: the order must be in a pre-label status (paused orders are
allowed), click and collect must be enabled for the store, and each point’s pickup
carrier must be allowed for the store and not cost more than the order’s original
shipping (unless the store waived that check).
store_idis the store that owns the order and must be a store of your account; an order that does not belong to it answers 404.postal_codedefaults to the order’s shipping zip code.addressrefines the search for carriers that need a street address.- An ineligible order still answers 200, with
cnc_eligible: false, acodeexplaining why and an empty list. - Unknown orders, orders of other accounts and orders your credential cannot read all answer the same 404 body.
GET
/
orders
/
{order_id}
/
pickup-points
List click-and-collect pickup points eligible for an order
curl --request GET \
--url https://api.cubbo.com/v1/orders/{order_id}/pickup-points \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cubbo.com/v1/orders/{order_id}/pickup-points"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cubbo.com/v1/orders/{order_id}/pickup-points', 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}/pickup-points",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cubbo.com/v1/orders/{order_id}/pickup-points"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cubbo.com/v1/orders/{order_id}/pickup-points")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cubbo.com/v1/orders/{order_id}/pickup-points")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"cnc_eligible": true,
"pickup_points": [
{
"carrier": "ESTAFETA",
"service_code": "CUBBOCNCESTEST001",
"name": "Sucursal Centro",
"address": "Av. Reforma 123, CDMX",
"distance_km": 1.2,
"schedule": "Lun a Vie: 10:00-18:00, Sab: 10:00-14:00, Dom: cerrado"
},
{
"carrier": "CUBBO",
"service_code": "CUBBOCNCCUBBOCUBBO001",
"name": "Punto Cubbo Centro",
"address": "Calle Centro 300, CDMX, 06000",
"distance_km": 0.8,
"schedule": "Lunes a Sabado: 10:00-20:00"
}
]
}Authorizations
Query Parameters
Response
Eligible pickup points, or the reason the order is not eligible
Present only when cnc_eligible is false; why the order is not eligible
Available options:
CNC_INVALID_ORDER_STATUS, CNC_NOT_ENABLED_FOR_STORE, CNC_NO_CARRIERS_ENABLED_FOR_STORE, CNC_MISSING_POSTAL_CODE, CNC_ORIGINAL_NOT_CUBBO_BILLED, CNC_ORIGINAL_NOT_NATIONAL_SHIPPING, CNC_RATE_CARD_UNAVAILABLE Example:
"CNC_NOT_ENABLED_FOR_STORE"