List pickup locations near a postal code (public)
curl --request GET \
--url https://api.cubbo.com/v1/carrier-services/pickup-locationsimport requests
url = "https://api.cubbo.com/v1/carrier-services/pickup-locations"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.cubbo.com/v1/carrier-services/pickup-locations', 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/carrier-services/pickup-locations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/carrier-services/pickup-locations"
req, _ := http.NewRequest("GET", url, nil)
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/carrier-services/pickup-locations")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cubbo.com/v1/carrier-services/pickup-locations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"rates": [
{
"service_name": "Recolecta en punto físico a 1.5km - Estafeta Insurgentes - Lun a Vie: 10:00-18:00, Sáb: 10:00-14:00, Dom: cerrado",
"service_code": "CUBBOCNCESTEST001",
"source": "Av. Insurgentes 100, CDMX",
"description": "Av. Insurgentes 100, CDMX"
},
{
"service_name": "Recolecta en punto físico a 0.8km - Punto Cubbo Centro",
"service_code": "CUBBOCNCCUBBOCUBBO001",
"source": "Calle Centro 300, CDMX, 06000",
"description": "Calle Centro 300, CDMX, 06000"
}
]
}Click and collect
List pickup locations near a postal code (public)
Public, unauthenticated listing of pickup locations (carrier branches and Cubbo points)
near a postal code, used by the buyer tracking page to offer pickup. Each location comes
as a “rate” with a Spanish display name ready to show to the buyer and a service_code
that identifies the point.
- Without
order_idthe response contains onlyrates, for Mexico. - With
order_id(the encoded order identifier found in the order’s Cubbo tracking link) the list is filtered to the points the order could actually be converted to, andcnc_eligiblereports the outcome. When the order is not eligible, the unfiltered list is still returned together withcnc_eligible: falseand acode; whenorder_idcannot be resolved the code isCNC_INVALID_ORDER_ID. The order’s destination country drives the carrier search. addressenables the carriers that need a street address; without it those carriers are skipped.- A postal code that cannot be used answers 200 with an empty
ratesarray. If any carrier lookup fails, the other carriers’ locations are still returned. - Omitting
postal_codeis not handled gracefully and results in HTTP 500.
GET
/
carrier-services
/
pickup-locations
List pickup locations near a postal code (public)
curl --request GET \
--url https://api.cubbo.com/v1/carrier-services/pickup-locationsimport requests
url = "https://api.cubbo.com/v1/carrier-services/pickup-locations"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.cubbo.com/v1/carrier-services/pickup-locations', 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/carrier-services/pickup-locations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/carrier-services/pickup-locations"
req, _ := http.NewRequest("GET", url, nil)
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/carrier-services/pickup-locations")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cubbo.com/v1/carrier-services/pickup-locations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"rates": [
{
"service_name": "Recolecta en punto físico a 1.5km - Estafeta Insurgentes - Lun a Vie: 10:00-18:00, Sáb: 10:00-14:00, Dom: cerrado",
"service_code": "CUBBOCNCESTEST001",
"source": "Av. Insurgentes 100, CDMX",
"description": "Av. Insurgentes 100, CDMX"
},
{
"service_name": "Recolecta en punto físico a 0.8km - Punto Cubbo Centro",
"service_code": "CUBBOCNCCUBBOCUBBO001",
"source": "Calle Centro 300, CDMX, 06000",
"description": "Calle Centro 300, CDMX, 06000"
}
]
}Query Parameters
Response
Pickup locations, optionally with the order's click-and-collect eligibility
Present only when cnc_eligible is false; why the order is not eligible, or CNC_INVALID_ORDER_ID when order_id could not be resolved
Available options:
CNC_INVALID_ORDER_ID, CNC_INVALID_ORDER_STATUS, CNC_MISSING_POSTAL_CODE, CNC_ORIGINAL_NOT_CUBBO_BILLED, CNC_ORIGINAL_NOT_NATIONAL_SHIPPING, CNC_RATE_CARD_UNAVAILABLE Example:
"CNC_INVALID_ORDER_STATUS"