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

# Creates or updates inventory quantities in batch

> Updates inventory quantities for multiple products in a single request.



## OpenAPI

````yaml /api-reference/platform_v1.json post /api/platform/v1/products/inventories/batches
openapi: 3.0.3
info:
  title: PLATFORM API V1
  version: 1.0.0
  contact:
    name: BSPK API Support
    email: bspk-support@bspk.com
  description: >-

    # Introduction


    The BSPK RESTful JSON API gives you access to your company's BSPK data.

    For all BSPK API related questions please email: *bspk-support@bspk.com*



    ### Authentication


    BSPK uses Token-Based API Authentication. API keys can be managed from the
    API Keys section in your admin interface. All unauthenticated requests will
    return an HTTP 401 response.


    **Important:**  Developers with BSPK API keys will be granted full access to
    the data in each endpoint. Access to this data is binary: everything or
    nothing.


    **Authorization header**

    Your  `Authorization`  header should be in the following format:

    ```

    Authorization: Bearer [API_KEY]

    ```


    ### Throttling


    API requests are limited to the amount specified in the returned
    `X-RateLimit-Limit` header (per 10 seconds). Exceeding that limit will cause
    BSPK to return an `HTTP 429` response. Check the `X-RateLimit-Limit` and
    `X-RateLimit-Remaining` headers to see how many more requests you are
    allowed until throttling kicks in.



    ### Error Codes


    - 400 - Bad Request.

    - 401 - Unauthorized – Invalid BSPK API key.

    - 404 - Not Found – Resource not found.

    - 422 - Unprocessable entity.

    - 429 - Throttle Limit reached.

    - 500 - BSPK Internal Server Error


    ### Validation


    Methods that take input will validate all parameters. Any parameter that
    fails validation will trigger an error response with status HTTP 422. The
    response body will be a JSON object like the example below which includes a
    list of fields that failed validation.


    `{'errors':[{'title': 'No clients found with IDs: [NON_EXISTING_ID,
    OTHER_NON_EXISTING_ID]','code':'not_found'}]}`



    ### Additional Information


    - Fields without a value will return null

    - Timestamps are rendered in ISO-8601 format (e.g. 2018-07-21T17:32:28Z)

    - BSPK reserves the right to add more properties to objects, but will never
    change or remove them. Any breaking changes will result in a major API
    version update.
         
servers:
  - url: https://api.bspk.com
    description: Production
security:
  - BearerAuth: []
paths:
  /api/platform/v1/products/inventories/batches:
    post:
      tags:
        - Products
      summary: Creates or updates inventory quantities in batch
      description: Updates inventory quantities for multiple products in a single request.
      operationId: productInventoryBatchUpdate
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                inventories:
                  type: array
                  items:
                    type: object
                    properties:
                      product_ref:
                        type: string
                        description: Internal product reference code
                        example: prd-123
                      sku:
                        type: string
                        description: SKU code
                        example: sku-123
                      quantity:
                        type: integer
                        description: Quantity to set
                        example: 10
                      store_ref:
                        type: string
                        description: Internal store reference code
                        example: str1
                      at:
                        type: string
                        description: ISO 8601 datetime when the inventory is effective
                        example: '2021-01-01T00:00:00Z'
                    required:
                      - product_ref
                      - sku
                      - quantity
                      - store_ref
                      - at
              required:
                - inventories
      responses:
        '200':
          description: Partial success with warnings
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status of the batch update.
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        index:
                          type: integer
                          description: Index of the inventory record in the input array
                        status:
                          type: string
                          description: One of 'ok', 'error', or 'warning'
                        message:
                          type: string
                          description: Explanation message (for warnings or errors)
                      required:
                        - index
                        - status
                required:
                  - status
                  - results
        '422':
          description: Empty inventory data
          content:
            application/json:
              schema: {}
      security:
        - BearerAuth: []
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````