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

# Perform sweep action

> Perform an action on a sweep (claim, start, checkout, complete, deliver, decant)



## OpenAPI

````yaml api-reference/v1/openapi.yaml post /v1/sweeps/{id}/action
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/sweeps/{id}/action:
    post:
      tags:
        - Sweeps
      summary: Perform sweep action
      description: >-
        Perform an action on a sweep (claim, start, checkout, complete, deliver,
        decant)
      parameters:
        - schema:
            type: string
            description: Sweep UUID or taxonomy ID
          required: true
          name: id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                action:
                  type: string
                  enum:
                    - claim
                    - start
                    - checkout
                    - complete
                    - deliver
                    - decant
              required:
                - action
      responses:
        '200':
          description: Action performed successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  sweep:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      taxonomy_id:
                        type: string
                        nullable: true
                      retailer_location_id:
                        type: string
                      sweep_date:
                        type: string
                      sweep_number:
                        type: string
                        nullable: true
                      sweep_type:
                        type: string
                      scheduled_start_time:
                        type: string
                      scheduled_end_time:
                        type: string
                        nullable: true
                      actual_start_time:
                        type: string
                        nullable: true
                      actual_end_time:
                        type: string
                        nullable: true
                      status:
                        type: string
                        enum:
                          - scheduled
                          - ready
                          - in_progress
                          - checkout
                          - completed
                          - delivered
                          - decanted
                          - cancelled
                      driver_id:
                        type: string
                        nullable: true
                        format: uuid
                      total_items:
                        type: number
                      total_load:
                        type: number
                        nullable: true
                      is_locked:
                        type: boolean
                      delivery_fee:
                        type: number
                        nullable: true
                      created_at:
                        type: string
                      updated_at:
                        type: string
                    required:
                      - id
                      - retailer_location_id
                      - sweep_date
                      - sweep_number
                      - scheduled_start_time
                      - scheduled_end_time
                      - actual_start_time
                      - actual_end_time
                      - status
                      - driver_id
                      - total_items
                      - total_load
                      - created_at
                      - updated_at
                required:
                  - success
                  - sweep
        '400':
          description: Invalid action or state transition
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                    example: Not found
                required:
                  - error
        '403':
          description: Not authorized to perform action
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                    example: Not found
                required:
                  - error
        '404':
          description: Sweep not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                    example: Not found
                required:
                  - error
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                    example: Not found
                required:
                  - error

````