Create a store from an existing one
curl --request POST \
--url https://api.cubbo.com/v1/stores \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Partner Store SP",
"source_store_id": 1234,
"created_by_email": "integrations@example.com",
"store_type": "ALL_SERVICES",
"description": "Store provisioned via API",
"source_shipping_group_ids": [
101,
102
],
"default_shipping_group_id": 101,
"webhook_consumer_url": "https://example.com/cubbo/webhooks",
"webhook_feeds": [
"order_status",
"inventory_movement",
"replenishment_status"
]
}
'import requests
url = "https://api.cubbo.com/v1/stores"
payload = {
"name": "Partner Store SP",
"source_store_id": 1234,
"created_by_email": "integrations@example.com",
"store_type": "ALL_SERVICES",
"description": "Store provisioned via API",
"source_shipping_group_ids": [101, 102],
"default_shipping_group_id": 101,
"webhook_consumer_url": "https://example.com/cubbo/webhooks",
"webhook_feeds": ["order_status", "inventory_movement", "replenishment_status"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Partner Store SP',
source_store_id: 1234,
created_by_email: 'integrations@example.com',
store_type: 'ALL_SERVICES',
description: 'Store provisioned via API',
source_shipping_group_ids: [101, 102],
default_shipping_group_id: 101,
webhook_consumer_url: 'https://example.com/cubbo/webhooks',
webhook_feeds: ['order_status', 'inventory_movement', 'replenishment_status']
})
};
fetch('https://api.cubbo.com/v1/stores', 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/stores",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Partner Store SP',
'source_store_id' => 1234,
'created_by_email' => 'integrations@example.com',
'store_type' => 'ALL_SERVICES',
'description' => 'Store provisioned via API',
'source_shipping_group_ids' => [
101,
102
],
'default_shipping_group_id' => 101,
'webhook_consumer_url' => 'https://example.com/cubbo/webhooks',
'webhook_feeds' => [
'order_status',
'inventory_movement',
'replenishment_status'
]
]),
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/stores"
payload := strings.NewReader("{\n \"name\": \"Partner Store SP\",\n \"source_store_id\": 1234,\n \"created_by_email\": \"integrations@example.com\",\n \"store_type\": \"ALL_SERVICES\",\n \"description\": \"Store provisioned via API\",\n \"source_shipping_group_ids\": [\n 101,\n 102\n ],\n \"default_shipping_group_id\": 101,\n \"webhook_consumer_url\": \"https://example.com/cubbo/webhooks\",\n \"webhook_feeds\": [\n \"order_status\",\n \"inventory_movement\",\n \"replenishment_status\"\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.cubbo.com/v1/stores")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Partner Store SP\",\n \"source_store_id\": 1234,\n \"created_by_email\": \"integrations@example.com\",\n \"store_type\": \"ALL_SERVICES\",\n \"description\": \"Store provisioned via API\",\n \"source_shipping_group_ids\": [\n 101,\n 102\n ],\n \"default_shipping_group_id\": 101,\n \"webhook_consumer_url\": \"https://example.com/cubbo/webhooks\",\n \"webhook_feeds\": [\n \"order_status\",\n \"inventory_movement\",\n \"replenishment_status\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cubbo.com/v1/stores")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Partner Store SP\",\n \"source_store_id\": 1234,\n \"created_by_email\": \"integrations@example.com\",\n \"store_type\": \"ALL_SERVICES\",\n \"description\": \"Store provisioned via API\",\n \"source_shipping_group_ids\": [\n 101,\n 102\n ],\n \"default_shipping_group_id\": 101,\n \"webhook_consumer_url\": \"https://example.com/cubbo/webhooks\",\n \"webhook_feeds\": [\n \"order_status\",\n \"inventory_movement\",\n \"replenishment_status\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 4821,
"name": "Partner Store SP",
"description": "Store provisioned via API",
"created_at": "2026-09-03T14:02:11.000Z",
"updated_at": "2026-09-03T14:02:11.000Z",
"tax_id": null,
"invoice_customization": {},
"state": null,
"tax_regime": null,
"tax_company_name": null,
"tax_address": null,
"tax_address_number": null,
"tax_address_neighborhood": null,
"tax_city": null,
"tax_zipcode": null,
"tax_state_phone": null,
"tax_state_registration": null,
"store_type": "ALL_SERVICES",
"b2b": false,
"d2c": true,
"skip_product_lot_in_returns": null,
"receive_only_complete_returns": null,
"return_inspection_enabled": null,
"requires_stock_only_from_confirmed_replenishments": false,
"has_store_branches": false,
"is_oxxo_store": false,
"enable_replenishment_invoices": null,
"enable_removal_order_invoices": null,
"enable_manual_client_invoice": false,
"enable_b2b_cnpj_client_invoice": false,
"account": {
"id": 900,
"name": "Partner Ltd",
"account_type": "COMPANY"
},
"warehouses": [
{
"id": 232,
"name": "CD Sao Paulo",
"unique_code": "SP1"
}
],
"open_api_integration": {
"client_id": "b6e3a1f0-1234-4c9a-9a11-000000000001",
"client_secret": "<client-secret-shown-once>",
"webhook_consumer_url": "https://example.com/cubbo/webhooks",
"webhook_feeds": [
"order_status",
"inventory_movement",
"replenishment_status"
],
"webhook_consumer_secret": "<webhook-secret-shown-once>",
"webhook_consumer_secret_reason": null
}
}
Stores
Create a store from an existing one
Creates a new store in the same account as an existing store (source_store_id) used as
a template. The new store inherits the source store’s billing configuration and, unless
you override them, its store type and warehouse. Your credential must have access to the
source store, and the source store must already have a billing configuration.
- Send
source_shipping_group_idsto copy specific shipping groups from the source store instead of receiving the country defaults. Doing so also creates an Open API integration for the new store and returns its credentials once inopen_api_integration. Withoutsource_shipping_group_idsno integration is created, the response has noopen_api_integrationkey, and the store-scoped endpoints (PATCH /store, fiscal account, digital certificate) cannot be used for it. default_shipping_group_idis required wheneversource_shipping_group_idsis sent; it must be one of the copied ids and must not be a group with only international shipping methods. It becomes the fallback for orders that arrive without a recognized shipping method.webhook_consumer_urlandwebhook_feedsare only accepted together withsource_shipping_group_ids. The URL is validated for format only (https, real host, no raw IP) and is not probed. When omitted, no webhook signing secret is issued.- The returned
client_secretandwebhook_consumer_secretare shown only in this response. The credential grants access to every store of the same account, so treat it as an account-level secret. - The whole operation is transactional: on any validation failure nothing is created.
POST
/
stores
Create a store from an existing one
curl --request POST \
--url https://api.cubbo.com/v1/stores \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Partner Store SP",
"source_store_id": 1234,
"created_by_email": "integrations@example.com",
"store_type": "ALL_SERVICES",
"description": "Store provisioned via API",
"source_shipping_group_ids": [
101,
102
],
"default_shipping_group_id": 101,
"webhook_consumer_url": "https://example.com/cubbo/webhooks",
"webhook_feeds": [
"order_status",
"inventory_movement",
"replenishment_status"
]
}
'import requests
url = "https://api.cubbo.com/v1/stores"
payload = {
"name": "Partner Store SP",
"source_store_id": 1234,
"created_by_email": "integrations@example.com",
"store_type": "ALL_SERVICES",
"description": "Store provisioned via API",
"source_shipping_group_ids": [101, 102],
"default_shipping_group_id": 101,
"webhook_consumer_url": "https://example.com/cubbo/webhooks",
"webhook_feeds": ["order_status", "inventory_movement", "replenishment_status"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Partner Store SP',
source_store_id: 1234,
created_by_email: 'integrations@example.com',
store_type: 'ALL_SERVICES',
description: 'Store provisioned via API',
source_shipping_group_ids: [101, 102],
default_shipping_group_id: 101,
webhook_consumer_url: 'https://example.com/cubbo/webhooks',
webhook_feeds: ['order_status', 'inventory_movement', 'replenishment_status']
})
};
fetch('https://api.cubbo.com/v1/stores', 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/stores",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Partner Store SP',
'source_store_id' => 1234,
'created_by_email' => 'integrations@example.com',
'store_type' => 'ALL_SERVICES',
'description' => 'Store provisioned via API',
'source_shipping_group_ids' => [
101,
102
],
'default_shipping_group_id' => 101,
'webhook_consumer_url' => 'https://example.com/cubbo/webhooks',
'webhook_feeds' => [
'order_status',
'inventory_movement',
'replenishment_status'
]
]),
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/stores"
payload := strings.NewReader("{\n \"name\": \"Partner Store SP\",\n \"source_store_id\": 1234,\n \"created_by_email\": \"integrations@example.com\",\n \"store_type\": \"ALL_SERVICES\",\n \"description\": \"Store provisioned via API\",\n \"source_shipping_group_ids\": [\n 101,\n 102\n ],\n \"default_shipping_group_id\": 101,\n \"webhook_consumer_url\": \"https://example.com/cubbo/webhooks\",\n \"webhook_feeds\": [\n \"order_status\",\n \"inventory_movement\",\n \"replenishment_status\"\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.cubbo.com/v1/stores")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Partner Store SP\",\n \"source_store_id\": 1234,\n \"created_by_email\": \"integrations@example.com\",\n \"store_type\": \"ALL_SERVICES\",\n \"description\": \"Store provisioned via API\",\n \"source_shipping_group_ids\": [\n 101,\n 102\n ],\n \"default_shipping_group_id\": 101,\n \"webhook_consumer_url\": \"https://example.com/cubbo/webhooks\",\n \"webhook_feeds\": [\n \"order_status\",\n \"inventory_movement\",\n \"replenishment_status\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cubbo.com/v1/stores")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Partner Store SP\",\n \"source_store_id\": 1234,\n \"created_by_email\": \"integrations@example.com\",\n \"store_type\": \"ALL_SERVICES\",\n \"description\": \"Store provisioned via API\",\n \"source_shipping_group_ids\": [\n 101,\n 102\n ],\n \"default_shipping_group_id\": 101,\n \"webhook_consumer_url\": \"https://example.com/cubbo/webhooks\",\n \"webhook_feeds\": [\n \"order_status\",\n \"inventory_movement\",\n \"replenishment_status\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 4821,
"name": "Partner Store SP",
"description": "Store provisioned via API",
"created_at": "2026-09-03T14:02:11.000Z",
"updated_at": "2026-09-03T14:02:11.000Z",
"tax_id": null,
"invoice_customization": {},
"state": null,
"tax_regime": null,
"tax_company_name": null,
"tax_address": null,
"tax_address_number": null,
"tax_address_neighborhood": null,
"tax_city": null,
"tax_zipcode": null,
"tax_state_phone": null,
"tax_state_registration": null,
"store_type": "ALL_SERVICES",
"b2b": false,
"d2c": true,
"skip_product_lot_in_returns": null,
"receive_only_complete_returns": null,
"return_inspection_enabled": null,
"requires_stock_only_from_confirmed_replenishments": false,
"has_store_branches": false,
"is_oxxo_store": false,
"enable_replenishment_invoices": null,
"enable_removal_order_invoices": null,
"enable_manual_client_invoice": false,
"enable_b2b_cnpj_client_invoice": false,
"account": {
"id": 900,
"name": "Partner Ltd",
"account_type": "COMPANY"
},
"warehouses": [
{
"id": 232,
"name": "CD Sao Paulo",
"unique_code": "SP1"
}
],
"open_api_integration": {
"client_id": "b6e3a1f0-1234-4c9a-9a11-000000000001",
"client_secret": "<client-secret-shown-once>",
"webhook_consumer_url": "https://example.com/cubbo/webhooks",
"webhook_feeds": [
"order_status",
"inventory_movement",
"replenishment_status"
],
"webhook_consumer_secret": "<webhook-secret-shown-once>",
"webhook_consumer_secret_reason": null
}
}
Authorizations
Body
application/json
Response
Store created. The body is the full store record plus, when an integration was created, its credentials.
Response of POST /stores: the full store record (the fields of Store plus the
store's configuration flags, its account and its warehouses) and, only when an Open
API integration was created, the open_api_integration credentials.