> ## 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.

# Get quarantine state of Lot

> Returns what holds the lot and what releasing it would release, so a release can be planned
before calling `POST /v1/inventory/holds/lot/{lot_id}/release`.

`reasons` lists every reason that holds the lot, the same list the Admin UI shows in the
Release Quarantine popup: the lot's own lot-level hold first, then each open quarantine that
covers the lot through that hold (the lot kept its own older hold when the quarantine was
placed, or the nightly expiry check replaced its quarantine hold). The lot moves into such a
quarantine when its own hold ends. Pass `hold_id` values to `reason_hold_ids` of the release
call to release only some of them. Empty when the lot has no lot-level hold.

`quarantined_with` is the origin lot of the quarantine the lot is held in as a related lot.

`related_lot_ids` are the other lots whose holds the release call with `release_cascaded=true`
releases: the related lots held by the quarantine the lot started, or, after the lot was
released on its own, the related lots its quarantines still hold. While the lot is in a newer
quarantine of its own, only that quarantine's related lots are listed.

`leaving_related_lot_ids` are the related lots of those quarantines that are held for another
reason as well: as `Expired` by the nightly expiry check, or by their own older hold. A release
with `release_cascaded=true` ends the quarantine, so these lots leave it and keep that hold.

`still_quarantined_lot_ids` are the related lots still quarantined with the lot after it was
released on its own: what `POST /v1/inventory/holds/lot/{lot_id}/release-related-lots`
releases or, for the lots in `leaving_related_lot_ids`, takes out of the quarantine. Empty
while the lot is in a quarantine of its own.

Lots of every merchant are returned, like the other holds endpoints.



## OpenAPI

````yaml GET /v1/inventory/holds/lot/{lot_id}
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: ProductProfiles
    x-displayName: ProductProfiles
  - name: HandlingClasses
    x-displayName: HandlingClasses
  - name: Locations
    x-displayName: Locations
  - name: LocationOccupancies
    x-displayName: LocationOccupancies
  - name: LocationTags
    x-displayName: LocationTags
  - name: SlotTypes
    x-displayName: SlotTypes
  - name: Levels
    x-displayName: Levels
  - name: HoldReasons
    x-displayName: HoldReasons
  - name: Holds
    x-displayName: Holds
  - name: Replenishment
    x-displayName: Replenishment
  - name: LocationProfiles
    x-displayName: LocationProfiles
  - name: SlottingRules
    x-displayName: SlottingRules
  - name: PickingBatches
    x-displayName: PickingBatches
  - 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/holds/lot/{lot_id}:
    get:
      tags:
        - Holds
      summary: Get quarantine state of Lot
      description: >-
        Returns what holds the lot and what releasing it would release, so a
        release can be planned

        before calling `POST /v1/inventory/holds/lot/{lot_id}/release`.


        `reasons` lists every reason that holds the lot, the same list the Admin
        UI shows in the

        Release Quarantine popup: the lot's own lot-level hold first, then each
        open quarantine that

        covers the lot through that hold (the lot kept its own older hold when
        the quarantine was

        placed, or the nightly expiry check replaced its quarantine hold). The
        lot moves into such a

        quarantine when its own hold ends. Pass `hold_id` values to
        `reason_hold_ids` of the release

        call to release only some of them. Empty when the lot has no lot-level
        hold.


        `quarantined_with` is the origin lot of the quarantine the lot is held
        in as a related lot.


        `related_lot_ids` are the other lots whose holds the release call with
        `release_cascaded=true`

        releases: the related lots held by the quarantine the lot started, or,
        after the lot was

        released on its own, the related lots its quarantines still hold. While
        the lot is in a newer

        quarantine of its own, only that quarantine's related lots are listed.


        `leaving_related_lot_ids` are the related lots of those quarantines that
        are held for another

        reason as well: as `Expired` by the nightly expiry check, or by their
        own older hold. A release

        with `release_cascaded=true` ends the quarantine, so these lots leave it
        and keep that hold.


        `still_quarantined_lot_ids` are the related lots still quarantined with
        the lot after it was

        released on its own: what `POST
        /v1/inventory/holds/lot/{lot_id}/release-related-lots`

        releases or, for the lots in `leaving_related_lot_ids`, takes out of the
        quarantine. Empty

        while the lot is in a quarantine of its own.


        Lots of every merchant are returned, like the other holds endpoints.
      operationId: getLotHolds
      parameters:
        - name: lot_id
          in: path
          required: true
          schema:
            type: integer
            format: int64
          description: Lot to look up.
      responses:
        '200':
          description: The quarantine state of the lot.
          content:
            application/json:
              schema:
                type: object
                properties:
                  lot_id:
                    type: integer
                    format: int64
                    description: Lot that was looked up.
                  reasons:
                    type: array
                    description: >-
                      Reasons that hold the lot; empty when it has no lot-level
                      hold.
                    items:
                      type: object
                      properties:
                        hold_id:
                          type: integer
                          format: int64
                          description: >
                            The lot's lot-level hold (`is_own_hold=true`), or
                            the quarantine id (the

                            origin lot's lot-level hold when the quarantine was
                            placed) of a quarantine

                            that covers the lot. Value for `reason_hold_ids` of
                            the release call.
                        is_own_hold:
                          type: boolean
                          description: >-
                            The lot's own lot-level hold rather than a
                            quarantine that covers it.
                        is_group:
                          type: boolean
                          description: >
                            The quarantine the lot started.
                            `release_cascaded=true` with

                            `reason_hold_ids` requires this id among them.
                        reason:
                          type: object
                          nullable: true
                          description: >-
                            Hold reason of the hold or quarantine, as in
                            `Hold.reason`.
                          properties:
                            code:
                              type: string
                              description: Reason code (system or user-defined).
                              example: recalled
                            label:
                              type: string
                              description: Human-readable reason label.
                              example: Recalled
                            parent_code:
                              type: string
                              nullable: true
                              description: >-
                                Parent (system) reason code; NULL when this
                                reason is itself a system parent.
                              example: hold
                          required:
                            - code
                            - label
                        held_by:
                          nullable: true
                          description: Requester who placed the hold or the quarantine.
                          allOf:
                            - $ref: '#/components/schemas/Inventory_API_v1_Requester'
                        origin_lot_id:
                          type: integer
                          format: int64
                          nullable: true
                          description: >
                            Origin lot of the quarantine the reason belongs to;
                            NULL for an own hold that

                            belongs to no quarantine.
                        origin_lot_number:
                          type: string
                          nullable: true
                          description: Lot number of `origin_lot_id`.
                      required:
                        - hold_id
                        - is_own_hold
                        - is_group
                        - reason
                        - held_by
                        - origin_lot_id
                        - origin_lot_number
                  quarantined_with:
                    type: object
                    nullable: true
                    description: >
                      Origin lot of the quarantine the lot is held in as a
                      related lot (also while the

                      expiry check holds it as `Expired`); NULL when it is held
                      in none.
                    properties:
                      lot_id:
                        type: integer
                        format: int64
                        description: Origin lot.
                      lot_number:
                        type: string
                        description: Lot number of the origin lot.
                      is_held:
                        type: boolean
                        description: >
                          The origin lot is still in its quarantine; FALSE once
                          it was released on its

                          own while its related lots stay quarantined.
                    required:
                      - lot_id
                      - lot_number
                      - is_held
                  related_lot_ids:
                    type: array
                    description: >-
                      Other lots whose holds the release call with
                      `release_cascaded=true` releases.
                    items:
                      type: integer
                      format: int64
                  related_lot_count:
                    type: integer
                    description: Number of `related_lot_ids`.
                  leaving_related_lot_ids:
                    type: array
                    description: >
                      Related lots that a release with `release_cascaded=true`
                      takes out of a quarantine

                      while they keep another hold (their `Expired` hold or
                      their own older hold).
                    items:
                      type: integer
                      format: int64
                  still_quarantined_lot_ids:
                    type: array
                    description: >
                      Related lots still quarantined with the lot after it was
                      released on its own, which

                      `POST
                      /v1/inventory/holds/lot/{lot_id}/release-related-lots`
                      releases or takes out

                      of the quarantine.
                    items:
                      type: integer
                      format: int64
                required:
                  - lot_id
                  - reasons
                  - quarantined_with
                  - related_lot_ids
                  - related_lot_count
                  - leaving_related_lot_ids
                  - still_quarantined_lot_ids
        '404':
          $ref: '#/components/responses/Inventory_API_v1_404-not-found'
        '500':
          $ref: '#/components/responses/Inventory_API_v1_500-internal-server-error'
components:
  schemas:
    Inventory_API_v1_Requester:
      title: Requester
      type: object
      description: >-
        A `Requester` represents the entity (user, API token, integration,
        script, background job, etc.)

        that performed an action in the system. The `entity_type` indicates the
        kind of entity and

        `entity_id` is the ID of that entity in its respective table. A
        `BackgroundJob` (a scheduled or

        queued system job) has no table of its own: its `entity_id` is a fixed
        job number and `name`

        names the job.
      properties:
        type:
          type: string
          enum:
            - Requester
          description: The resource type (always "Requester").
        id:
          type: integer
          format: int32
          example: 3
          readOnly: true
          description: The internal requester ID (`requester_id`).
        entity_type:
          type: string
          enum:
            - OrganizationUser
            - ClientUser
            - MerchantAPI
            - GlobalAPI
            - MerchantIntegration
            - GlobalIntegration
            - Script
            - Other
            - BackgroundJob
          description: The type of entity that performed the action.
        entity_id:
          type: integer
          format: int32
          example: 5
          description: >-
            The ID of the entity in its respective table (e.g., user ID,
            integration ID).
        name:
          type: string
          maxLength: 255
          example: Bernard Greensmith
          description: Human-readable display name for the requester.
        status:
          type: string
          enum:
            - active
            - inactive
            - suspended
            - deleted
            - unknown
          description: The current status of the requester entity.
      required:
        - type
        - id
        - entity_type
        - entity_id
      additionalProperties: false
  responses:
    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_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.

````

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