Récupérer les arbres de catégories d'un canal
/multi-storefrontMulti-Storefront (MSF) permet aux marchands de gérer plusieurs vitrines depuis un seul backend BigCommerce. Chaque vitrine peut avoir sa propre image de marque, ses produits, ses prix et son domaine, tout en partageant l
<overview>
Multi-Storefront (MSF) enables merchants to manage multiple storefronts from a single BigCommerce backend. Each storefront can have its own branding, products, pricing, and domain while sharing inventory and order management. Understanding channels and site routing is essential for MSF integrations.
</overview>
<core_concepts>
<channels>
A channel represents a place where products are sold:
- Storefronts (Stencil or headless)
- Marketplaces (Amazon, eBay)
- Point of sale systems
- Marketing feeds
Every BigCommerce store has a default channel with ID 1.
This channel cannot be deleted.
</channels>
<sites>
A site links a channel to a domain:
- Maps URL to storefront channel
- Enables proper routing
- Configures SSL and domains
</sites>
<channel_assignments>
Products must be explicitly assigned to channels.
Adding to a category ≠ making available on channel.
</channel_assignments>
</core_concepts>
<availability>
| Plan | MSF Support |
|---|---|
| Enterprise | Full MSF features |
| Pro | Limited MSF features |
| Standard | No MSF |
</availability>
<channels_api>
<list_channels>
GET /v3/channels
Response:
{
"data": [
{
"id": 1,
"name": "Primary Storefront",
"type": "storefront",
"platform": "bigcommerce",
"status": "active",
"is_listable_from_ui": true,
"is_visible": true,
"date_created": "2024-01-01T00:00:00Z"
},
{
"id": 2,
"name": "Wholesale Store",
"type": "storefront",
"platform": "bigcommerce",
"status": "active"
}
]
}</list_channels>
<create_channel>
POST /v3/channels
{
"name": "EU Storefront",
"type": "storefront",
"platform": "bigcommerce",
"status": "active",
"is_listable_from_ui": true,
"is_visible": true
}</create_channel>
<channel_types>
storefront- Web storefrontmarketplace- Third-party marketplacemarketing- Marketing/advertising feedpos- Point of sale
</channel_types>
</channels_api>
<sites_api>
<create_site>
POST /v3/sites
{
"url": "https://eu.example.com",
"channel_id": 2,
"ssl": {
"type": "bigcommerce_provided"
}
}</create_site>
<get_sites>
GET /v3/sites
GET /v3/sites?channel_id=2</get_sites>
<site_routes>
Configure URL routes for specific content:
POST /v3/sites/{site_id}/routes
{
"type": "product",
"matching": "/products/*",
"route": "/eu-products/{slug}"
}</site_routes>
</sites_api>
<productchannelassignments>
<assign_products>
PUT /v3/catalog/products/channel-assignments
{
"assignments": [
{"product_id": 111, "channel_id": 1},
{"product_id": 111, "channel_id": 2},
{"product_id": 112, "channel_id": 2}
]
}Product 111 appears on both channels.
Product 112 only on channel 2.
</assign_products>
<get_assignments>
GET /v3/catalog/products/channel-assignments?product_id:in=111,112
GET /v3/catalog/products/channel-assignments?channel_id=2</get_assignments>
<remove_assignment>
DELETE /v3/catalog/products/channel-assignments?product_id:in=111&channel_id:in=2</remove_assignment>
<categorytreeassignment>
Categories are also channel-specific via category trees:
# Get category trees for a channel
GET /v3/catalog/trees?channel_id=2
# Assign category tree to channel
POST /v3/catalog/trees
{
"channel_id": 2,
"name": "EU Category Tree"
}</categorytreeassignment>
</productchannelassignments>
<channelspecificdata>
<localizedproductattributes>
Override product attributes per channel locale:
PUT /v3/catalog/products/{product_id}/channel/{channel_id}
{
"name": "Produit en Français",
"description": "Description en français..."
}Channel-specific overrides supersede global attributes.
</localizedproductattributes>
<channel_pricing>
Set different prices per channel:
PUT /v3/catalog/products/{product_id}/channel/{channel_id}/currency-assignments
{
"default_price": 49.99,
"sale_price": 39.99,
"currency_code": "EUR"
}</channel_pricing>
</channelspecificdata>
<ordersandcarts>
<channelawareorders>
Always specify channel_id when creating orders:
POST /v2/orders
{
"channel_id": 2,
"customer_id": 123,
"billing_address": {...},
"products": [...]
}Filter orders by channel:
GET /v2/orders?channel_id=2</channelawareorders>
<channelawarecarts>
Carts must be associated with channels:
POST /v3/carts
{
"channel_id": 2,
"line_items": [...]
}Cart redirect URLs will point to the correct storefront site.
</channelawarecarts>
<checkout_routing>
If site-channel relationship is properly configured:
redirectedCheckoutUrl→ Correct storefront domainembeddedCheckoutUrl→ Embeddable checkout for that channel
</checkout_routing>
</ordersandcarts>
<storefront_tokens>
<channelspecifictokens>
Create tokens for specific channels:
POST /v3/storefront/api-toke