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

# Batch - Get

> Retrieve batch details by ID, including orders and fulfillment progress.



## OpenAPI

````yaml get /batch/get
openapi: 3.0.3
info:
  title: SKULabs API
  description: >-
    Most API keys have "platformGeneric" and "platformApi" scopes included.
    Contact us to convert more routes from "platformUser" (only available to
    users) to "platformGeneric" (available to users and api keys) upon request.
  version: 4.5.0
servers:
  - url: https://api.skulabs.com
  - url: https://app.skulabs.com/s
security: []
tags:
  - name: batch
  - name: customer
    description: Manage customers, tags, and notes
  - name: cycle_count
  - name: distributor
  - name: inventory
    description: Query and modify inventory levels across locations
  - name: inventory_table
  - name: item
    description: Manage items, barcodes, serial numbers, and tags
  - name: kit
    description: Manage kits and their component items
  - name: listing
  - name: location
  - name: oauth
  - name: order
    description: Manage orders, shipments, tags, and statuses
  - name: purchase_order
    description: Manage purchase orders and receiving
  - name: run
  - name: shipments
  - name: shipping
  - name: store
  - name: tag
    description: Create, update, and remove tags
  - name: transfer_order
  - name: warehouse
    description: Manage warehouses and view statistics
  - name: webhook
    description: Manage webhook handlers
paths:
  /batch/get:
    get:
      tags:
        - batch
      summary: Batch - Get
      description: Retrieve batch details by ID, including orders and fulfillment progress.
      operationId: get_batch_get
      parameters:
        - name: batch_id
          in: query
          required: false
          schema:
            type: string
            description: Batch ID to retrieve
            example: 507f1f77bcf86cd799439011
        - name: batch_number
          in: query
          required: false
          schema:
            type: number
            description: Batch number to retrieve
      responses:
        '200':
          description: Full batch detail with orders, inventory, and scan data
          content:
            application/json:
              schema:
                type: object
                properties:
                  batch:
                    $ref: '#/components/schemas/BatchDetail'
                required:
                  - batch
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                        description: Detailed error message
                      code:
                        type: string
                        description: Machine-readable error code
                      overview:
                        type: string
                        description: Short human-friendly description
                      statusCode:
                        type: number
                        description: HTTP status code
                      origin:
                        type: string
                        description: Error source
                      skulabsTraceId:
                        type: string
                        description: Trace ID for support
                      type:
                        type: string
                        enum:
                          - error
                          - notice
                          - success
                        description: Error severity for UI handling
                      user_error:
                        type: boolean
                        description: Whether the error was caused by user input
                      display:
                        type: string
                        enum:
                          - notification
                          - panel
                        description: Suggested UI display mode for the error
                    required:
                      - message
                      - statusCode
                required:
                  - error
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                        description: Detailed error message
                      code:
                        type: string
                        description: Machine-readable error code
                      overview:
                        type: string
                        description: Short human-friendly description
                      statusCode:
                        type: number
                        description: HTTP status code
                      origin:
                        type: string
                        description: Error source
                      skulabsTraceId:
                        type: string
                        description: Trace ID for support
                      type:
                        type: string
                        enum:
                          - error
                          - notice
                          - success
                        description: Error severity for UI handling
                      user_error:
                        type: boolean
                        description: Whether the error was caused by user input
                      display:
                        type: string
                        enum:
                          - notification
                          - panel
                        description: Suggested UI display mode for the error
                    required:
                      - message
                      - statusCode
                required:
                  - error
        '403':
          description: Forbidden. Insufficient permissions.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                        description: Detailed error message
                      code:
                        type: string
                        description: Machine-readable error code
                      overview:
                        type: string
                        description: Short human-friendly description
                      statusCode:
                        type: number
                        description: HTTP status code
                      origin:
                        type: string
                        description: Error source
                      skulabsTraceId:
                        type: string
                        description: Trace ID for support
                      type:
                        type: string
                        enum:
                          - error
                          - notice
                          - success
                        description: Error severity for UI handling
                      user_error:
                        type: boolean
                        description: Whether the error was caused by user input
                      display:
                        type: string
                        enum:
                          - notification
                          - panel
                        description: Suggested UI display mode for the error
                    required:
                      - message
                      - statusCode
                required:
                  - error
        '429':
          description: Too many requests. Rate limit exceeded.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                        description: Detailed error message
                      code:
                        type: string
                        description: Machine-readable error code
                      overview:
                        type: string
                        description: Short human-friendly description
                      statusCode:
                        type: number
                        description: HTTP status code
                      origin:
                        type: string
                        description: Error source
                      skulabsTraceId:
                        type: string
                        description: Trace ID for support
                      type:
                        type: string
                        enum:
                          - error
                          - notice
                          - success
                        description: Error severity for UI handling
                      user_error:
                        type: boolean
                        description: Whether the error was caused by user input
                      display:
                        type: string
                        enum:
                          - notification
                          - panel
                        description: Suggested UI display mode for the error
                    required:
                      - message
                      - statusCode
                required:
                  - error
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                        description: Detailed error message
                      code:
                        type: string
                        description: Machine-readable error code
                      overview:
                        type: string
                        description: Short human-friendly description
                      statusCode:
                        type: number
                        description: HTTP status code
                      origin:
                        type: string
                        description: Error source
                      skulabsTraceId:
                        type: string
                        description: Trace ID for support
                      type:
                        type: string
                        enum:
                          - error
                          - notice
                          - success
                        description: Error severity for UI handling
                      user_error:
                        type: boolean
                        description: Whether the error was caused by user input
                      display:
                        type: string
                        enum:
                          - notification
                          - panel
                        description: Suggested UI display mode for the error
                    required:
                      - message
                      - statusCode
                required:
                  - error
      security:
        - SKULabsToken: []
      servers:
        - url: https://api.skulabs.com
components:
  schemas:
    BatchDetail:
      type: object
      properties:
        _id:
          type: string
          description: Unique batch identifier
          example: 507f1f77bcf86cd799439011
        number:
          type: number
          description: Batch number
        state:
          type: string
          enum:
            - pick
            - pack
            - ship
          description: Batch state
        status:
          type: string
          enum:
            - opened
            - shipped
          description: Batch status
        orders:
          type: array
          items:
            $ref: '#/components/schemas/BatchDetailOrder'
          description: Detailed order data for each order in the batch
        log:
          type: array
          items:
            $ref: '#/components/schemas/BatchLogEntry'
          description: Batch action log
        ship_end:
          type: string
          description: Timestamp when shipping ended
          example: '2025-01-15T12:00:00.000Z'
        batch_settings:
          $ref: '#/components/schemas/BatchSettings'
        inventory:
          type: array
          items:
            type: object
            properties: {}
          description: Inventory data across all batch items
        inventory_map:
          type: object
          properties: {}
          description: Map of item_id to warehouse on-hand quantities
      required:
        - _id
        - number
        - orders
    BatchDetailOrder:
      type: object
      properties:
        store_id:
          type: string
          description: Store ID of the order
          example: 507f1f77bcf86cd799439011
        order_number:
          type: string
          description: Order number
        bin:
          type: string
          description: Bin assignment
        status:
          type: string
          description: Order status
        items:
          type: array
          items:
            type: object
            properties: {}
          description: Order line items
        scans:
          type: array
          items:
            type: object
            properties: {}
          description: Scan records for the order
        misscans:
          type: array
          items:
            type: object
            properties: {}
          description: Misscan records
        shipments:
          type: array
          items:
            type: object
            properties: {}
          description: Shipment records
        purchase_orders:
          type: array
          items:
            type: object
            properties: {}
          description: Related purchase orders
        log:
          type: array
          items:
            type: object
            properties: {}
          description: Order log entries
        inventory:
          type: array
          items:
            type: object
            properties: {}
          description: Inventory data for this order
        combined_order_numbers:
          type: array
          items:
            type: string
          description: Combined order numbers
        stash:
          type: object
          properties: {}
          description: Original order data from the channel
        barcodes:
          type: array
          items:
            type: object
            properties: {}
          description: Barcode mappings for the order items
        tags:
          type: array
          items:
            type: string
          description: >-
            Array of tag IDs assigned to the order (ObjectId strings referencing
            the tag collection)
          example:
            - 507f1f77bcf86cd799439011
            - 507f1f77bcf86cd799439012
        notes:
          type: string
          description: Order notes
        batch_number:
          type: number
          description: Batch number this order belongs to
      required:
        - store_id
        - order_number
    BatchLogEntry:
      type: object
      properties:
        user_id:
          type: string
          description: User who performed the action
          example: 507f1f77bcf86cd799439011
        action:
          type: string
          description: Action performed (e.g. opened, shipped)
        time:
          type: string
          description: Timestamp of the action
          example: '2025-01-15T12:00:00.000Z'
      required:
        - user_id
        - action
        - time
    BatchSettings:
      type: object
      properties:
        name:
          type: string
          description: Batch type name
        type:
          type: string
          description: Batch type identifier
        warehouse_filters:
          type: array
          items:
            type: string
          description: Warehouse IDs to filter by
        include_out_of_stock:
          type: boolean
          description: Whether to include out of stock orders
        include_partially_fulfillable:
          type: boolean
          description: Whether to include partially fulfillable orders
        ship_mode:
          type: string
          description: Shipping mode (e.g. bulk)
        n_sku_batch:
          type: boolean
          description: Whether to group by number of unique SKUs
        same:
          type: boolean
          description: Whether to group orders with identical items
      description: Settings used to create this batch
  securitySchemes:
    SKULabsToken:
      type: http
      scheme: bearer
      bearerFormat: JWT

````