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

# Scan barcode for receiving

> Scans a barcode and returns matching items ready to be received.



## OpenAPI

````yaml api-reference/v1/openapi.yaml post /v1/receiving/scan
openapi: 3.1.0
info:
  title: Goods API
  version: 1.0.0
  description: >-
    API for Goods grocery operations - scanner app, admin dashboard, and
    customer features
  contact:
    name: Goods Team
    url: https://goods.app
servers:
  - url: http://localhost:3000
    description: Local development
  - url: https://dev.api.switchyard.run
    description: Development
  - url: https://api.switchyard.run
    description: Production
security: []
tags:
  - name: v1
    description: API v1 - unified domain-based endpoints
  - name: Scanner
    description: Scanner app endpoints for drivers and pickers
  - name: Sweeps
    description: Sweep management - retail store pickup operations
  - name: RFC Picks
    description: Ready-for-checkout picking operations
  - name: Inventory
    description: Inventory management and barcode lookup
  - name: Admin
    description: Admin dashboard endpoints
  - name: Orders
    description: Order management
  - name: Products
    description: Product catalog management
  - name: Notifications
    description: Push, email, SMS, and Slack notification management
paths:
  /v1/receiving/scan:
    post:
      tags:
        - Sweeps
      summary: Scan barcode for receiving
      description: Scans a barcode and returns matching items ready to be received.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                barcode:
                  type: string
                  minLength: 1
                  description: Barcode to scan (required if product_id not provided)
                  example: 12345678901
                product_id:
                  type: string
                  format: uuid
                  description: >-
                    Scraped product ID to look up directly (required if barcode
                    not provided)
                sweep_id:
                  type: string
                  format: uuid
                  description: Optional sweep ID to filter by
      responses:
        '200':
          description: Scan result with assignment info
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  product_name:
                    type: string
                  product_image:
                    type: string
                    nullable: true
                  temperature_zone:
                    type: string
                  assignments:
                    type: array
                    items:
                      type: object
                      properties:
                        sweep_item_id:
                          type: string
                        quantity:
                          type: number
                          nullable: true
                        order_id:
                          type: string
                          nullable: true
                        order_display_id:
                          type: number
                          nullable: true
                        assignment:
                          type: object
                          properties:
                            type:
                              type: string
                            cart_id:
                              type: string
                              nullable: true
                            cart_type:
                              type: string
                            display_id:
                              type: string
                            label:
                              type: string
                            active_tote:
                              type: object
                              nullable: true
                              properties:
                                id:
                                  type: string
                                display_id:
                                  type: string
                              required:
                                - id
                            requires_tote:
                              type: boolean
                            bag_id:
                              type: string
                              nullable: true
                            bag_code:
                              type: string
                              nullable: true
                            needs_new_bag:
                              type: boolean
                            storage_zone:
                              type: string
                            cart_number:
                              type: string
                              nullable: true
                          required:
                            - type
                      required:
                        - sweep_item_id
                        - quantity
                        - order_id
                        - order_display_id
                        - assignment
                  sweep_item_id:
                    type: string
                  quantity:
                    type: number
                  picked_quantity:
                    type: number
                    nullable: true
                  order_id:
                    type: string
                    nullable: true
                  order_display_id:
                    type: number
                    nullable: true
                  assignment:
                    type: object
                    properties:
                      type:
                        type: string
                      cart_id:
                        type: string
                        nullable: true
                      cart_type:
                        type: string
                      display_id:
                        type: string
                      label:
                        type: string
                      active_tote:
                        type: object
                        nullable: true
                        properties:
                          id:
                            type: string
                          display_id:
                            type: string
                        required:
                          - id
                      requires_tote:
                        type: boolean
                      bag_id:
                        type: string
                        nullable: true
                      bag_code:
                        type: string
                        nullable: true
                      needs_new_bag:
                        type: boolean
                      storage_zone:
                        type: string
                      cart_number:
                        type: string
                        nullable: true
                    required:
                      - type
                required:
                  - success
                  - product_name
                  - product_image
                  - temperature_zone
                  - assignments
                  - sweep_item_id
                  - quantity
                  - picked_quantity
                  - order_id
                  - order_display_id
                  - assignment
        '404':
          description: Product or pending item not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error

````