Skip to content

Assign car to group

PUT
/groups/{groupId}/cars
curl --request PUT \
--url https://api-uat.flinkey.de/v3/groups/1/cars \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Customer-ID: example' \
--header 'flinkey-API-Key: <flinkey-API-Key>' \
--data '{ "carId": 12345 }'

Purpose

Assign a car to one specific group in the selected customer context.

A group is an entity represented by a group ID.

A group can contain cars, users, services and products.

Use this operation for operational grouping workflows where a car must be added to an existing group.

When to use this operation

Use this operation when the partner backend or operational backend needs to assign a car to a group.

Typical situations:

  • adding a car to an operational group,
  • preparing group-based vehicle administration,
  • grouping vehicles for support workflows,
  • grouping vehicles for setup or reconciliation workflows,
  • correcting group membership after reconciliation,
  • maintaining group-based operational views.

Before assigning a car to a group, the partner backend should have resolved:

  • the correct Customer-ID,
  • the flinkey groupId,
  • the flinkey carId,
  • whether the group exists,
  • whether the car exists,
  • whether the car is already assigned to the group.

For standard access flows, partner backends usually work primarily with Car, User and Assignment.

Group membership is an operational grouping concept and should not be treated as the primary vehicle access permission.

Validation notes

  • PROD returned 204 No Content with an empty response body.
  • A subsequent GET /groups/{groupId}/cars returned the assigned car.
  • After removal, the same GET returned an empty array.

Async behavior

Synchronous.

The group assignment result is represented by 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.

Group and car identifiers are environment-specific.

Do not mix UAT and PROD group IDs or car 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.

groupId
required
integer

Database ID of the group

Customer-ID
required
string

Customer database ID

Media typeapplication/json
object
carId
required

Database ID of the car to assign to the group

number
Example
{
"carId": 12345
}

Car was assigned to the group successfully

Invalid subscription key or missing / invalid access token

Recommended handling: Check flinkey-API-Key, bearer token and environment configuration

API Manager, customer context, group or car was not found

Recommended handling: Check credentials, token context, Customer-ID, local groupId mapping and local carId mapping

The car is already assigned to the group

Recommended handling: Treat as already assigned if this matches the intended state, or reconcile local group-car mapping

Request content type is missing or incorrect

Recommended handling: Ensure Content-Type: application/json is used

Server-side error

Recommended handling: Retry later if appropriate and escalate if persistent