openapi: 3.0.3
info:
  title: TM Next-Gen - Walk Execution (APIGEE)
  description: |
    OpenAPI APIGEE mirror of `next-gen-swagger/walk-execution/next-gen-walk-execution-api.yaml` — paths, parameters, request bodies,
    and responses resolve from that file via `$ref`.

    **Error codes and envelopes** (`status` / `error` / `errorCode` / `response`) are defined in the main Walk spec
    (`next-gen-walk-execution-api.yaml`).

    **APIGEE-only:** send `api_key` (API key) in addition to `X-reflexis-csrf-token-X` (session token).
    Clients often send `Origin` and `Referer` matching the gateway host for routing validation.

    Companion APIGEE spec: `task-execution/next-gen-task-execution-apigee-api.yaml`.
  version: 1.0.0
  contact:
    name: API Support
    email: noreply@zebra.com

servers:
  - url: https://dev-api.zebra.com
    description: Dev APIGEE
  - url: https://stage-api.zebra.com
    description: Stage APIGEE
  - url: https://test-api.zebra.com
    description: Test APIGEE
  - url: https://api.zebra.com
    description: Prod APIGEE

tags:
  - name: WalkCategories
    description: Walk category management — retrieve categories by optional ID filter
  - name: WalkList
    description: Walk list retrieval — adhoc, scheduled, incremental, and count-only modes
  - name: WalkDetail
    description: Single walk detail by form_unique_id (walk-id path parameter)
  - name: WalkCreate
    description: Start (create) a new walk instance — multipart/form-data POST
  - name: WalkSchedule
    description: Schedule a walk for distribution to stores — multipart/form-data POST
  - name: WalkSubmit
    description: Submit questionnaire answers — multipart/form-data POST
  - name: WalkQuestions
    description: Download questionnaire definition with optional pre-populated answers
  - name: WalkTypes
    description: Retrieve walk types scoped by permit type, schedule type, and offline flag
  - name: WalkStores
    description: Distribution store list for walk scheduling
  - name: WalkUsers
    description: User list for walk assignment
  - name: WalkPermissions
    description: Permission evaluation for a walk entity

security:
  - ApiKeyHeader: []
    AuthTokenHeader: []

components:
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: api_key
      description: APIGEE API key header validated by VerifyAPIKey policy.
    AuthTokenHeader:
      $ref: ./next-gen-walk-execution-api.yaml#/components/securitySchemes/AuthTokenHeader
  parameters:
    WalkId:
      $ref: ./next-gen-walk-execution-api.yaml#/components/parameters/WalkId
  schemas:
    JsonObject:
      $ref: ./next-gen-walk-execution-api.yaml#/components/schemas/JsonObject
    WalkApiErrorResponse:
      $ref: ./next-gen-walk-execution-api.yaml#/components/schemas/WalkApiErrorResponse

paths:
  /walk/v1/categories:
    $ref: ./next-gen-walk-execution-api.yaml#/paths/~1walk~1v1~1categories
  /walk/v1/walks/:
    $ref: ./next-gen-walk-execution-api.yaml#/paths/~1walk~1v1~1walks~1
  /walk/v1/walks/scheduled:
    $ref: ./next-gen-walk-execution-api.yaml#/paths/~1walk~1v1~1walks~1scheduled
  /walk/v1/walks/types:
    $ref: ./next-gen-walk-execution-api.yaml#/paths/~1walk~1v1~1walks~1types
  /walk/v1/walks/questions:
    $ref: ./next-gen-walk-execution-api.yaml#/paths/~1walk~1v1~1walks~1questions
  /walk/v1/walks/stores:
    $ref: ./next-gen-walk-execution-api.yaml#/paths/~1walk~1v1~1walks~1stores
  /walk/v1/walks/{walk-id}:
    $ref: ./next-gen-walk-execution-api.yaml#/paths/~1walk~1v1~1walks~1{walk-id}
  /walk/v1/walks/permissions:
    $ref: ./next-gen-walk-execution-api.yaml#/paths/~1walk~1v1~1walks~1permissions
  /walk/v1/walks/users:
    $ref: ./next-gen-walk-execution-api.yaml#/paths/~1walk~1v1~1walks~1users
  /walk/v1/walks/schedule:
    $ref: ./next-gen-walk-execution-api.yaml#/paths/~1walk~1v1~1walks~1schedule
  /walk/v1/walks/submit:
    $ref: ./next-gen-walk-execution-api.yaml#/paths/~1walk~1v1~1walks~1submit
