Skip to content

Assign service to group

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

Purpose

Assign a service 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 service 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 service to a group.

Typical situations:

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

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

  • the correct Customer-ID,
  • the flinkey groupId,
  • the flinkey serviceId,
  • whether the group exists,
  • whether the service exists,
  • whether the service 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 body. A control GET returned the assigned service; after removal it 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 service identifiers are environment-specific.

Do not mix UAT and PROD group IDs or service 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
serviceId
required

Database ID of the service to assign to the group

number
Example
{
"serviceId": 11111
}

Service 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 service was not found

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

The service is already assigned to the group

Recommended handling: Treat as already assigned if this matches the intended state, or reconcile local group-service 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