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

# Milestone-wise deal folder content for one athlete+job

> Returns the full deal folder payload for one athlete on one job, organised by milestone, with all file slots, current versions, status labels, and unread comment counts. Accessible by the athlete, the brand of the job, or an agent representing the athlete.



## OpenAPI

````yaml /storage/api-docs/api-docs.json post /deal-folder/athlete-job-details
openapi: 3.0.0
info:
  title: MOGL Core API
  description: >-
    MOGL Platform Core API — powering athlete NIL deals, brand partnerships,
    agent management, payments, messaging, and more.
     *
     * ## Authentication
     * - **JWT Bearer Token**: Most endpoints require a Bearer token obtained via `/api/login`.
     * - **Server-to-Server API Key**: Internal/lambda/cron endpoints use an `X-API-KEY` header.
     *
     * ## Rate Limiting
     * - Registration & login endpoints: 4–15 requests per minute
     * - Public/influencer endpoints: 200 requests per minute
     * - Authenticated endpoints: standard Laravel throttle
  version: 1.0.0
servers:
  - url: http://localhost/mogl/mogl-backend/api
    description: Local
  - url: https://dev-api.mogl.online/api
    description: Dev
  - url: https://staging-api.mogl.online/api
    description: Staging
  - url: https://api.mogl.online/api
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Authentication
    description: Login, registration, password reset
  - name: User Registration - Common
    description: Common user registration & email check
  - name: User Registration - Athlete
    description: Athlete registration & onboarding steps
  - name: User Registration - Partner
    description: Partner/Brand registration & onboarding steps
  - name: User Registration - Agent
    description: Agent registration & onboarding steps
  - name: User Registration - Fan
    description: Fan registration & onboarding steps
  - name: User Profile
    description: User profile management, settings, social media
  - name: Athlete
    description: 'Athlete-specific endpoints: search, details, availability'
  - name: Athlete - Availability Confirmation
    description: Post-hiring availability confirmation workflow
  - name: Athlete - NIL Feed
    description: Athlete NIL feed and partner search
  - name: Athlete - AI Assistant
    description: AI-powered job assistant for athletes — chat and conversation history
  - name: Partner
    description: Partner/Brand-specific endpoints
  - name: Partner - External Job
    description: External job link & applicant management
  - name: Partner - Deliverable Report
    description: Deliverable detail reports for brands
  - name: Partner - Screening Questions
    description: Screening question reports
  - name: Partner - Contract Management
    description: Brand contract management with athletes
  - name: Partner - Content Library
    description: Brand content library for deliverable assets
  - name: Agent
    description: Agent profile, athlete management, contracts
  - name: Agent - Athletes
    description: Agent-athlete relationship management
  - name: Agent - Stripe
    description: Agent payment methods & billing via Stripe
  - name: Agent - Contracts
    description: Agent athlete contract management
  - name: Agent - Availability Confirmation
    description: Agent managing athlete job availability
  - name: Jobs
    description: Job/deal CRUD, search, invitations, hiring, deliverables
  - name: Deals
    description: Deal listing, my deals, bulk operations
  - name: Deal Folder
    description: >-
      Deal folder file workflow — uploads, replacements, approvals, revisions,
      comments. Accessible by athlete, partner/brand, agent, and iOS clients
      (per-action authorisation enforced server-side).
  - name: Deal Folder iOS API
    description: >-
      iOS-only direct-to-S3 multipart upload endpoints for deal folder files
      (initiate/complete for new uploads and replacements). Web clients should
      use the standard `Deal Folder` upload/replace endpoints instead.
  - name: Chat
    description: Messaging, chat contacts, notifications
  - name: Notifications
    description: Notification preferences, in-app notifications
  - name: Payments
    description: Stripe payments, payment history, cards, bulk pay
  - name: Subscription
    description: Brand subscription plans & management
  - name: Public Pages
    description: Public content endpoints (no auth required)
  - name: Public - Influencer/SEO
    description: Public influencer discovery, sitemaps, directories
  - name: Services
    description: Athlete service marketplace
  - name: iOS Device
    description: iOS device tokens, live activities
  - name: Onboarding Tutorial
    description: Onboarding tutorial progress
  - name: MOGL Rosters
    description: Roster management & display
  - name: Internal / Cron
    description: Server-to-server and cron job endpoints
  - name: Affiliate
    description: Athlete affiliate links & tracking
paths:
  /deal-folder/athlete-job-details:
    post:
      tags:
        - Deal Folder
      summary: Milestone-wise deal folder content for one athlete+job
      description: >-
        Returns the full deal folder payload for one athlete on one job,
        organised by milestone, with all file slots, current versions, status
        labels, and unread comment counts. Accessible by the athlete, the brand
        of the job, or an agent representing the athlete.
      operationId: getDealFolderAthleteJobDetails
      requestBody:
        required: true
        content:
          application/json:
            schema:
              required:
                - athlete_id
                - job_id
              properties:
                athlete_id:
                  description: Athlete user ID
                  type: integer
                  example: 42
                job_id:
                  description: Partner job ID
                  type: integer
                  example: 100
              type: object
      responses:
        '200':
          description: Deal folder details
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    properties:
                      deal_folder:
                        description: >-
                          Null when no deal folder exists yet for this
                          athlete+job mapping.
                        properties:
                          id:
                            type: integer
                            example: 12
                          is_active:
                            type: boolean
                            example: true
                          activated_at:
                            type: string
                            format: date-time
                            example: '2026-04-01T12:00:00Z'
                            nullable: true
                          deal_folder_status:
                            description: >-
                              **Deal folder state** — rollup of
                              `MIN(file.status)` across all non-deleted files.
                              `null` if the folder has no files.
                            type: string
                            enum:
                              - Awaiting Upload
                              - Needs Approval
                              - Revision Requested
                              - File Approved
                              - Voided
                            example: Needs Approval
                            nullable: true
                          job:
                            properties:
                              id:
                                type: integer
                                example: 100
                              name:
                                type: string
                                example: Spring NIL Campaign
                              assets_files:
                                type: array
                                items:
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    type:
                                      type: string
                                      example: brief
                                    file_name:
                                      type: string
                                      example: brief.pdf
                                    file_url:
                                      type: string
                                      example: https://cdn.mogl.online/.../brief.pdf
                                  type: object
                              total_unread_comment_count:
                                type: integer
                                example: 3
                            type: object
                          partner:
                            properties:
                              id:
                                type: integer
                                example: 7
                              name:
                                type: string
                                example: Acme Brand
                              profile_photo:
                                type: string
                                example: https://cdn.mogl.online/.../partner.jpg
                                nullable: true
                              category:
                                type: string
                                example: Apparel
                                nullable: true
                            type: object
                          athlete:
                            properties:
                              id:
                                type: integer
                                example: 42
                              name:
                                type: string
                                example: Jane Doe
                              profile_photo:
                                type: string
                                example: https://cdn.mogl.online/.../athlete.jpg
                                nullable: true
                              sport_name:
                                type: string
                                example: Basketball
                                nullable: true
                              college_name:
                                type: string
                                example: UCLA
                                nullable: true
                            type: object
                          milestones:
                            type: array
                            items:
                              properties:
                                milestone_athlete_rel_id:
                                  type: integer
                                  example: 88
                                milestone_id:
                                  type: integer
                                  example: 200
                                milestone_name:
                                  type: string
                                  example: 1st Deliverable
                                deliverable_type_name:
                                  type: string
                                  example: Instagram Post
                                  nullable: true
                                description:
                                  type: string
                                  example: <p>Post a 30s reel</p>
                                  nullable: true
                                price:
                                  type: number
                                  example: 100
                                payment_mode:
                                  type: string
                                  enum:
                                    - C
                                    - P
                                  example: C
                                due_date:
                                  type: string
                                  format: date-time
                                  example: '2026-04-15T12:00:00Z'
                                  nullable: true
                                due_date_number:
                                  type: integer
                                  example: 4
                                  nullable: true
                                due_date_type:
                                  type: string
                                  enum:
                                    - Day
                                    - Week
                                    - Month
                                  example: Week
                                  nullable: true
                                due_date_athlete:
                                  type: string
                                  format: date-time
                                  example: '2026-04-15T12:00:00Z'
                                  nullable: true
                                is_paid:
                                  type: string
                                  example: 'N'
                                payment_status:
                                  type: string
                                  example: pending
                                  nullable: true
                                amount_paid:
                                  type: number
                                  example: 0
                                  nullable: true
                                deal_folder_file_status:
                                  description: >-
                                    **Deliverable state** — rollup of
                                    `MIN(file.status)` across this milestone's
                                    active files. `Awaiting Upload` when the
                                    milestone has no files.
                                  type: string
                                  enum:
                                    - Awaiting Upload
                                    - Needs Approval
                                    - Revision Requested
                                    - File Approved
                                    - Voided
                                  example: Needs Approval
                                unread_comment_count:
                                  type: integer
                                  example: 1
                                files:
                                  type: array
                                  items:
                                    properties:
                                      id:
                                        type: integer
                                        example: 5
                                      slot_number:
                                        type: integer
                                        example: 1
                                      status:
                                        description: >-
                                          **File state** (raw integer). `0` =
                                          Awaiting Upload, `1` = Needs Approval,
                                          `2` = Revision Requested, `3` = File
                                          Approved, `4` = Voided.
                                        type: integer
                                        enum:
                                          - 0
                                          - 1
                                          - 2
                                          - 3
                                          - 4
                                        example: 1
                                      status_label:
                                        description: >-
                                          **File state** (human-readable label for
                                          `status`).
                                        type: string
                                        enum:
                                          - Awaiting Upload
                                          - Needs Approval
                                          - Revision Requested
                                          - File Approved
                                          - Voided
                                        example: Needs Approval
                                      unread_comment_count:
                                        type: integer
                                        example: 1
                                      uploaded_by:
                                        properties:
                                          id:
                                            type: integer
                                            example: 42
                                          name:
                                            type: string
                                            example: Jane Doe
                                        type: object
                                        nullable: true
                                      current_version:
                                        properties:
                                          id:
                                            type: integer
                                            example: 11
                                          file_name:
                                            type: string
                                            example: reel.mp4
                                          file_url:
                                            type: string
                                            example: https://cdn.mogl.online/.../reel.mp4
                                          file_size:
                                            type: integer
                                            example: 8421376
                                          file_mime_type:
                                            type: string
                                            example: video/mp4
                                          version_number:
                                            type: integer
                                            example: 1
                                          uploaded_at:
                                            type: string
                                            format: date-time
                                            example: '2026-04-01T12:00:00Z'
                                        type: object
                                        nullable: true
                                      created_at:
                                        type: string
                                        format: date-time
                                        example: '2026-04-01T12:00:00Z'
                                      updated_at:
                                        type: string
                                        format: date-time
                                        example: '2026-04-01T12:05:00Z'
                                    type: object
                              type: object
                        type: object
                        nullable: true
                    type: object
                type: object
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
        '422':
          description: Validation error / not authorised to view / no application found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    UnauthorizedResponse:
      properties:
        message:
          type: string
          example: Unauthenticated.
      type: object
    ValidationErrorResponse:
      properties:
        message:
          type: string
          example: The given data was invalid.
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
      type: object
  securitySchemes:
    bearerAuth:
      type: http
      description: >-
        JWT Bearer token authentication. Use the /api/login endpoint to obtain a
        token.
      scheme: bearer
      bearerFormat: JWT

````