Skip to content

Delete assignment

DELETE
/assignments/{assignmentId}
curl --request DELETE \
--url https://api-uat.flinkey.de/v3/assignments/1 \
--header 'Authorization: Bearer <token>' \
--header 'Customer-ID: example' \
--header 'flinkey-API-Key: <flinkey-API-Key>'

Purpose

Delete an existing assignment in the selected customer context.

An assignment grants access from a user to a car for a defined time range.

Use this operation to remove an existing access permission.

Assignment deletion is asynchronous.

The API request confirms that the assignment deletion request was accepted.

The final operation result is delivered through webhook.

When to use this operation

Use this operation when the partner backend needs to remove an existing assignment.

Typical situations:

  • ending a booking-related access permission,
  • removing vehicle access from a user,
  • deleting an incorrect assignment,
  • cleaning up test assignments,
  • retiring an access permission after reconciliation.

Before deleting an assignment, the partner backend should have resolved:

  • the correct Customer-ID,
  • the flinkey assignmentId,
  • the intended local assignment state,
  • whether the assignment is still required by a partner process.

Do not treat the assignment deletion as final only because this API operation returned successfully.

Wait for the assignment deleted result webhook before marking the local assignment as deleted.

Validation notes

PROD validation result:

  • DELETE /assignments/{assignmentId} returned 204 No Content without a response body.
  • The configured assignment-deleted webhook received an HTTP POST.
  • The webhook contained checksum, numeric assignmentId, numeric customerId, operationSucceeded and errorMessage.
  • operationSucceeded was true and errorMessage was null in the successful validation.
  • A subsequent assignment lookup confirmed that the assignment was no longer available.

Async behavior

Asynchronous.

The API response does not represent the final assignment deletion result.

The partner backend must wait for the assignment deleted result webhook.

The local assignment should remain in a pending deletion state until the webhook has been processed.

Webhook result

Yes.

This operation produces an assignment deleted result webhook.

The webhook result determines whether assignment deletion succeeded or failed.

Use operationSucceeded from the webhook payload to update the local assignment state.

Security notes

Never log:

  • flinkey-API-Key,
  • bearer token,
  • full request headers.

Assignment identifiers are environment-specific.

Do not mix UAT and PROD 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.

assignmentId
required
number

Database ID of the assignment

Customer-ID
required
string

Customer database ID

Assignment deletion request was accepted

Invalid subscription key or missing / invalid access token

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

API Manager or assignment was not found

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

Server-side error

Recommended handling: Retry later if appropriate and escalate if persistent