Skip to content

Cargos Integration - Product Requirements Document

Version: 2.0 | Status: Production | Last Updated: 2026-01-15

Change Log

VersionDateChanges
2.02026-01-15Converted to business-focused format; added measurable outcomes, success metrics, consolidated requirements
1.0InitialTechnical documentation

1. Overview

1.1 Purpose

Enable Italian rental companies on Toprent.app to comply with mandatory police reporting requirements by automating rental contract submissions to CARGOS (Car Renter Guardian Operation System), the Italian State Police reporting system.

1.2 Business Value

Value AreaMeasurable OutcomeTarget
Regulatory ComplianceAchieve 100% compliance with Italian police reporting requirements (Art. 54, Legislative Decree 285/1992)Zero compliance violations within 6 months
Penalty AvoidanceEliminate fines and legal actions from non-compliance€0 compliance-related penalties annually
Market AccessEnable full legal operation for Italian rental companies100% of Italian orders reportable to CARGOS
Operational EfficiencyReduce manual police reporting effort90% reduction in manual reporting time

1.3 Target Users

User RoleBusiness ContextPrimary Goal
Rental Company AdministratorsConfigure compliance systems, manage company settingsEnable and maintain CARGOS integration
Office StaffProcess daily rentals, handle customer transactionsSubmit rental contracts to police efficiently
Operations ManagersOversee Italian location complianceEnsure 100% reporting compliance across offices

Geographic Constraint: Available only to companies with Italian addresses (regulatory requirement).

1.4 Scope

In Scope:

  • CARGOS credential and office configuration management
  • Order data submission (validation and production modes)
  • Italian location and citizenship code lookups
  • Submission history and audit trail

Out of Scope:

  • Automated submission on order creation
  • Bulk historical data migration
  • Police reporting for non-Italian jurisdictions
  • Automated data correction or normalization

2. Success Metrics

MetricDefinitionBaselineTargetMeasurement Method
Compliance Rate% of Italian orders successfully reported to CARGOSManual process (varies)100%Monthly audit of orders vs. CARGOS reports
Submission Success Rate% of submissions accepted on first attemptN/A (new feature)≥95%CARGOS API response tracking
Manual Effort ReductionHours spent on police reporting per office/month8-12 hours (estimate)<1 hourStaff time studies
Time to SubmitMinutes from order completion to CARGOS submission15-30 min (manual)<5 minWorkflow timing analytics
Validation Error Rate% of submissions requiring data correctionN/A<10%Check mode failure tracking
System Availability% uptime for CARGOS submission functionalityN/A99.5%System monitoring

Baseline Period: 30-day pre-implementation measurement where applicable Measurement Frequency: Monthly reporting with quarterly business reviews


3. User Stories

3.1 Company Administrator Stories (P0 - Critical)

US-1: Enable Integration

  • As a company administrator, I need to enable CARGOS integration so my Italian offices can legally operate
  • Acceptance Criteria:
    • Given I have an Italian company address, when I access Settings > Integrations, then I see the CARGOS toggle
    • Given I enable CARGOS integration, when staff access eligible orders, then they see the CARGOS submission option

US-2: Manage Credentials

  • As a company administrator, I need to securely store CARGOS credentials so staff can submit reports without accessing sensitive data
  • Acceptance Criteria:
    • Given I enter CARGOS credentials (username, password, API key), when I save, then credentials are encrypted at rest
    • Given credentials are saved, when any user views settings, then sensitive values display as masked (****)

US-3: Configure Office Mapping

  • As a company administrator, I need to map each office to a CARGOS agency identifier so reports include correct agency information
  • Acceptance Criteria:
    • Given I edit an office, when I configure CARGOS fields, then I can search and select Italian location codes
    • Given incomplete agency mapping, when staff attempt submission for that office, then they receive a clear error message

3.2 Office Staff Stories (P0 - Critical)

US-4: Validate Before Submission

  • As office staff, I need to validate order data before official submission so I can fix errors without creating police records
  • Acceptance Criteria:
    • Given a completed order with drivers, when I click “Check,” then the system validates against CARGOS without creating a record
    • Given validation fails, when I view errors, then each field needing correction is highlighted with guidance

US-5: Submit Rental Contracts

  • As office staff, I need to submit validated rental contracts to CARGOS so I fulfill legal reporting obligations
  • Acceptance Criteria:
    • Given a successful Check, when I click “Send,” then the contract is submitted to CARGOS production
    • Given successful submission, when I return to the order, then it shows CARGOS submission status and timestamp

US-6: View Submission History

  • As office staff, I need to view previously submitted reports so I can verify compliance and reference details
  • Acceptance Criteria:
    • Given a submitted order, when I view order details, then I can access the complete CARGOS report
    • Given an existing report, when I need to make corrections, then I can edit and resubmit

3.3 Operations Manager Stories (P1 - High)

US-7: Audit Compliance

  • As an operations manager, I need to access submission history across offices so I can audit compliance status
  • Acceptance Criteria:
    • Given my Italian offices, when I review orders, then I can identify which have been reported to CARGOS
    • Given incomplete reporting, when I investigate, then I can identify why specific orders were not submitted

4. Functional Requirements

4.1 Integration Configuration

IDRequirementBusiness Outcome
FR-1Integration toggle at company level (Settings > Integrations)Administrators control feature availability
FR-2Restrict availability to companies with Italian addressesEnsures regulatory relevance
FR-3Secure credential storage with encryptionProtects sensitive police system access
FR-4Mask encrypted values in all user interfacesPrevents credential exposure

4.2 Office Agency Mapping

IDRequirementBusiness Outcome
FR-5Configure CARGOS agency fields per office (ID, name, address, phone, location code)Accurate agency identification in reports
FR-6Location code validation against official Italian codesPrevents submission errors
FR-7Prevent submission for offices with incomplete mappingEnsures data quality before submission

4.3 Data Lookup Services

IDRequirementBusiness Outcome
FR-8Searchable Italian location codes (states/communes) with autocompleteEfficient data entry for staff
FR-9Searchable citizenship codes with autocompleteEfficient driver data entry
FR-10Payment, vehicle, and document type lookups from CARGOSEnsures valid code selection

4.4 Submission Workflow

IDRequirementBusiness Outcome
FR-11Three-tab submission form (Contract/Vehicle, Client, completion indicators)Clear data organization for staff
FR-12Pre-populate form from order, driver, and office dataMinimizes manual data entry
FR-13Auto-match province codes from addresses where possibleReduces data entry errors
FR-14Enforce CARGOS character and format restrictionsPrevents validation failures
FR-15Display Terms of Use in 12 languagesLegal compliance across user base

4.5 Validation and Submission

IDRequirementBusiness Outcome
FR-16Check mode validates without creating official recordStaff can fix errors before official submission
FR-17Send mode requires successful Check firstPrevents submission of invalid data
FR-18Store complete submission record with timestampAudit trail for compliance verification
FR-19Idempotent resubmission (same order doesn’t duplicate)Safe correction workflow

4.6 Error Handling

IDRequirementBusiness Outcome
FR-20Clear error messages for missing credentials/drivers/mappingStaff can resolve issues independently
FR-21Field-level validation error highlightingTargeted corrections without confusion
FR-22Network failure recovery with retry optionResilient operation
FR-23Error logging for technical supportEfficient issue resolution

5. Business Rules

RuleDescriptionConsequence of Violation
BR-1All Italian rental contracts must be reported to CARGOSLegal penalties, business suspension risk
BR-2Reports must be submitted before or shortly after checkoutRegulatory non-compliance
BR-3CARGOS production API is used for all operations (no sandbox)Check mode calls live system
BR-4At least one driver (primary) required per submissionSubmission blocked
BR-5Office must have complete CARGOS agency mappingSubmission blocked for that office
BR-6Encrypted credentials never displayed unmaskedSecurity policy requirement

6. Acceptance Criteria

AC-1: Configuration (Administrator)

  • Given Italian company, CARGOS integration option appears in Settings
  • Given non-Italian company, CARGOS option is not available
  • Given valid credentials entered, they are encrypted and saved
  • Given saved credentials, all displays show masked values only

AC-2: Office Mapping (Administrator)

  • Given office edit view, CARGOS agency fields are configurable
  • Given location code search, autocomplete returns matching Italian locations
  • Given incomplete mapping, submission is blocked with clear message

AC-3: Validation (Staff)

  • Given eligible order (credentials exist, drivers present), CARGOS option appears
  • Given form display, available order data pre-populates automatically
  • Given Check action, validation runs against CARGOS without creating record
  • Given validation errors, specific fields are highlighted with correction guidance

AC-4: Submission (Staff)

  • Given successful Check, Send button becomes enabled
  • Given Send action, submission goes to CARGOS production endpoint
  • Given successful Send, report record is created with timestamp
  • Given successful Send, order shows CARGOS submission status
  • Given repeat submission for same order, no duplicate records created

AC-5: Reporting (Staff/Manager)

  • Given submitted order, full CARGOS report is viewable from order details
  • Given existing report, editing and resubmission is possible
  • Given Italian operations, all orders are trackable for compliance status

AC-6: Error Handling

  • Given missing credentials, clear message prevents form access
  • Given missing drivers, clear message explains requirement
  • Given API errors, user-friendly message displays with technical details logged
  • Given network failure, retry option is available

7. Dependencies

7.1 Depends On

DependencyRequired Capability
Multi-tenant ArchitectureCompany and tenant isolation
Client ManagementClient data for contract holder
Order/Reservation SystemOrder and driver data for submission

7.2 External Dependencies

SystemPurposeRisk Mitigation
CARGOS API (Italian State Police)Rental contract reportingMonitor API availability, error handling
Vercel Edge ConfigCredential encryption keyEnsure key availability in production
SentryError trackingMonitor for submission failures

7.3 Depended By

  • None (optional compliance feature specific to Italian market)

8. Glossary

TermDefinition
CARGOSCar Renter Guardian Operation System - Italian State Police rental reporting system
Check ModeValidation submission that tests data without creating official record
Send ModeProduction submission that creates official CARGOS report
Agency (AGENZIA)Rental company office in CARGOS terminology
CONTRATTORental contract/agreement
CONDUCENTEDriver authorized to operate rental vehicle
CONTRAENTEContract holder (primary driver who signed agreement)
Fixed-Width FormatData format where each field occupies exact character count

9. Appendix: Regulatory Reference

This integration supports compliance with Article 54 of Legislative Decree 285/1992 (Italian Highway Code), which mandates vehicle rental companies report rental contracts to law enforcement authorities.