info:
  title: APIFlask
  version: 0.1.0
tags:
- name: V1.Batching_Users
servers:
- url: https://live.luigisbox.com
paths:
  /v1/recommender/batching/{tracker_id}/users:
    post:
      parameters:
      - in: path
        name: tracker_id
        schema:
          type: string
        required: true
      responses:
        '204':
          description: Successful response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: Validation error
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
          description: Invalid authentication credentials
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
          description: Not found
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
          description: The uploaded file has an invalid structure
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
          description: Insufficient access privileges
      tags:
      - V1.Batching_Users
      summary: Upload users for batch recommendations
      description: Upload a file containing users for batch recommendations. Accepted data types
        for the uploaded file are `.json` and `.csv`. If JSON type is used, then JSON Lines format is expected. The maximum allowed size of
        the uploaded file is 300 MB. 
      requestBody:
        description: |
                     Provide data for one user per line. Examples: 
                     
                     In JSON Lines:

                      ```
                      {"user_id": "u123"}
                      {"user_id": "u234"}
                      ```
                     
                     In CSV:
                      ```
                      u123
                      u234
                      ```
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/BatchingUsersFile'
              
      security:
      - BearerAuth: []
openapi: 3.0.3
components:
  schemas:
    ValidationError:
      properties:
        reason:
          type: string
        exception_details:
          type: object
      type: object
    HTTPError:
      properties:
        reason:
          type: string
        exception_details:
          type: object
      type: object
    BatchingUsersFile:
      type: object
      properties:
        file:
          type: string
          format: binary
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
