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

# Create a new transfer with 2 visits

> Operacion: Create a new transfer with 2 visits.



## OpenAPI

````yaml /generated/specs/operations.json post /api/v1/transfers
openapi: 3.0.0
info:
  title: Raul API - Operaciones
  description: Suscripciones, GPS, actividades, visitas y operacion tecnica.
  version: 2.0.0
  contact: {}
servers:
  - url: https://api.raul.ugps.io
    description: Production
security: []
tags: []
paths:
  /api/v1/transfers:
    post:
      tags:
        - Transfers
      summary: Create a new transfer with 2 visits
      description: 'Operacion: Create a new transfer with 2 visits.'
      operationId: TransferController_create
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTransferDto'
      responses:
        '201':
          description: Transfer created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransferResponseDto'
      security:
        - bearerAuth: []
components:
  schemas:
    CreateTransferDto:
      type: object
      properties:
        client_id:
          type: string
          description: Client ID
        subscription_detail_id:
          type: string
          description: Subscription detail ID
        gps_details_id:
          type: string
          description: GPS details ID
        vehicle_id:
          type: string
          description: Source vehicle ID (for withdrawal)
        destination_vehicle_id:
          type: string
          description: Destination vehicle ID (for installation)
        reason:
          type: string
          description: Transfer reason
        withdrawal:
          description: Withdrawal visit data
          allOf:
            - $ref: '#/components/schemas/CreateTransferVisitDto'
        installation:
          description: Installation visit data (optional, can be added later)
          allOf:
            - $ref: '#/components/schemas/CreateTransferVisitDto'
      required:
        - client_id
        - withdrawal
    TransferResponseDto:
      type: object
      properties:
        transfer_id:
          type: string
        reason:
          type: object
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        status:
          type: string
          enum:
            - pending
            - in_progress
            - completed
            - cancelled
        withdrawal:
          $ref: '#/components/schemas/TransferVisitResponseDto'
        installation:
          $ref: '#/components/schemas/TransferVisitResponseDto'
        client_id:
          type: string
        client_name:
          type: object
        gps_name:
          type: object
        license_plate:
          type: object
      required:
        - transfer_id
        - created_at
        - updated_at
        - status
        - withdrawal
        - installation
    CreateTransferVisitDto:
      type: object
      properties:
        address:
          type: string
          description: Visit address
        city_id:
          type: string
          description: City ID
        visit_date:
          type: string
          description: Visit date
        technician_id:
          type: string
          description: Technician ID
        mileage:
          type: number
          description: Vehicle mileage
        hour_meter:
          type: number
          description: Hour meter
        charge_km_to_client:
          type: boolean
          description: Charge km to client
        charge_visit_to_client:
          type: boolean
          description: Charge visit to client
        notify_client_by_email:
          type: boolean
          description: Send visit email notification to client
        notify_technician_by_whatsapp:
          type: boolean
          description: Send visit WhatsApp notification to technician
      required:
        - address
    TransferVisitResponseDto:
      type: object
      properties:
        visit_detail_id:
          type: string
        vehicle_id:
          type: object
        license_plate:
          type: object
        vehicle:
          $ref: '#/components/schemas/TransferVehicleResponseDto'
        address:
          type: object
        visit_date:
          type: object
        visit_status_id:
          type: object
        visit_status_name:
          type: object
        technician_id:
          type: object
        technician_name:
          type: object
        city_id:
          type: object
        city_name:
          type: object
        notify_client_by_email:
          type: object
        notify_technician_by_whatsapp:
          type: object
      required:
        - visit_detail_id
    TransferVehicleResponseDto:
      type: object
      properties:
        id:
          type: string
        license_plate:
          type: object
        name:
          type: object
      required:
        - id
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Token de sesión Better Auth para rutas de backoffice; las rutas de
        portal usan su token propio.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.