auto.cc API
Complete REST API for the Auto China Connect platform — service, sales, accounting, vehicle management, AI assistants, and image generation for Chinese electric vehicles in Europe.
Overview
The auto.cc API is composed of two backends served under a unified domain:
| Backend | Stack | Path | Purpose |
|---|---|---|---|
| Dashboard API | Node.js / Express | /api/* | Core platform: auth, sales, accounting, vehicles, AI, wallets |
| Client API | NestJS / Prisma | /api/* | Client portal: orders, configurations, payments, public forms |
| Image Studio | Python / Flask | /studio/* | Photo processing & AI image generation for car listings |
All requests use JSON (application/json) unless otherwise noted. File uploads use multipart/form-data.
Supported Brands
Xiaomi (SU7 Max, SU7 Ultra, YU7), Zeekr (001, 9X), BYD (Seal 05 DM-i), Avatr (12), Li Auto (L6), Jetour (T2 i-DM, G700), Maextro (S800)
Supported Markets
DE, AT, CH, FR, IT, ES, PT, NL, BE, FI, GR, IE, SK, SI, LU, AE (UAE). Currencies: EUR, AED.
Authentication
All authenticated endpoints require a JWT Bearer token in the Authorization header:
Authorization: Bearer <token>
Tokens are issued by POST /api/login (Dashboard API) or POST /api/auth/login (Client API). They use HS256 signing and expire after 8 hours.
Token Payload (Dashboard API)
{
"username": "john.doe",
"department": "Sales",
"role": "admin",
"iat": 1774880047,
"exp": 1774908847
}
Authorization Levels
| Level | Badge | Who Qualifies |
|---|---|---|
| Public | Public | No token required |
| Auth Required | Auth | Any valid token |
| Sales Access | Sales | department = "Sales" or role = "admin" |
| Accounting | Accounting | department = "Accounting" or role = "admin" |
| Admin | Admin | role = "admin" |
Permissions Object
The login response includes a permissions object. Admins get all permissions:
{
"service": true,
"sales": true,
"logistics": true,
"accounting": true
}
Error Handling
Errors are returned as JSON with an error field:
{ "error": "Invalid credentials." }
| Status | Meaning |
|---|---|
| 400 | Bad request — missing or invalid parameters |
| 401 | Unauthorized — missing, expired, or invalid JWT token |
| 403 | Forbidden — valid token but insufficient role/department |
| 404 | Not found — resource does not exist |
| 413 | Payload too large — upload exceeds limit |
| 429 | Rate limited — too many requests |
| 500 | Internal server error |
| 503 | Service unavailable — AI assistant not configured |
Login
Authenticate and receive a JWT token.
Request
{
"username": "john.doe",
"password": "secret",
"department": "Sales"
}
All three fields are required. department must be one of: Service, Sales, Logistics, Accounting.
Response
{
"token": "eyJhbGciOiJIUzI1NiIs...",
"user": {
"username": "john.doe",
"role": "admin",
"department": "Sales",
"permissions": { "service": true, "sales": true, "logistics": true, "accounting": true }
}
}
Errors
400— Missing username, password, or department401— Invalid credentials403— Account pending approval
Verify & Logout
User Management
Admin-only CRUD for platform user accounts.
Leads (CRM)
Sales leads synced with Close.com CRM. All endpoints require Sales department access.
Deals
Sales deals with pipeline tracking, value, and analytics.
Sales Orders
Test Drives
Test drive booking with Stripe payments, calendar scheduling, SMS/email confirmations.
Test Drive Pricing
Prices per model (in EUR cents): SU7 Max: 9900, SU7 Ultra: 14900, YU7: 9900, Zeekr 001: 7900, Zeekr 9X: 14900, BYD Seal 05: 4900, Avatr 12: 9900, Li Auto L6: 7900, Jetour T2: 5900, Jetour G700: 9900, Maextro S800: 19900.
Vehicle Pipeline
End-to-end vehicle import pipeline from order to delivery, with Kanban board and full audit history.
Pipeline Status Flow
order_received → order_confirmed → supplier_ordered → in_production → ready_for_export → in_transit → customs_clearance → at_hub → delivered → completed
Additional: cancelled, on_hold
Unified Customer Profile
Multi-source customer deduplication engine (Close.com, Lexoffice, Stripe, Postgres, Configurator). Includes AI-powered duplicate detection with Claude review.
Customer Sync Sources
Invoices
All accounting endpoints require Accounting department access or Admin role.
Expenses & Documents
Banking (CAMT52 & CSV)
Import and reconcile bank transactions from CAMT52 XML, CSV statements, or manual upload.
Lexoffice Integration
Intercompany Invoicing
DATEV Export
Vehicle Inventory
Tax & Registration Documents
Repair Manuals
DRM-protected repair manual viewer. PDFs are stored on S3 and rendered server-side as watermarked PNG pages (per-user watermark with username).
Parts Catalog
Parts Orders
Remote Diagnostics
Service Chat (RAG)
Claude-powered AI technical assistant with Retrieval-Augmented Generation. Searches repair manuals and parts catalogs via tool-use loop (up to 5 rounds).
Request
{
"messages": [
{ "role": "user", "content": "How do I replace the brake pads on the Xiaomi SU7 Max?" }
],
"vehicle": "Xiaomi SU7 Max",
"brand": "Xiaomi",
"model": "SU7 Max",
"vin": "LSJ..."
}
Response
{
"reply": "To replace the brake pads on the Xiaomi SU7 Max...",
"sources": [
{ "manual": "SU7-Max-Brake-System", "s3Key": "manuals/xiaomi/su7max/...", "page": 42, "brand": "Xiaomi", "model": "SU7 Max" }
],
"parts": [
{ "partId": "SU7-BP-F01", "description": "Front brake pad set", "category": "Brakes" }
],
"usage": { "input_tokens": 1234, "output_tokens": 567 },
"toolCalls": 2
}
Model: claude-sonnet-4-20250514 with manual search, parts search, and page context tools.
Sales Agent
Claude-powered public-facing sales agent for vehicle inquiries, pricing, and lead capture. Available with or without authentication (rate-limited for anonymous users).
Request
{
"messages": [
{ "role": "user", "content": "What's the price of a Xiaomi SU7 Max in Germany?" }
],
"sessionId": "abc123"
}
Response
{
"reply": "The Xiaomi SU7 Max starts at...",
"usage": { "input_tokens": 800, "output_tokens": 300 },
"toolCalls": 1
}
Model: claude-sonnet-4-20250514 with sales-specific tools.
Wallet
Internal credit system. Used for parts orders (25 EUR fee) and remote diagnostics (75 EUR fee). Top-up via Stripe.
Push Notifications
Push notification management via OneSignal.
Companies
Mail, SMS & OTP
Admin & Server
Stripe Webhooks
Handles checkout.session.completed events for wallet top-ups and test drive payments. Automatically marks test drives as paid, sends confirmation email/SMS, and notifies sales team via push.
Authentication: Stripe webhook signature verification (not JWT).
Content
Image Studio — Upload & Process
Base URL: https://auto.cc/studio. Separate Flask backend for car listing image processing.
Auth for Image Studio
Image Studio uses the same JWT tokens. Additionally supports ?token= query param for <img> tags. AI endpoints require Sales access.
Image Studio — AI Generation
Generate photorealistic showroom images using Kling AI (text-to-image and image-to-image).
Detailed Image Studio Docs
For complete Image Studio documentation including request/response formats, background presets, SU7 color options, AI view templates, and processing parameters, see /studio/docs.
Image Studio — Reference
Background Presets
| Preset | Description |
|---|---|
| showroom_white | Clean white showroom with grey floor |
| showroom_dark | Dramatic dark showroom |
| studio_grey | Neutral studio grey |
| outdoor_warm | Warm outdoor sky-to-ground |
| premium_black | Premium deep black |
AI View Templates
| Key | Angle |
|---|---|
| exterior_front_34 | Front three-quarter |
| exterior_side | Full side profile |
| exterior_rear_34 | Rear three-quarter |
| exterior_rear | Direct rear |
| interior_dashboard | Dashboard from driver door |
| interior_rear_seats | Rear seats from B-pillar |
SU7 Color Options
| Name | Hex | |
|---|---|---|
| Aqua Blue | #3A7CA5 | |
| Olive Green | #5C6B3C | |
| Midnight Purple | #3B2D4F | |
| Titanium Silver | #A8A9AD | |
| Pearl White | #F0EDE8 | |
| Black | #1A1A1A | |
| Red | #8B1A1A |
Client API — Auth
Separate NestJS API for the client-facing portal (vehicle ordering, configurator, financing). Uses cookie-based auth with access_token cookie + JWT Bearer header.
Client Portal
All endpoints require client authentication.
Admin (NestJS)
Admin role required for all endpoints.
Public Forms
All endpoints require reCAPTCHA token. No authentication needed.
Data & Inventory
Public/optional-auth endpoints for vehicle inventory browsing and XTool device management.
Webhooks
Inbound webhooks from payment providers and external services. Signature verification replaces JWT auth.
User Management (NestJS)
Admin-only. Uses Prisma ORM with PostgreSQL.
auto.cc API — Auto China GmbH, Am Karlsplatz 3, 80335 Munich, Germany
Contact: [email protected] · auto.cc · VAT: DE352011127