Service Information
Learn how to retrieve service information for bikes from a leasing provider.
The Service Information endpoint allows workshop personnel and dealers to quickly retrieve service and maintenance details for leased bikes. Instead of manually checking different leasing provider portals, this endpoint provides a unified way to access service package information, inspection status, and insurance coverage details.
Note: This endpoint is particularly useful for bicycle workshops that need to verify service coverage and available budgets before performing maintenance work. It eliminates the need to log into multiple leasing provider portals and streamlines the service verification process.
Endpoint
POST /v1/service-information/{leasingproviderslug}
Parameters
leasingproviderslug
(string, required, path)
The unique identifier of the leasing provider (e.g., jobrad
, deutsche-dienstrad
)
x-api-key
(string, required, header)
Your API key for authentication. For more information on API keys, see Authentication
Request Body
The endpoint accepts three different types of queries to find service information. You must use exactly one of these query types in your request:
1. Email Query
{ "query": { "type": "email", "value": "user@example.com" } }
2. Frame Number Query
{ "query": { "type": "frameNumber", "value": "ABC123" } }
3. Customer Information Query
{ "query": { "type": "customer", "firstName": "John", "lastName": "Doe", "postalCode": "12345" } }
Response
Success Response (Status 200
)
Returns a JSON object containing the customer's service information and leasing details.
Example Response
{ "customer": { "firstName": "John", "lastName": "Doe", "email": "john.doe@example.com" }, "leasingDetails": [{ "bike": { "bikeType": "pedelec", "category": "city-bike", "brand": "cube", "model": "Town Sport Hybrid", "size": "50 cm", "color": "black", "year": "2024", "frameNumber": "ABC123XYZ" }, "leasing": { "startDate": "2024-01-01T00:00:00.000Z", "endDate": "2026-01-01T00:00:00.000Z" }, "servicePackage": { "type": "fullService", "budget": { "current": 500.0, "maximum": 500.0, "currency": "EUR" }, "inspections": { "available": 3, "lastDate": "2024-02-01T00:00:00.000Z", "isMandatory": false, "isValid": true, "isActive": true }, "hasExtendedCoverage": true }, "insurance": { "mobilityGuarantee": true, "fullCoverage": true, "wearCoverage": true } }] }
Response Fields
Customer Information
customer
: Basic information about the leasing customerfirstName
: Customer's first namelastName
: Customer's last nameemail
: Customer's email address
Leasing Details
leasingDetails
: Array of leased bikes and their service informationbike
: Bike specificationsbikeType
: Type of bike (bike
,pedelec
,s-pedelec
)category
: Bike category (e.g.,city-bike
,mountain-bike
)brand
: Manufacturermodel
: Model namesize
: Frame sizecolor
: Bike coloryear
: Model yearframeNumber
: Unique frame numberleasing
: Leasing contract informationstartDate
: Start date of the leasing contractendDate
: End date of the leasing contractservicePackage
: Service coverage detailstype
: Service package type (none
,inspection
,fullService
)budget
: Service budget informationcurrent
: Currently available budgetmaximum
: Maximum budgetcurrency
: Currency codeinspections
: Inspection detailsavailable
: Number of remaining inspectionslastDate
: Date of the last inspectionisMandatory
: Whether inspections are mandatoryisValid
: Current validity statusisActive
: Whether the service package is activehasExtendedCoverage
: Extended service coverage statusinsurance
: Insurance coverage detailsmobilityGuarantee
: Mobility guarantee coverage statusfullCoverage
: Full insurance coverage statuswearCoverage
: Wear and tear coverage status
Error Responses
400 Bad Request
– Invalid query format or missing required fields
{ "error": "Invalid query format", "details": [{ "code": "invalid_type", "expected": "string", "received": "undefined", "path": ["value"], "message": "Required" }] }
401 Unauthorized
– Missing or invalid API key
{ "error": "Unauthorized" }
403 Forbidden
– Insufficient permissions
{ "error": "Forbidden" }
404 Not Found
– No service information found for the query
{ "error": "No Service information for user found" }
500 Internal Server Error
– Server error or missing provider credentials
{ "error": "Internal server error", "details": [{ "code": "INTERNAL_ERROR", "field": "unknown", "message": "An unexpected error occurred" }] }
Example Requests
Here are example curl
commands for each query type:
Email Query
curl --location 'https://api.leasingautomation.de/v1/service-information/jobrad' \ --header 'x-api-key: YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --data '{ "query": { "type": "email", "value": "user@example.com" } }'
Frame Number Query
curl --location 'https://api.leasingautomation.de/v1/service-information/jobrad' \ --header 'x-api-key: YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --data '{ "query": { "type": "frameNumber", "value": "ABC123" } }'
Customer Information Query
curl --location 'https://api.leasingautomation.de/v1/service-information/jobrad' \ --header 'x-api-key: YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --data '{ "query": { "type": "customer", "firstName": "John", "lastName": "Doe", "postalCode": "12345" } }'
Interactive API Console
You can also explore and test each endpoint in our OpenAPI/Swagger interactive API console, which provides a hands-on way to examine request/response details in real time.