Cargos Integration - Product Requirements Document
Version: 2.0 | Status: Production | Last Updated: 2026-01-15
Change Log
| Version | Date | Changes |
|---|---|---|
| 2.0 | 2026-01-15 | Converted to business-focused format; added measurable outcomes, success metrics, consolidated requirements |
| 1.0 | Initial | Technical 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 Area | Measurable Outcome | Target |
|---|---|---|
| Regulatory Compliance | Achieve 100% compliance with Italian police reporting requirements (Art. 54, Legislative Decree 285/1992) | Zero compliance violations within 6 months |
| Penalty Avoidance | Eliminate fines and legal actions from non-compliance | €0 compliance-related penalties annually |
| Market Access | Enable full legal operation for Italian rental companies | 100% of Italian orders reportable to CARGOS |
| Operational Efficiency | Reduce manual police reporting effort | 90% reduction in manual reporting time |
1.3 Target Users
| User Role | Business Context | Primary Goal |
|---|---|---|
| Rental Company Administrators | Configure compliance systems, manage company settings | Enable and maintain CARGOS integration |
| Office Staff | Process daily rentals, handle customer transactions | Submit rental contracts to police efficiently |
| Operations Managers | Oversee Italian location compliance | Ensure 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
| Metric | Definition | Baseline | Target | Measurement Method |
|---|---|---|---|---|
| Compliance Rate | % of Italian orders successfully reported to CARGOS | Manual process (varies) | 100% | Monthly audit of orders vs. CARGOS reports |
| Submission Success Rate | % of submissions accepted on first attempt | N/A (new feature) | ≥95% | CARGOS API response tracking |
| Manual Effort Reduction | Hours spent on police reporting per office/month | 8-12 hours (estimate) | <1 hour | Staff time studies |
| Time to Submit | Minutes from order completion to CARGOS submission | 15-30 min (manual) | <5 min | Workflow timing analytics |
| Validation Error Rate | % of submissions requiring data correction | N/A | <10% | Check mode failure tracking |
| System Availability | % uptime for CARGOS submission functionality | N/A | 99.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
| ID | Requirement | Business Outcome |
|---|---|---|
| FR-1 | Integration toggle at company level (Settings > Integrations) | Administrators control feature availability |
| FR-2 | Restrict availability to companies with Italian addresses | Ensures regulatory relevance |
| FR-3 | Secure credential storage with encryption | Protects sensitive police system access |
| FR-4 | Mask encrypted values in all user interfaces | Prevents credential exposure |
4.2 Office Agency Mapping
| ID | Requirement | Business Outcome |
|---|---|---|
| FR-5 | Configure CARGOS agency fields per office (ID, name, address, phone, location code) | Accurate agency identification in reports |
| FR-6 | Location code validation against official Italian codes | Prevents submission errors |
| FR-7 | Prevent submission for offices with incomplete mapping | Ensures data quality before submission |
4.3 Data Lookup Services
| ID | Requirement | Business Outcome |
|---|---|---|
| FR-8 | Searchable Italian location codes (states/communes) with autocomplete | Efficient data entry for staff |
| FR-9 | Searchable citizenship codes with autocomplete | Efficient driver data entry |
| FR-10 | Payment, vehicle, and document type lookups from CARGOS | Ensures valid code selection |
4.4 Submission Workflow
| ID | Requirement | Business Outcome |
|---|---|---|
| FR-11 | Three-tab submission form (Contract/Vehicle, Client, completion indicators) | Clear data organization for staff |
| FR-12 | Pre-populate form from order, driver, and office data | Minimizes manual data entry |
| FR-13 | Auto-match province codes from addresses where possible | Reduces data entry errors |
| FR-14 | Enforce CARGOS character and format restrictions | Prevents validation failures |
| FR-15 | Display Terms of Use in 12 languages | Legal compliance across user base |
4.5 Validation and Submission
| ID | Requirement | Business Outcome |
|---|---|---|
| FR-16 | Check mode validates without creating official record | Staff can fix errors before official submission |
| FR-17 | Send mode requires successful Check first | Prevents submission of invalid data |
| FR-18 | Store complete submission record with timestamp | Audit trail for compliance verification |
| FR-19 | Idempotent resubmission (same order doesn’t duplicate) | Safe correction workflow |
4.6 Error Handling
| ID | Requirement | Business Outcome |
|---|---|---|
| FR-20 | Clear error messages for missing credentials/drivers/mapping | Staff can resolve issues independently |
| FR-21 | Field-level validation error highlighting | Targeted corrections without confusion |
| FR-22 | Network failure recovery with retry option | Resilient operation |
| FR-23 | Error logging for technical support | Efficient issue resolution |
5. Business Rules
| Rule | Description | Consequence of Violation |
|---|---|---|
| BR-1 | All Italian rental contracts must be reported to CARGOS | Legal penalties, business suspension risk |
| BR-2 | Reports must be submitted before or shortly after checkout | Regulatory non-compliance |
| BR-3 | CARGOS production API is used for all operations (no sandbox) | Check mode calls live system |
| BR-4 | At least one driver (primary) required per submission | Submission blocked |
| BR-5 | Office must have complete CARGOS agency mapping | Submission blocked for that office |
| BR-6 | Encrypted credentials never displayed unmasked | Security 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
| Dependency | Required Capability |
|---|---|
| Multi-tenant Architecture | Company and tenant isolation |
| Client Management | Client data for contract holder |
| Order/Reservation System | Order and driver data for submission |
7.2 External Dependencies
| System | Purpose | Risk Mitigation |
|---|---|---|
| CARGOS API (Italian State Police) | Rental contract reporting | Monitor API availability, error handling |
| Vercel Edge Config | Credential encryption key | Ensure key availability in production |
| Sentry | Error tracking | Monitor for submission failures |
7.3 Depended By
- None (optional compliance feature specific to Italian market)
8. Glossary
| Term | Definition |
|---|---|
| CARGOS | Car Renter Guardian Operation System - Italian State Police rental reporting system |
| Check Mode | Validation submission that tests data without creating official record |
| Send Mode | Production submission that creates official CARGOS report |
| Agency (AGENZIA) | Rental company office in CARGOS terminology |
| CONTRATTO | Rental contract/agreement |
| CONDUCENTE | Driver authorized to operate rental vehicle |
| CONTRAENTE | Contract holder (primary driver who signed agreement) |
| Fixed-Width Format | Data 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.