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

# Submit shoe recommendation questionnaire

> **Step 1 of 3** -- Create a shoe recommendation request.

Send the runner questionnaire and references to completed analyses. The server returns a
`shoe_recommendation_id` that you pass to `POST /shoeRecommendation/start`, then poll
`GET /shoeRecommendation/{shoe_recommendation_id}/result` until the status is `success`.

**Subject link:** When you set `input.form.subject_id`, it must be a **subject id** returned by
`POST /subjects` (same id you may pass as `subject_id` on `POST /analysis/start`). If you
omit `subject_id`, no subject lookup is performed for that request.

**Analyses:** At least one of `id_side_view_analysis` or `id_back_view_analysis` is required.
Each id must be a `video_id` from a completed analysis (`GET /analysis/{analysis_id}/results`
with `status: success`) that belongs to your account. Side-view ids must refer to a
`side_view` analysis; back-view ids to a `back_view` analysis. If you send `subject_id` and an
analysis was created with a `subject_id`, that id must match `subject_id`.

**Height and weight:** Height is in **meters** (defaults to 1.70 if omitted). Weight is in
**kilograms** (defaults to 70 if omitted).

**Shoe purposes:** `tempo_training` is accepted; the alias `tempo` is also accepted and stored
as `tempo_training`.




## OpenAPI

````yaml /openapi.yaml post /shoeRecommendation/form
openapi: 3.0.1
info:
  title: Ochy Partner API
  version: 1.0.0
  description: >
    The Ochy Partner API lets you integrate running biomechanical analysis into
    your application.

    Upload a video of a runner, receive detailed biomechanical metrics, joint
    angles, running style

    classification, and frame-by-frame position data.
servers:
  - url: https://partner-api.ochy-prod.com
    description: Production
security:
  - apiKey: []
paths:
  /shoeRecommendation/form:
    post:
      tags:
        - Shoe recommendation
      summary: Submit shoe recommendation questionnaire
      description: >
        **Step 1 of 3** -- Create a shoe recommendation request.


        Send the runner questionnaire and references to completed analyses. The
        server returns a

        `shoe_recommendation_id` that you pass to `POST
        /shoeRecommendation/start`, then poll

        `GET /shoeRecommendation/{shoe_recommendation_id}/result` until the
        status is `success`.


        **Subject link:** When you set `input.form.subject_id`, it must be a
        **subject id** returned by

        `POST /subjects` (same id you may pass as `subject_id` on `POST
        /analysis/start`). If you

        omit `subject_id`, no subject lookup is performed for that request.


        **Analyses:** At least one of `id_side_view_analysis` or
        `id_back_view_analysis` is required.

        Each id must be a `video_id` from a completed analysis (`GET
        /analysis/{analysis_id}/results`

        with `status: success`) that belongs to your account. Side-view ids must
        refer to a

        `side_view` analysis; back-view ids to a `back_view` analysis. If you
        send `subject_id` and an

        analysis was created with a `subject_id`, that id must match
        `subject_id`.


        **Height and weight:** Height is in **meters** (defaults to 1.70 if
        omitted). Weight is in

        **kilograms** (defaults to 70 if omitted).


        **Shoe purposes:** `tempo_training` is accepted; the alias `tempo` is
        also accepted and stored

        as `tempo_training`.
      operationId: createShoeRecommendation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShoeRecommendationFormRequest'
            example:
              input:
                form:
                  subject_id: 550e8400-e29b-41d4-a716-446655440000
                  running_experience: intermediate
                  running_session: high_frequency
                  weekly_km: high_volume
                  shoe_purpose:
                    - jogging
                    - tempo_training
                  pain:
                    - knee
                  weight: 75
                  height: 1.8
                  treadmill: false
                  comfort_heel_cushioning: 60
                  comfort_forefoot_cushioning: 45
                  comfort_shoe_stability: 70
                  comfort_forefoot_flexibility: 55
                  previous_shoes:
                    stability: neutral
                    drop: medium_drop
                    carbon_plate: without_plate
                    shoe_weight: medium
                id_side_view_analysis: 3dde3402-94d7-462e-a784-9306207108dd
                id_back_view_analysis: 5c482a11-4f50-471f-91f2-af9acb14182f
                favorite_brands:
                  - nike
                  - asics
      responses:
        '201':
          description: Recommendation request created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShoeRecommendationCreateResponse'
              example:
                shoe_recommendation_id: 550e8400-e29b-41d4-a716-446655440000
        '400':
          description: Invalid JSON or validation error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid_json:
                  summary: Invalid JSON
                  value:
                    detail: Invalid JSON payload
                    code: invalid_json
                validation:
                  summary: Validation error
                  value:
                    detail: Invalid request data
                    code: validation_error
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShoeRecommendationUnauthorizedResponse'
              example:
                detail: Unauthorized
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ShoeRecommendationFormRequest:
      type: object
      required:
        - input
      properties:
        input:
          $ref: '#/components/schemas/ShoeRecommendationInput'
    ShoeRecommendationCreateResponse:
      type: object
      required:
        - shoe_recommendation_id
      properties:
        shoe_recommendation_id:
          type: string
          description: >-
            Use this id with `/shoeRecommendation/start` and
            `/shoeRecommendation/{id}/result`.
          example: 550e8400-e29b-41d4-a716-446655440000
    ErrorResponse:
      type: object
      properties:
        detail:
          type: string
          example: Internal server error
        code:
          type: string
          description: Machine-readable error code (present on some errors).
          example: insufficient_credits
    ShoeRecommendationUnauthorizedResponse:
      type: object
      description: Returned when the `apiKey` query parameter is missing or not valid.
      properties:
        detail:
          type: string
          example: Unauthorized
    ShoeRecommendationInput:
      type: object
      required:
        - form
      properties:
        form:
          $ref: '#/components/schemas/ShoeRecommendationQuestionnaire'
        id_side_view_analysis:
          type: string
          nullable: true
          description: video_id of a completed side_view analysis for this account.
        id_back_view_analysis:
          type: string
          nullable: true
          description: video_id of a completed back_view analysis for this account.
        favorite_brands:
          type: array
          items:
            type: string
          description: Optional brand keys to filter the catalog.
    ShoeRecommendationQuestionnaire:
      type: object
      required:
        - running_experience
        - running_session
        - weekly_km
        - shoe_purpose
        - treadmill
      properties:
        subject_id:
          type: string
          description: >
            Optional subject id from subject management (same as `subject_id` on
            analysis start when linked).

            When set, the subject must exist for your account. When an analysis
            lists `partner_subject_id`,

            it must match this value.
        running_experience:
          type: string
          enum:
            - beginner
            - novice
            - intermediate
            - advanced
        running_session:
          type: string
          enum:
            - low_frequency
            - moderate_frequency
            - high_frequency
            - very_high_frequency
        weekly_km:
          type: string
          enum:
            - low_volume
            - moderate_volume
            - high_volume
            - very_high_volume
        shoe_purpose:
          type: array
          items:
            type: string
            enum:
              - jogging
              - racing
              - tempo_training
              - tempo
              - interval_training
          description: >
            Intended uses (multi-select). `tempo` is accepted as an alias for
            `tempo_training`.
        pain:
          type: array
          items:
            type: string
            enum:
              - back
              - hip
              - knee
              - shin_splints
              - calf
              - ankle
              - achilles_tendon
              - foot
          description: Defaults to empty if omitted.
        treadmill:
          type: boolean
        weight:
          type: number
          description: Body weight in kilograms. Defaults to 70 if omitted.
          default: 70
        height:
          type: number
          description: Height in meters. Defaults to 1.70 if omitted.
          default: 1.7
        carbon_plate:
          type: string
          enum:
            - with_plate
            - without_plate
            - unknown
          description: Optional preference for carbon plate in the new shoe.
        comfort_heel_cushioning:
          type: integer
          nullable: true
          minimum: 0
          maximum: 100
        comfort_forefoot_cushioning:
          type: integer
          nullable: true
          minimum: 0
          maximum: 100
        comfort_shoe_stability:
          type: integer
          nullable: true
          minimum: 0
          maximum: 100
        comfort_forefoot_flexibility:
          type: integer
          nullable: true
          minimum: 0
          maximum: 100
        previous_shoes:
          $ref: '#/components/schemas/ShoeRecommendationPreviousShoes'
    ShoeRecommendationPreviousShoes:
      type: object
      description: Optional context about the runner's current or previous shoes.
      properties:
        stability:
          type: string
          enum:
            - motion_control
            - neutral
            - unknown
        drop:
          type: string
          enum:
            - zero_drop
            - low_drop
            - medium_drop
            - high_drop
            - unknown
        carbon_plate:
          type: string
          enum:
            - with_plate
            - without_plate
            - unknown
        shoe_weight:
          type: string
          enum:
            - medium
            - light
            - heavy
            - barefoot
            - unknown
  securitySchemes:
    apiKey:
      type: apiKey
      in: query
      name: apiKey
      description: Your API key, passed as a query parameter on every request.

````