Skip to main content

Location Management

CreateLocalidadActivosFijos

Creates a new physical location (localidad) for fixed assets.
mutation {
  createLocalidadActivosFijos(
    localidad: {
      nombre: "Oficina Central - Piso 3"
      estado: "A"
      fechaCreacion: "2024-01-15T10:00:00Z"
      correoResponsable: "[email protected]"
      correoSeguridad: "[email protected]"
      id_compania: 1
    }
  ) {
    idLocalidad
    nombre
    estado
    fechaCreacion
    correoResponsable
    correoSeguridad
    id_compania
  }
}
localidad
IndAfLocalidadDTO
required
Location object to create
localidad.nombre
string
required
Name of the location (e.g., “Main Office - Floor 3”, “Warehouse A”)
localidad.estado
string
required
Status of the location. Use “A” for active, “I” for inactive.
localidad.fechaCreacion
DateTime
Creation date and time. If not provided, current timestamp will be used.
localidad.fechaModificacion
DateTime
Last modification date and time
localidad.correoResponsable
string
required
Email address of the person responsible for this location
localidad.correoSeguridad
string
required
Email address of the security contact for this location
localidad.id_compania
int
required
Company ID that owns this location
idLocalidad
int
Auto-generated unique identifier for the created location
nombre
string
Location name
estado
string
Location status (A=Active, I=Inactive)
fechaCreacion
DateTime
Creation timestamp
fechaModificacion
DateTime
Last modification timestamp
correoSeguridad
string
Security contact email
correoResponsable
string
Responsible person email
id_compania
int
Company ID
compania
CompaniasDTO
Related company details (if included in query)

Request Management

CreateSolicitudActivosFijos

Creates a new fixed asset request (solicitud) for transfers, assignments, or disposal.
mutation {
  createSolicitudActivosFijos(
    solicitud: {
      id_tipo_solicitud: 1
      id_motivo: 2
      id_localidad: 5
      id_usuario: 123
      id_centro_costo: 45
      id_custodio: 124
      pertenece: 1
      externo: null
      estado: "PENDING"
      correo: "[email protected]"
      detalle: "Transfer asset to new office location due to department reorganization"
      informeTecnico: "https://storage.example.com/reports/tech-report-001.pdf"
      guiaRemision: "https://storage.example.com/guides/shipping-guide-001.pdf"
      fotoFrente: "https://storage.example.com/photos/front-001.jpg"
      fotoAf: "https://storage.example.com/photos/asset-tag-001.jpg"
      fotoSerie: "https://storage.example.com/photos/serial-001.jpg"
      fotoDamage: null
      codigoActivoFijo: "123456-1"
      valorNegociado: null
      createdBy: "[email protected]"
    }
  ) {
    idSolicitud
    estado
    codigoActivoFijo
    createdAt
    createdBy
  }
}
solicitud
IndAfSolicitudDTO
required
Request object to create
solicitud.id_tipo_solicitud
int
required
Request type ID from catalog (e.g., 1=Transfer, 2=Assignment, 3=Disposal)
solicitud.id_motivo
int
required
Reason/motive ID from catalog (e.g., 1=Relocation, 2=Retirement, 3=Damage)
solicitud.id_localidad
int
Destination location ID (required for transfers)
solicitud.id_usuario
int
Requesting user ID
solicitud.id_centro_costo
int
Cost center ID for the asset
solicitud.id_custodio
int
New custodian user ID (required for transfers and assignments)
solicitud.pertenece
int
Ownership indicator (1=Company owned, 0=Other)
solicitud.externo
string
External party information (if asset belongs to external entity)
solicitud.estado
string
required
Initial status of the request. Typical values: “PENDING”, “IN_REVIEW”, “APPROVED”, “REJECTED”
solicitud.correo
string
Contact email for this request
solicitud.detalle
string
required
Detailed description of the request and justification
solicitud.informeTecnico
string
URL or path to technical report document (required for disposal requests)
solicitud.guiaRemision
string
URL or path to shipping/transfer guide document
solicitud.fotoFrente
string
URL to photo of asset front view
solicitud.fotoAf
string
URL to photo of asset identification tag
solicitud.fotoSerie
string
URL to photo of serial number plate
solicitud.fotoDamage
string
URL to photo of any damage (required for disposal due to damage)
solicitud.codigoActivoFijo
string
required
Asset code in format “numero-compSubn” (e.g., “123456-1”)
solicitud.valorNegociado
decimal
Negotiated value for disposal transactions
solicitud.createdBy
string
required
Email of the user creating the request
idSolicitud
int
Auto-generated unique identifier for the created request
id_tipo_solicitud
int
Request type ID
tipoSolicitud
CatalogoDTO
Request type details (if included)
id_motivo
int
Reason/motive ID
motivo
CatalogoDTO
Reason details (if included)
id_localidad
int
Location ID
localidad
IndAfLocalidadDTO
Location details (if included)
id_usuario
int
User ID
id_custodio
int
Custodian ID
custodio
UsuarioDTO
Custodian details (if included)
id_centro_costo
int
Cost center ID
estado
string
Current request status
correo
string
Contact email
detalle
string
Request details
informeTecnico
string
Technical report URL
guiaRemision
string
Shipping guide URL
fotoFrente
string
Front photo URL
fotoAf
string
Asset tag photo URL
fotoSerie
string
Serial number photo URL
fotoDamage
string
Damage photo URL
codigoActivoFijo
string
Asset code
valorNegociado
decimal
Negotiated value
createdAt
DateTime
Creation timestamp (automatically set to current UTC-5 time)
updatedAt
DateTime
Last update timestamp (automatically set to current UTC-5 time)
createdBy
string
Creator email
pickedBy
string
Fixed assets staff member assigned to handle the request
pertenece
int
Ownership indicator
externo
string
External party information

Usage Examples

Example 1: Creating a Location

mutation CreateNewWarehouse {
  createLocalidadActivosFijos(
    localidad: {
      nombre: "Warehouse B - North Sector"
      estado: "A"
      correoResponsable: "[email protected]"
      correoSeguridad: "[email protected]"
      id_compania: 1
    }
  ) {
    idLocalidad
    nombre
    estado
  }
}

Example 2: Creating an Asset Transfer Request

mutation TransferAsset {
  createSolicitudActivosFijos(
    solicitud: {
      id_tipo_solicitud: 1
      id_motivo: 1
      id_localidad: 10
      id_usuario: 45
      id_custodio: 67
      id_centro_costo: 12
      pertenece: 1
      estado: "PENDING"
      correo: "[email protected]"
      detalle: "Transfer laptop to new employee in Sales department"
      codigoActivoFijo: "789012-1"
      fotoFrente: "https://storage.example.com/photos/laptop-front.jpg"
      fotoAf: "https://storage.example.com/photos/laptop-tag.jpg"
      fotoSerie: "https://storage.example.com/photos/laptop-serial.jpg"
      createdBy: "[email protected]"
    }
  ) {
    idSolicitud
    estado
    codigoActivoFijo
    createdAt
    tipoSolicitud {
      nombre
    }
    localidad {
      nombre
    }
    custodio {
      nombre
      email
    }
  }
}

Example 3: Creating an Asset Disposal Request

mutation DisposeAsset {
  createSolicitudActivosFijos(
    solicitud: {
      id_tipo_solicitud: 3
      id_motivo: 3
      id_usuario: 45
      pertenece: 1
      estado: "PENDING"
      correo: "[email protected]"
      detalle: "Equipment damaged beyond repair, requesting disposal authorization"
      informeTecnico: "https://storage.example.com/reports/damage-assessment-123.pdf"
      codigoActivoFijo: "456789-2"
      fotoFrente: "https://storage.example.com/photos/damaged-front.jpg"
      fotoAf: "https://storage.example.com/photos/damaged-tag.jpg"
      fotoSerie: "https://storage.example.com/photos/damaged-serial.jpg"
      fotoDamage: "https://storage.example.com/photos/damage-detail.jpg"
      valorNegociado: 50.00
      createdBy: "[email protected]"
    }
  ) {
    idSolicitud
    estado
    codigoActivoFijo
    valorNegociado
    createdAt
  }
}

Best Practices

  1. Photo Documentation: Always include photos of the asset (front, tag, serial) for all request types. Include damage photos for disposal requests.
  2. Detailed Descriptions: Provide clear, detailed justifications in the detalle field to facilitate approval process.
  3. Technical Reports: For disposal requests, always attach a technical report documenting the asset condition and justification.
  4. Status Workflow: Set initial status to “PENDING” and let the approval workflow update it through subsequent operations.
  5. Timestamps: The system automatically sets createdAt and updatedAt to current UTC-5 time, so you don’t need to provide these values.
  6. Location Validation: Ensure the target location exists and is active before creating transfer requests.
  7. Custodian Verification: Verify that the new custodian (id_custodio) is an active employee before submitting the request.

Build docs developers (and LLMs) love