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

# Mechanic marks job complete



## OpenAPI

````yaml /openapi.yaml post /jobs/{id}/complete
openapi: 3.1.0
info:
  title: MechZie API
  version: 1.0.0-rc1
  description: On-demand roadside mechanic dispatch service API (MechZie)
  contact:
    name: MechZie Support
    email: support@mechzie.com
  license:
    name: MIT
    identifier: MIT
servers:
  - url: http://localhost:3000
    description: Local development
  - url: https://mechzie-api-399967621389.asia-south1.run.app/api/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: auth
    description: Authentication and token management
  - name: users
    description: User profile operations
  - name: vehicles
    description: Customer vehicle management
  - name: mechanics
    description: Mechanic profile and availability
  - name: jobs
    description: Job lifecycle and line items
  - name: tracking
    description: Real-time location tracking
  - name: payments
    description: Razorpay payment integration
  - name: wallet
    description: Mechanic wallet, UPI accounts, disputes, refunds, and settlements
  - name: ratings
    description: Customer and mechanic ratings
  - name: service-categories
    description: Service category management
  - name: notifications
    description: Push notifications and FCM tokens
  - name: uploads
    description: S3 presigned URL generation
  - name: admin
    description: Admin dashboard and management
  - name: super-admin
    description: Super-admin only operations (invite management, role assignment)
  - name: comms
    description: In-job audio calls (100ms) and persistent chat (Socket.IO + REST)
  - name: call
    description: >-
      Call signaling layer — initiate, accept, decline, cancel, end (ringing via
      FCM + Redis over 100ms rooms)
  - name: health
    description: Health check endpoints
paths:
  /jobs/{id}/complete:
    post:
      tags:
        - jobs
      summary: Mechanic marks job complete
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Job completed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Job'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    Job:
      type: object
      properties:
        id:
          type: string
          format: uuid
        customer_id:
          type: string
          format: uuid
        vehicle_id:
          type: string
          format: uuid
        service_category_id:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - pending
            - dispatching
            - accepted
            - en_route
            - arrived
            - in_progress
            - completed
            - paid
            - cancelled
            - no_mechanic_found
            - disputed
            - resolved
        pickup_address:
          type: string
        pickup_lat:
          type: number
          description: Latitude of pickup location (-90 to 90)
        pickup_lng:
          type: number
          description: Longitude of pickup location (-180 to 180)
        description:
          type:
            - string
            - 'null'
        estimated_price:
          type:
            - number
            - 'null'
        final_price:
          type:
            - number
            - 'null'
        base_price:
          type:
            - number
            - 'null'
        cancellation_fee:
          type:
            - number
            - 'null'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        mechanic_profile_id:
          type: string
          format: uuid
        photo_urls:
          type: array
          items:
            type: string
            format: uri
        cancel_reason:
          type:
            - string
            - 'null'
        hms_room_id:
          type: string
          description: 100ms room ID for in-job audio call (null until first comms request)
        disputed_at:
          type: string
          format: date-time
        resolved_at:
          type: string
          format: date-time
    Error:
      type: object
      description: Standard error envelope returned by all error responses
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            code:
              type: string
              description: Machine-readable error code (e.g. NOT_FOUND, UNAUTHORIZED)
              example: NOT_FOUND
            message:
              type: string
              description: Human-readable description of the error
              example: Resource not found
            errors:
              type: object
              description: Field-level validation errors (only present on 422)
              additionalProperties:
                type: array
                items:
                  type: string
          required:
            - code
            - message
      required:
        - success
        - error
  responses:
    Unauthorized:
      description: Missing or invalid authentication token
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT access token from /auth/verify-otp

````