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

# Batch update Locations

> Creates or updates a `Location` collection specified by a warehouse `id` path parameter and according to the request body.



## OpenAPI

````yaml POST /v1/inventory/warehouses/{id}/locations/batch
openapi: 3.0.3
info:
  title: ShipStream
  version: '1.0'
  license:
    name: Commercial (Copyright 2025 - All Rights Reserved)
    url: https://shipstream.io
  contact:
    name: ShipStream Support
    email: help@shipstream.io
  termsOfService: https://shipstream.io/legal/api-terms/
servers:
  - url: https://{base_url_domain}/api/global
    description: Direct API Url
    variables:
      base_url_domain:
        default: example.shipstream.app
        description: >-
          The fully qualified domain name for your ShipStream WMS instance. This
          is either a custom domain, or a subdomain of shipstream.app,

          and will be the same as the domain name for the page which you use to
          login to ShipStream WMS.
security:
  - ShipStream_bearerAuth: []
tags:
  - name: Warehouses
    x-displayName: Warehouses
  - name: Products
    x-displayName: Products
  - name: Locations
    x-displayName: Locations
  - name: Levels
    x-displayName: Levels
  - name: HoldReasons
    x-displayName: HoldReasons
  - name: Holds
    x-displayName: Holds
  - name: Deliveries
    description: Every thing about a Delivery Receiving
    x-displayName: Deliveries
  - name: Shipments
    x-displayName: Shipments
  - name: Orders
    x-displayName: Orders
  - name: Retailers
    x-displayName: Retailers
  - name: Users
    x-displayName: Users
  - name: User Roles
    x-displayName: User Roles
  - name: Merchants
    x-displayName: Merchants
  - name: Healthcheck
    x-displayName: Healthcheck
paths:
  /v1/inventory/warehouses/{id}/locations/batch:
    post:
      tags:
        - Locations
      summary: Batch update Locations
      description: >-
        Creates or updates a `Location` collection specified by a warehouse `id`
        path parameter and according to the request body.
      operationId: batchUpdateLocations
      parameters:
        - name: id
          in: path
          schema:
            type: integer
            format: int32
            minimum: 1
          required: true
          description: The `id` of the referenced `Warehouse`.
      requestBody:
        description: >-
          An object conforming to the Inventory Warehouse Location schemas batch
          to be created or updated.
        content:
          application/json:
            schema:
              type: object
              properties:
                onError:
                  type: string
                  enum:
                    - continue
                    - stop
                    - abort
                  default: continue
                  description: >-
                    The value determining how errors are to be handled.

                    - `continue` The current entity will be rolled back and any
                    remaining entities will continue to be processed.

                    - `stop` The current entity will be rolled back and the
                    request will stop processing any remaining entities.

                    - `abort` The entire request will be rolled back.
                operation:
                  type: string
                  enum:
                    - upsert
                    - insert
                    - update
                    - delete
                  description: >-
                    - `upsert`: Create if it doesn't exist, otherwise update

                    - `insert`: Create only, existing locations will not be
                    updated

                    - `update`: Update existing locations, no locations will be
                    created

                    - `delete`: Delete locations
                  default: upsert
                locations:
                  type: array
                  items:
                    $ref: >-
                      #/components/schemas/Inventory_API_v1_LocationCreateUpdateRef
      responses:
        '200':
          description: >-
            No fatal client or server errors occurred. Check the response to see
            which items were updated successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  committed:
                    type: integer
                    example: 1
                    description: >-
                      Number of locations that were successfully
                      inserted/updated in this batch.
                  failed:
                    type: integer
                    example: 1
                    description: >-
                      The number of locations that could not be updated due to
                      an error. Check the response `results` for more details.
                  results:
                    type: array
                    description: >-
                      An array of objects describing the resources that were
                      created.
                    minItems: 1
                    items:
                      type: object
                      properties:
                        resource:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - Location
                              readOnly: true
                            id:
                              type: integer
                              description: >-
                                The internal `id` property used as a path
                                parameter in a resource lookup.
                              format: int32
                              example: 42
                              nullable: true
                            label:
                              type: string
                              description: >-
                                A unique Label for the inventory location under
                                a specific warehouse.
                              example: RK07-R2-S1-L1
                              nullable: true
                        status:
                          type: string
                          description: >-
                            Indicates the updated status of each batch item if
                            `onError` option is `continue` or `stop`.
                          example: committed
                          enum:
                            - committed
                            - user-error
                            - unexpected-error
                        message:
                          type: string
                          description: >-
                            Error/warning messages if there are any
                            errors/warnings.
        '400':
          $ref: '#/components/responses/Inventory_API_v1_400-bad-request'
        '404':
          $ref: '#/components/responses/Inventory_API_v1_404-not-found'
        '422':
          $ref: '#/components/responses/Inventory_API_v1_422-unprocessable'
        '500':
          $ref: '#/components/responses/Inventory_API_v1_500-internal-server-error'
components:
  schemas:
    Inventory_API_v1_LocationCreateUpdateRef:
      title: LocationCreateUpdateRef
      type: object
      description: A reference to a `Location` create or update request body data.
      properties:
        label:
          type: string
          example: RK07-R2-S1-L1
          maxLength: 45
          description: >-
            A unique string to identify Inventory Location Label assigned to a
            specific Warehouse.
        rack:
          type: object
          properties:
            type:
              type: string
              description: >-
                The type of resource being created or updated. In this case it
                will be "Rack".
              enum:
                - Rack
            id:
              type: integer
              example: 3
              description: >-
                The `id` of the `Rack` to which this `Location` will be
                associated. If not specified the `Rack` will be assigned
                automatically.
        location_type:
          type: object
          properties:
            type:
              type: string
              description: >-
                The type of resource being created. In this case it will be
                "LocationType".
              enum:
                - LocationType
            id:
              type: integer
              example: 3
              description: >-
                The `id` of the Location Type to which this location will be
                associated. If not specified the location type will be assigned
                automatically.
        priority:
          type: integer
          example: 2
          description: >-
            The inventory reservation order relative to other locations
            containing the same product.
  responses:
    Inventory_API_v1_400-bad-request:
      description: >-
        The request was invalid. The client must change the request. See the
        response body for more details.
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    type:
                      type: string
                      description: The error type code.
                      enum:
                        - parser
                        - parameters
                        - openapi
                    message:
                      type: string
                      description: An English sentence describing the error type.
                    details:
                      type: array
                      description: >-
                        An array of objects describing which keys are
                        responsible for the error and detailed messages
                        describing why they are not valid.
                      items:
                        type: object
                        properties:
                          key:
                            type: string
                            description: The path to the key which relates to the error.
                          message:
                            type: string
                            description: >-
                              An English sentence describing the details of the
                              error.
                        additionalProperties: false
                  additionalProperties: false
                minItems: 1
            additionalProperties: false
          example:
            errors:
              - type: parameters
                message: The supplied parameters are invalid.
                details:
                  - key: hold_until_date
                    message: The date must be in the future.
    Inventory_API_v1_404-not-found:
      description: >-
        The requested resource was not found. It may have been deleted, it may
        have never existed, or you may not have permission to view it.
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    type:
                      type: string
                      description: The error type code.
                      enum:
                        - not_found
                    message:
                      type: string
                      description: An English sentence describing the error type.
                    details:
                      type: array
                      description: >-
                        An array of objects describing which keys are
                        responsible for the error and detailed messages
                        describing why they are not valid.
                      items:
                        type: object
                        properties:
                          key:
                            type: string
                            description: The path to the key which relates to the error.
                          message:
                            type: string
                            description: >-
                              An English sentence describing the details of the
                              error.
                        additionalProperties: false
                  additionalProperties: false
                minItems: 1
            additionalProperties: false
          example:
            errors:
              - type: not_found
                message: The server could not find the requested resource.
    Inventory_API_v1_422-unprocessable:
      description: >-
        There was an error processing the request. See the response body for
        more details.
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    type:
                      type: string
                      description: The error type code.
                      enum:
                        - application
                        - unable_to_process
                    message:
                      type: string
                      description: An English sentence describing the error type.
                    details:
                      type: array
                      description: >-
                        An array of objects describing which keys are
                        responsible for the error and detailed messages
                        describing why they are not valid.
                      items:
                        type: object
                        properties:
                          key:
                            type: string
                            description: The path to the key which relates to the error.
                          message:
                            type: string
                            description: >-
                              An English sentence describing the details of the
                              error.
                        additionalProperties: false
                  additionalProperties: false
                minItems: 1
            additionalProperties: false
          example:
            errors:
              - type: unable_to_process
                message: The supplied parameters are invalid.
                details:
                  - key: hold_until_date
                    message: The date must be in the future.
    Inventory_API_v1_500-internal-server-error:
      description: >-
        Internal Server Error - Something wrong happened at server side. Contact
        server administrator for more details.
  securitySchemes:
    ShipStream_bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Generate a JWT access token through a Custom Global Integration and
        provide it with each request in the `Authorization` header prefixed with
        "Bearer" and then a single space.

````