openapi: 3.1.0
info:
  title: Curbside Fetcher & Local Errand Runner
  version: 0.1.0
servers:
  - url: https://api.swiperbuy.com
paths:
  /v1/logistics/dispatch:
    post:
      operationId: dispatchErrand
      summary: Dispatch a Nash / Uber Direct / DoorDash Drive job (stub)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DispatchRequest"
      responses:
        "200":
          description: Dispatch accepted
components:
  schemas:
    DispatchRequest:
      type: object
      required: [pickup_lat, pickup_lng, dropoff_lat, dropoff_lng]
      properties:
        pickup_lat: { type: number }
        pickup_lng: { type: number }
        dropoff_lat: { type: number }
        dropoff_lng: { type: number }
        provider:
          type: string
          enum: [nash, uber_direct, doordash_drive]
          default: nash
        buyer_id: { type: string }
