Get assignments of user
const url = 'https://api-uat.flinkey.de/v3/users/1/assignments';const options = { method: 'GET', headers: { 'Customer-ID': 'example', 'flinkey-API-Key': '<flinkey-API-Key>', Authorization: 'Bearer <token>' }};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api-uat.flinkey.de/v3/users/1/assignments \ --header 'Authorization: Bearer <token>' \ --header 'Customer-ID: example' \ --header 'flinkey-API-Key: <flinkey-API-Key>'Purpose
Retrieve assignments for one specific user in the selected customer context.
An assignment grants access from a user to a car for a defined time range.
Use this operation to inspect which assignments exist for a specific user.
The returned assignment data can be used for reconciliation, support workflows or backend state validation.
When to use this operation
Use this operation when the partner backend needs to retrieve assignments related to one specific flinkey user.
Typical situations:
- checking which cars a user currently has access to,
- validating assignment state for a user,
- troubleshooting mobile access for a specific user,
- troubleshooting assignment creation,
- reconciling partner customer or driver access records with flinkey assignment records,
- inspecting assignment start and end times for a user.
In most integrations, the partner backend should persist a mapping between the partner customer or driver and the flinkey userId.
Use the mapped userId to retrieve assignments for the correct flinkey user.
Do not create new assignments before checking whether the intended access already exists, if duplicate access would cause operational issues.
Validation notes
PROD validation result:
GET /users/{userId}/assignmentswas successfully executed withflinkey-API-Key,Authorization: Bearer {{accessToken}}andCustomer-ID.- The response is an array.
idis returned as number.carIdis returned as number.startis returned as UTC timestamp string.endmay benull.lifetimeis returned as number when provided.renewableAftermay be a number ornull.- The response model does not include
userId; the user context is defined by the path parameter. $top,$skip,$filterand$orderbyare supported.$selectis not supported by the flinkey API and must not be used.- No default response order should be assumed; use
$orderbywhen order matters.
Async behavior
Synchronous.
The assignments are returned directly in the API response.
Webhook result
No.
This operation does not produce a webhook result.
Security notes
Never log:
flinkey-API-Key,- bearer token,
- full request headers.
User and assignment identifiers are environment-specific.
Do not mix UAT and PROD user IDs or assignment IDs.
Use placeholders in documentation, examples, screenshots and AI prompts.
For standard partner integrations, the mobile app must not receive API Manager credentials, backend bearer tokens or the flinkey-API-Key.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Database ID of the user
Header Parameters
Section titled “Header Parameters”Customer database ID
Responses
Section titled “Responses”Assignments of the user were retrieved successfully
object
Assignment database ID
Car database ID assigned to the user
Assignment start time as UTC timestamp
Assignment end time as UTC timestamp, or null for open-ended access
Assignment lifetime in seconds, if provided
Renewal-related value returned by the API, if applicable
Example
[ { "id": 10001, "carId": 20001, "start": "2026-01-31T10:00:00.000Z", "end": null, "lifetime": 604800, "renewableAfter": null }, { "id": 10002, "carId": 20002, "start": "2026-02-01T08:00:00.000Z", "end": "2026-02-01T18:00:00.000Z", "lifetime": 604800, "renewableAfter": null }]Invalid subscription key or missing / invalid access token
Recommended handling: Check flinkey-API-Key, bearer token and environment configuration
API Manager, customer context or user assignment data was not found
Recommended handling: Check credentials, Customer-ID and local userId mapping
Server-side error
Recommended handling: Retry later if appropriate and escalate if persistent
