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

# /preview/retail-media/catalog/merchants/{merchantId}/store-inventory/upsert

> Used to publish a batch of store inventories to upsert. The batch is processed asynchronously.



## OpenAPI

````yaml https://api.criteo.com/preview/retailmedia/open-api-specifications.json post /preview/retail-media/catalog/merchants/{merchantId}/store-inventory/upsert
openapi: 3.0.1
info:
  title: Criteo API
  description: Criteo API - RetailMedia
  version: Preview
servers:
  - url: https://api.criteo.com
security:
  - oauth: []
tags:
  - name: Accounts
  - name: Analytics
  - name: Audience
  - name: Balance
  - name: Campaign
  - name: Catalog
  - name: Gateway
  - name: OnSiteRecommendation
  - name: ThirdPartyAccounts
paths:
  /preview/retail-media/catalog/merchants/{merchantId}/store-inventory/upsert:
    post:
      tags:
        - Catalog
      summary: >-
        /preview/retail-media/catalog/merchants/{merchantId}/store-inventory/upsert
      description: >-
        Used to publish a batch of store inventories to upsert. The batch is
        processed asynchronously.
      operationId: UpsertStoreInventoryPerMerchantId
      parameters:
        - name: merchantId
          in: path
          description: Identifies the merchant, can also be called partnerId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchStoreInventoryRequest'
        required: true
        x-bodyName: body
      responses:
        '204':
          description: Batch accepted.
          content:
            application/json: {}
      security:
        - oauth:
            - RetailMedia_Catalog_Manage
components:
  schemas:
    BatchStoreInventoryRequest:
      required:
        - data
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/InsertEntry'
      description: Batch to be stored in Store inventories
    InsertEntry:
      required:
        - attributes
        - type
      type: object
      properties:
        attributes:
          $ref: '#/components/schemas/StoreInventoryUpsert'
        type:
          enum:
            - Upsert
          type: string
      description: Defines a pack of inventories
    StoreInventoryUpsert:
      required:
        - availability
        - batchId
        - price
        - productId
        - storeId
      type: object
      properties:
        availability:
          enum:
            - backorder
            - in_stock
            - out_of_stock
            - preorder
          type: string
          description: 'Might be: In stock, Out of stock, Preorder, Backorder'
        batchId:
          type: string
          description: Identifies this array entry
        price:
          type: string
          description: Product's price at this store
        productId:
          type: string
          description: ' Identifies a product'
        salePrice:
          type: string
          description: The sale price of the product.
        storeId:
          type: string
          description: Identifies the store, for the customer
      description: >-
        Defines a store inventory to be upserted. Inspired from google spec.See
        https://developers.google.com/shopping-content/reference/rest/v2.1/localinventory/custombatch#LocalinventoryCustomBatchRequestEntry
  securitySchemes:
    oauth:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://api.criteo.com/oauth2/token
          scopes: {}
        authorizationCode:
          authorizationUrl: https://api.criteo.com/oauth2
          tokenUrl: https://api.criteo.com/oauth2/token
          scopes: {}

````