> ## Documentation Index
> Fetch the complete documentation index at: https://developers.e-cross.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Assortment per market

> Choose where to sell each product by sales channel and destination country

Use `targetMarkets` in the [Upsert SKUs API](https://developers.e-cross.tech/api-reference/merchant-catalog/upsert-skus.md) to choose where to sell a
product. A market is a sales channel and destination country pair, such as `ECOM/BR` or `LIVERPOOL/MX`.

The selection applies to the whole product. Send the same selection on every SKU, including all variations.

## Default behavior

When you omit `targetMarkets` from every SKU, e-CROSS automatically selects all markets enabled for your merchant.
You do not need to list each market. Only markets already enabled in your merchant account are included.

This also applies to updates: omitting `targetMarkets` restores all enabled markets, replacing any previous restriction.

The SKU must be active (`globalSaleChannelData.active: true`). Publication follows the normal localization and approval flow.

## Select one market

**1. Get the complete product**

Retrieve the product using the [Get all SKUs of a product API](https://developers.e-cross.tech/api-reference/merchant-catalog/get-sku-by-product.md).
Keep every SKU returned and its catalog data.

**2. Set the same selection on every SKU**

Add `targetMarkets` to every SKU. This complete request body selects ECOM in Brazil for a product with two variations.
Use your own SKU data and publicly accessible image URLs.

```json theme={null}
[
  {
    "skuId": "1234567890",
    "productId": "1234567",
    "main": true,
    "name": "USB charger type C - 1 meter",
    "description": "Fast USB Type C charger.",
    "weight": 0.1,
    "height": 4,
    "width": 4,
    "length": 19,
    "ean": "0799439112766",
    "countryOfOrigin": "CN",
    "hscode": "850440",
    "images": ["https://images.example.com/usb-c-charger/1-meter.jpeg"],
    "targetMarkets": [{ "salesChannel": "ECOM", "country": "BR" }],
    "globalSaleChannelData": {
      "active": true,
      "brand": "ChargerW",
      "category": "Electronics/Phone Accessories/Chargers",
      "color": "silver",
      "size": "1 meter"
    }
  },
  {
    "skuId": "1234567891",
    "productId": "1234567",
    "main": false,
    "name": "USB charger type C - 2 meters",
    "description": "Fast USB Type C charger.",
    "weight": 0.15,
    "height": 4,
    "width": 4,
    "length": 19,
    "ean": "0799439112767",
    "countryOfOrigin": "CN",
    "hscode": "850440",
    "images": ["https://images.example.com/usb-c-charger/2-meters.jpeg"],
    "targetMarkets": [{ "salesChannel": "ECOM", "country": "BR" }],
    "globalSaleChannelData": {
      "active": true,
      "brand": "ChargerW",
      "category": "Electronics/Phone Accessories/Chargers",
      "color": "silver",
      "size": "2 meters"
    }
  }
]
```

**3. Send the complete product**

Send the complete product using the [Upsert SKUs API](https://developers.e-cross.tech/api-reference/merchant-catalog/upsert-skus.md).

Expected: HTTP `200` and the saved SKUs, each with `targetMarkets` containing `ECOM/BR`.

> [!WARNING]
>
> Send every SKU that should remain in the product. SKUs missing from the request are treated as deleted.
> A market-only update still requires the complete product payload.

## Change the selection

Before each update, retrieve the latest product using the
[Get all SKUs of a product API](https://developers.e-cross.tech/api-reference/merchant-catalog/get-sku-by-product.md). Apply the changes to every SKU,
then submit the complete product using the [Upsert SKUs API](https://developers.e-cross.tech/api-reference/merchant-catalog/upsert-skus.md).

The snippets below show only the fields to change, not complete request bodies. Keep all other SKU data.

### Select multiple markets

Sell through ECOM and Liverpool in Mexico, assuming both markets are enabled:

```json theme={null}
{
  "targetMarkets": [
    { "salesChannel": "ECOM", "country": "MX" },
    { "salesChannel": "LIVERPOOL", "country": "MX" }
  ]
}
```

The list replaces the previous selection. `ECOM/BR` is excluded in this example.

### Remove one market

To keep only ECOM in Mexico:

```json theme={null}
{
  "targetMarkets": [{ "salesChannel": "ECOM", "country": "MX" }]
}
```

Removed markets become unavailable in e-CROSS immediately. Sales channel updates are asynchronous. Adding a market
follows localization and approval before publication. If you remove and add markets together, removals apply first;
new markets wait for approval.

### Restore all enabled markets

```json theme={null}
{
  "targetMarkets": []
}
```

> [!WARNING]
>
> `[]` means all enabled markets, not no markets. Omitting `targetMarkets` has the same effect, including on updates.
> Restoring all markets can add markets and require localization and approval.

### Stop sales in every market

Change `active` on every SKU and keep the other `globalSaleChannelData` fields:

```json theme={null}
{
  "globalSaleChannelData": {
    "active": false
  }
}
```

`active: false` overrides the market selection. If the main SKU is inactive, every variation must also be inactive.
This does not delete physical inventory.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.