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

# Batch Update Product Cost

> Set catalog cost price and currency for one or more products. Cost is Omni-only and never syncs to marketplaces.

Each update targets `productId` or `sku` (Omni `products.sku`). Provide `costPrice` with `costPriceCurrency` when the source amount is not in the product selling currency. If `costPriceFxRate` is omitted and the currencies differ, Omni quotes FX via the canonical FX service and stores the rate on the product.

### Authorization

Requires `catalog:write`. `organizationId` comes from the credential; the body cannot select an organization.

### Limits

`updates` is required, 1–200 items. Duplicate product IDs fail after the first occurrence. `costPrice: null` clears cost and FX.



## OpenAPI

````yaml /openapi.json post /api/v1/products/cost
openapi: 3.1.0
info:
  title: OmniCommerce API
  version: 1.0.0
  license:
    name: Proprietary
    url: https://omnicommerce.sg/terms
  description: >-
    OmniCommerce API surface for agents and developer integrations. Includes
    public endpoints (merchant discovery, product search, compare, catalog, ACO
    retrieval) and authenticated endpoints (product management via API key
    Bearer tokens).
servers:
  - url: https://omnicommerce.sg
    description: Production
  - url: http://localhost:3000
    description: Local development
security: []
tags:
  - name: agentic-checkout
    description: Merchant-fulfilled agentic checkout
    x-group: Agentic Checkout
  - name: aops
    description: Agent operating procedures
    x-group: AOPs
  - name: commerce
    description: Root commerce discovery
    x-group: Commerce
  - name: developer-platform
    description: Authenticated developer platform APIs
    x-group: Developer Platform
  - name: looks
    description: AI-styled product looks
    x-group: Looks
  - name: oauth
    description: OAuth token endpoints
    x-group: OAuth
  - name: orders
    description: Workspace and agentic orders
    x-group: Orders
  - name: organizations
    description: Organization management
    x-group: Organizations
  - name: price-books
    description: Marketplace list-price markup rules
    x-group: Price Books
  - name: products
    description: Product CRUD, bulk import, and publish
    x-group: Products
  - name: promotions
    description: Central promotions and marketplace sync
    x-group: Promotions
  - name: public-agent
    description: Public agent discovery and catalog APIs
    x-group: Public Agent
  - name: returns
    description: returns
    x-group: Returns
  - name: settlements
    description: settlements
    x-group: Settlements
  - name: ucp
    description: Universal Commerce Protocol
    x-group: UCP
paths:
  /api/v1/products/cost:
    post:
      tags:
        - products
      summary: Batch Update Product Cost
      description: >-
        Set catalog cost price and currency for one or more products. Cost is
        Omni-only and never syncs to marketplaces.


        Each update targets `productId` or `sku` (Omni `products.sku`). Provide
        `costPrice` with `costPriceCurrency` when the source amount is not in
        the product selling currency. If `costPriceFxRate` is omitted and the
        currencies differ, Omni quotes FX via the canonical FX service and
        stores the rate on the product.


        ### Authorization


        Requires `catalog:write`. `organizationId` comes from the credential;
        the body cannot select an organization.


        ### Limits


        `updates` is required, 1–200 items. Duplicate product IDs fail after the
        first occurrence. `costPrice: null` clears cost and FX.
      operationId: post_v1_products_cost
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - updates
              properties:
                updates:
                  type: array
                  minItems: 1
                  maxItems: 200
                  items:
                    type: object
                    additionalProperties: false
                    required:
                      - costPrice
                    properties:
                      productId:
                        type: string
                        format: uuid
                      sku:
                        type: string
                        minLength: 1
                        maxLength: 200
                      costPrice:
                        type:
                          - number
                          - 'null'
                        minimum: 0
                        description: Source cost amount. Null clears catalog cost and FX.
                      costPriceCurrency:
                        type: string
                        pattern: ^[A-Za-z]{3}$
                        description: >-
                          ISO currency of costPrice, for example USD. Defaults
                          to the product selling currency.
                      costPriceFxRate:
                        type: number
                        exclusiveMinimum: 0
                        description: >-
                          Optional units of selling currency per 1
                          costPriceCurrency. Quoted automatically when omitted
                          and currencies differ.
                      costPriceFxTo:
                        type: string
                        pattern: ^[A-Za-z]{3}$
                        description: Must match the product selling currency when provided.
                      costPriceFxAsOf:
                        type: string
                        description: Optional YYYY-MM or YYYY-MM-DD quote date.
            example:
              updates:
                - sku: TLVBGLX83220
                  costPrice: 578
                  costPriceCurrency: USD
      responses:
        '200':
          description: >-
            Batch processed. Top-level success is true only when every update
            succeeded.
        '400':
          description: Invalid payload.
        '401':
          description: Unauthorized
        '403':
          description: Credential lacks catalog:write or organization is inactive.
        '500':
          description: Internal Server Error
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        Bearer API key for server-to-server access. Session auth is also
        supported in first-party UI flows.

````