Document Upload API
Centralized API for managing file uploads across all Mantis models. Supports uploading, retrieving, and deleting PDF documents and images for technical staff, vehicles, equipment, projects, and more.Upload or Replace File
Form Data Parameters
Type of model to upload file for. Valid options:
technical- Technical staff membervaccination_record- Vaccination recordpass_technical- Technical access passcertification_vehicle- Vehicle certificationpass_vehicle- Vehicle passvehicle- Vehiclecustody_chain- Custody chainsheet_project- Work sheet/projectshipping_guide- Shipping guideresource_item- Equipment/resource item
ID of the specific object to attach the file to
Name of the file field. Valid fields depend on model_type. See Model File Fields below.
The file to upload. Must be a valid PDF (for most fields) or image (for image fields).
Invoice reference number (only used when uploading invoice_file to sheet_project)
Response
Indicates if the upload was successful
Human-readable message about the operation
Delete File
Query Parameters
Type of model (same as upload)
ID of the object
Name of the file field to clear
Response
Indicates if deletion was successful
Human-readable message about the operation
Deletion confirmation
Get File Information
Query Parameters
Type of model
ID of the object
Name of the file field
Response
Indicates if the query was successful
Get Model File Fields
Query Parameters
Specific model type to query (optional - omit to get all models)
Response
Indicates if the query was successful
File field information by model type
Get Document Tree
Response
Indicates if the query was successful
Get Project Document Tree
Path Parameters
Project ID
Response
Indicates if the query was successful
Bulk Custody Chain Upload
Path Parameters
Project ID that owns the custody chains
Form Data Parameters
Multi-page PDF file
JSON array of custody chain IDs in the same order as PDF pages
Validation Rules
- Number of PDF pages must exactly match number of chain IDs
- All chain IDs must belong to the specified project
- All chains must be active (not deleted)
Response
Overall success status (true only if all pages processed without errors)
Number of pages successfully saved
Number of errors encountered
Human-readable summary
Array of successfully saved chain assignments
Array of errors encountered during processing
Model File Fields
Technical Staff
dni_file- National ID document (PDF)license_file- Driver’s license (PDF)vaccine_certificate_file- Vaccination certificate (PDF)
Vaccination Record
vaccine_file- Individual vaccine record (PDF)
Technical Pass
pass_file- Access pass document (PDF)
Vehicle
vehicle_image- Vehicle photo (image)poliza_file- Insurance policy (PDF)matricula_file- Vehicle registration (PDF)rev_tec_file- Technical inspection (PDF)
Vehicle Certification
certification_file- Certification document (PDF)
Vehicle Pass
pass_file- Access pass document (PDF)
Custody Chain
custody_chain_file- Custody chain document (PDF)
Sheet Project (Work Order)
sheet_project_file- Work sheet document (PDF)certificate_final_disposition_file- Final disposition certificate (PDF)invoice_file- Invoice document (PDF)
Shipping Guide
shipping_guide_file- Shipping guide document (PDF)
Resource Item (Equipment)
resource_image- Equipment photo (image)resource_image_2- Additional equipment photo (image)
Protected Operations
Certain operations are restricted based on document status:Closed Work Sheets
- Cannot modify existing files on closed sheets
- Can add files to empty fields on closed sheets
- Cannot delete any files from closed sheets
Custody Chains with Closed Sheets
- Same restrictions as closed work sheets apply to associated custody chains
Invoice Upload
When uploading an invoice file to a sheet project:- Sheet status is automatically set to
INVOICED - Invoice reference can be set via
invoice_referenceparameter