> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omnicommerce.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Bulk price and stock updates

> Use the same CSV and Excel update workflow as Omni Bulk Update through the SDK, CLI, or REST API.

Use `omni products bulk-update`, JavaScript `products.bulkUpdate`, or Python
`products.bulk_update` to update existing catalog SKUs from uploaded CSV or Excel
files. These methods use the same price validation, inventory authority, SKU
matching, and durable processing as Omni's **Products → Bulk Update** page.

Available in TypeScript SDK **0.23.0**, Python SDK **0.18.0**, and CLI **0.14.1**.
The API and built-in agent instructions require the corresponding application release.

## Prepare the file and stock source

Upload the file through Documents and keep its document ID. Each request accepts
1–10 `documentIds`, with up to 10,000 data rows per file. Files are applied in
requested order. Repeated document IDs are deduplicated.

For inventory updates, select a `sourceId` or `locationId` from the eligible
sources returned by `products.bulkUpdateOptions` / `products.bulk_update_options`.
This list matches Omni Bulk Update and excludes stock sources that cannot accept
manual or CSV quantities. Preserve the seller's selected source; ask for a choice
when multiple sources remain.

```bash theme={null}
omni documents upload --file ./updates.xlsx --json '{"documentType":"other"}'
omni products bulk-update-options
```

Use `scope: "price"`, `"inventory"`, or `"both"` (the default). Inventory and both
require a source or location. Pass exact column names when known; otherwise the
shared import workflow detects columns and reports unresolved mappings.

## Submit one durable update

```bash CLI theme={null}
omni products bulk-update --json '{
  "documentIds": ["DOCUMENT_UUID"],
  "scope": "both",
  "sourceId": "SOURCE_UUID",
  "skuColumn": "SKU",
  "priceColumn": "Price",
  "quantityColumn": "Stock",
  "syncToMarketplaces": true
}' > bulk-update.json
```

```typescript TypeScript theme={null}
const accepted = await client.products.bulkUpdate({
  documentIds,
  scope: "both",
  sourceId,
  skuColumn: "SKU",
  priceColumn: "Price",
  quantityColumn: "Stock",
  syncToMarketplaces: true,
});
const imports = accepted.data.imports;
// Persist accepted and every import reference before finishing this process.
```

```python Python theme={null}
accepted = client.products.bulk_update(
    document_ids=document_ids,
    scope="both",
    source_id=source_id,
    sku_column="SKU",
    price_column="Price",
    quantity_column="Stock",
    sync_to_marketplaces=True,
)["data"]
imports = accepted["imports"]
# Persist accepted and every import reference before finishing this process.
```

Requires `catalog:write` and the corresponding product/inventory permissions.
Reads require `catalog:read`. Credentials fix the organization; do not send an
organization ID with an organization API key.

`syncToMarketplaces` defaults to `true`. Set it to `false` for catalog/source-only
work. Omit `marketplaces` to use every eligible existing listing, or pass the
seller's requested marketplace subset. All supported marketplaces use the shared
adapters. This operation does not create catalog products or new listings.

Zero prices and quantities are valid catalog values. Unknown SKUs and SKUs
matching multiple catalog records are reported explicitly; duplicate SKUs within
a file are rejected. Prices retain the existing catalog currency unless a
currency column is provided. Stock uses the selected source's authority and
availability rules.

## Check every saved import

Price and inventory have separate saved import references. Keep all references,
including when one side fails. Submission returns immediately after validation
and queueing; durable execution continues after the client disconnects.

```bash CLI theme={null}
omni products bulk-update-status --json '{
  "imports": [
    {"kind": "price", "importId": "PRICE_IMPORT_UUID"},
    {"kind": "inventory", "importId": "INVENTORY_IMPORT_UUID"}
  ]
}'
```

```typescript TypeScript theme={null}
const progress = await client.products.bulkUpdateStatus({ imports });
```

```python Python theme={null}
progress = client.products.bulk_update_status(imports=imports)["data"]
```

Status accepts up to 20 typed references, deduplicated in requested order.
`success` is true only when every requested import completed without rejected or
unknown rows. `pendingCount`, `failedCount`, `allTerminal`, and ordered per-import
results preserve partial outcomes. Request `includeRows: true`, `rowOffset`, and
`rowLimit` (maximum 100) for bounded row evidence. Python arguments are
`include_rows`, `row_offset`, and `row_limit`; nested JSON and response keys stay
camelCase.

Inventory `applied` confirms source balances were saved and any required sync was
queued. It does not certify marketplace completion. The shared workflow syncs
changed values; use [selected-field publishing](https://docs.omnicommerce.ai/sdk/typescript.md#batch-publish-delist-and-update)
to explicitly republish unchanged values, and [commerce verification](https://docs.omnicommerce.ai/guides/commerce-verification.md)
for requested channel evidence.

If dispatch fails, the result retains saved import references and a per-document
error. Inspect those references before retrying; pending or accepted work is not
proof of completion. Avoid a long client loop or one request per SKU.

## REST endpoints

| Method | Path | Purpose |
| - | - | - |
| GET | `/api/v1/products/bulk-update` | Eligible inventory sources and file limits |
| POST | `/api/v1/products/bulk-update` | Validate and queue uploaded files |
| POST | `/api/v1/products/bulk-update/status` | Batch progress and bounded row evidence |

The [API reference](https://docs.omnicommerce.ai/api-reference.md) is generated from the canonical runtime schemas.
For reviewed product-ID price/cost plans, see [catalog operations](https://docs.omnicommerce.ai/sdk/catalog-operations.md).


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