Skip to content

Curfew Limit API Developer Guide

Service Overview

Curfew Service is a telematics-based function that applies US minor (16-17 years old) temporary permit driver late-night driving restriction policy to vehicle services to monitor and control vehicle usage during specific time periods.

Service Features

  • Automatic detection of late-night vehicle driving
  • Time-based vehicle usage restriction policy
  • Guardian/administrator real-time alerts
  • Vehicle engine control function (optional)
  • Enhanced safety for young drivers
  • Compliance with US regional Curfew-related regulations
  • Driver prior consent required
  • Compliance with personal and location information protection
  • Prohibition of forced engine shutdown during driving

Key Scenarios

Scenario 1: Curfew Policy Setting

API Flow by Entity:

📱 App (User):

  1. Set Policy: Set specific day/time period curfew rules
  2. Query Policy: Verify currently configured curfew policy
  3. Set Exception: Temporary curfew release

🚗 Vehicle (TCU):

  1. Engine Event Transmission: Transmit engine start events to ECARUS
  2. Status Report: Report current vehicle usage status during curfew hours

🏢 Call Center:

  1. Violation Monitoring: Real-time violation monitoring
  2. History Query: Query violation history

Key Features

App Features

Call Center Features

Sequence Diagram

Curfew System Flow

Curfew

Platform Integration Considerations

Time Determination Logic

Vehicle Control Method

Driver Identification

  • Apply vehicle-level policy when digital key not used
  • Apply policy based on time only
  • Individual driver identification not possible

Permission Management

API Endpoints

Refer to the Common API Specifications for headers, response codes, and error formats.

Curfew Policy

Curfew Policy Query

bash
curl -X GET "https://api.ecarus.run/api/v1/childcare/vehicles/KMHSH81C7LU123456/curfew/policy" \
     -H "Authorization: Bearer sk_4f9c7b8e2d1a6c0f3e7a9b5d8c1e4f2a7c6d9e0b3f5a8c1d4e7f9b2c6a1e3d"

Curfew Policy Setting

bash
curl -X PUT "https://api.ecarus.run/api/v1/childcare/vehicles/KMHSH81C7LU123456/curfew/policy" \
     -H "Authorization: Bearer sk_4f9c7b8e2d1a6c0f3e7a9b5d8c1e4f2a7c6d9e0b3f5a8c1d4e7f9b2c6a1e3d" \
     -H "Content-Type: application/json" \
     -d '{
           "enabled": true,
           "timezone": "Asia/Seoul",
           "days": ["monday", "wednesday", "friday"],
           "timeWindow": {"start": "21:00", "end": "07:00"},
           "actions": ["notification"]
         }'

Curfew Statistics Query

bash
curl -X GET "https://api.ecarus.run/api/v1/childcare/vehicles/KMHSH81C7LU123456/curfew/statistics?period=30d" \
     -H "Authorization: Bearer sk_4f9c7b8e2d1a6c0f3e7a9b5d8c1e4f2a7c6d9e0b3f5a8c1d4e7f9b2c6a1e3d"

Curfew Monitoring and Exception Handling

Curfew Violation History Query

bash
curl -X GET "https://api.ecarus.run/api/v1/childcare/vehicles/KMHSH81C7LU123456/curfew/violations?limit=10&offset=0" \
     -H "Authorization: Bearer sk_4f9c7b8e2d1a6c0f3e7a9b5d8c1e4f2a7c6d9e0b3f5a8c1d4e7f9b2c6a1e3d"

Curfew Exception Setting

bash
curl -X POST "https://api.ecarus.run/api/v1/childcare/vehicles/KMHSH81C7LU123456/curfew/exception" \
     -H "Authorization: Bearer sk_4f9c7b8e2d1a6c0f3e7a9b5d8c1e4f2a7c6d9e0b3f5a8c1d4e7f9b2c6a1e3d" \
     -H "Content-Type: application/json" \
     -d '{"reason": "After-school program ended late", "startTime": "2026-03-06T21:00:00Z", "endTime": "2026-03-06T23:00:00Z"}'

Curfew Exception List Query

bash
curl -X GET "https://api.ecarus.run/api/v1/childcare/vehicles/KMHSH81C7LU123456/curfew/exceptions?status=active" \
     -H "Authorization: Bearer sk_4f9c7b8e2d1a6c0f3e7a9b5d8c1e4f2a7c6d9e0b3f5a8c1d4e7f9b2c6a1e3d"

Curfew Real-time Event Reception (SSE)

Note: Recommend accessing via browser or using dedicated SSE client

bash
curl -N -H "Authorization: Bearer sk_4f9c7b8e2d1a6c0f3e7a9b5d8c1e4f2a7c6d9e0b3f5a8c1d4e7f9b2c6a1e3d" \
     "https://api.ecarus.run/api/v1/childcare/vehicles/KMHSH81C7LU123456/curfew/events"

Data Models

Curfew Policy Setting

json
{
  "enabled": true,
  "timezone": "Asia/Seoul",
  "days": ["monday", "wednesday", "friday"],
  "timeWindow": {
    "start": "21:00",
    "end": "07:00"
  },
  "actions": ["notification"]
}

Curfew Violation Event

json
{
  "violationId": "vio_001",
  "vin": "KMHSH81C7LU123456",
  "timestamp": "2026-02-10T22:15:00Z",
  "severity": "MEDIUM",
  "location": {
    "latitude": 37.5665,
    "longitude": 126.9780,
    "address": "2 Taepyeong-ro, Jung-gu, Seoul"
  },
  "duration": 45,
  "resolved": false
}

Curfew Policy Response

json
{
  "enabled": true,
  "timezone": "Asia/Seoul",
  "days": ["monday", "wednesday", "friday"],
  "timeWindow": {
    "start": "21:00",
    "end": "07:00"
  },
  "actions": ["notification"],
  "exceptions": [
    {
      "exceptionId": "exc_001",
      "reason": "After-school program ended late",
      "startTime": "2026-03-06T21:00:00Z",
      "endTime": "2026-03-06T23:00:00Z",
      "status": "active"
    }
  ],
  "statistics": {
    "totalViolations": 5,
    "thisMonth": 2,
    "lastMonth": 3
  },
  "createdAt": "2026-01-10T10:00:00Z",
  "updatedAt": "2026-02-10T22:15:00Z"
}

Curfew Exception Setting

json
{
  "reason": "After-school program ended late",
  "startTime": "2026-03-06T21:00:00Z",
  "endTime": "2026-03-06T23:00:00Z"
}

Curfew Exception List

json
{
  "exceptions": [
    {
      "exceptionId": "exc_001",
      "reason": "After-school program ended late",
      "startTime": "2026-03-06T21:00:00Z",
      "endTime": "2026-03-06T23:00:00Z",
      "status": "active",
      "createdAt": "2026-03-06T20:30:00Z"
    },
    {
      "exceptionId": "exc_002",
      "reason": "Family emergency",
      "startTime": "2026-03-05T22:00:00Z",
      "endTime": "2026-03-05T23:30:00Z",
      "status": "expired",
      "createdAt": "2026-03-05T21:45:00Z"
    }
  ],
  "pagination": {
    "total": 2,
    "limit": 10,
    "offset": 0,
    "hasMore": false
  }
}

Real-time Violation Event (SSE)

json
{
  "eventType": "CURFEW_VIOLATION",
  "violationId": "vio_001",
  "vin": "KMHSH81C7LU123456",
  "timestamp": "2026-02-10T22:15:00Z",
  "severity": "MEDIUM",
  "data": {
    "location": {
      "latitude": 37.5665,
      "longitude": 126.9780,
      "address": "2 Taepyeong-ro, Jung-gu, Seoul"
    },
    "duration": 45,
    "message": "Vehicle detected during curfew hours"
  }
}

Authentication and Security

Authentication Requirements

  • User authentication token required (JWT/OAuth2)
  • Vehicle access permission verification
  • Curfew policy setting permission
  • Driver prior consent verification

Data Security

  • All API communication encrypted with HTTPS/TLS
  • Security measures when transmitting driving data
  • Sensitive driving information stored only on server
  • Time data encryption processing

Privacy Protection

  • Driver prior consent mandatory
  • Personal and location information protection compliance
  • Data collection purpose specification
  • Data retention period policy compliance

Access Control

  • VIN-based vehicle access permission verification
  • User-specific curfew policy access management
  • Violation history access control
  • Exception setting permission management

Exception Handling

  • Time Synchronization Error: Server time and vehicle time synchronization retry
  • Timezone Error: Timezone configuration validation
  • DST Change: Automatic DST handling
  • Time Determination Failure: Fallback to UTC time
  • Engine Control Failure: Vehicle control command retry
  • Control Command Timeout: Control timeout handling
  • Vehicle Communication Error: Vehicle communication retry
  • Safety Violation: Prohibition of dangerous control commands
  • Policy Setting Error: Policy configuration validation
  • Policy Conflict: Multi-policy conflict resolution
  • Policy Application Failure: Policy retry mechanism
  • Exception Setting Error: Exception setting validation
  • Connection Failure: Offline mode support and data storage
  • Slow Response: Loading indicator and timeout handling
  • Server Down: Error message display and retry suggestion

Test Setup

Base URL: https://api.ecarus.run/api/v1/childcare
Authentication Token: sk_4f9c7b8e2d1a6c0f3e7a9b5d8c1e4f2a7c6d9e0b3f5a8c1d4e7f9b2c6a1e3d
Sample VIN: KMHSH81C7LU123456

Use Swagger UI for interactive API testing.

Deployment Considerations

App Store Registration

  • Request driving monitoring permissions
  • Request vehicle control permissions (if applicable)
  • Clear explanation of curfew functionality
  • Driver consent requirement explanation
  • Compliance with US regional Curfew-related regulations
  • Driver prior consent mandatory
  • Compliance with personal and location information protection
  • Prohibition of forced engine shutdown during driving

Time Accuracy

  • Server time synchronization optimization
  • Timezone handling accuracy
  • DST change automatic handling
  • Time determination reliability

Vehicle Control Safety

  • Safe vehicle control command design
  • Emergency situation handling
  • Control command validation
  • Safety protocol compliance

Released under the MIT License.