Update assignment
const url = 'https://api-uat.flinkey.de/v3/assignments/1';const options = { method: 'PATCH', headers: { 'Customer-ID': 'example', 'flinkey-API-Key': '<flinkey-API-Key>', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '[{"op":"replace","path":"/end","value":"2026-01-31T20:00:00Z"}]'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api-uat.flinkey.de/v3/assignments/1 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Customer-ID: example' \ --header 'flinkey-API-Key: <flinkey-API-Key>' \ --data '[ { "op": "replace", "path": "/end", "value": "2026-01-31T20:00:00Z" } ]'Purpose
Update 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 change an existing access permission.
Assignment updates are asynchronous.
The API request confirms that the assignment update 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 update an existing assignment.
Typical situations:
- changing assignment start time,
- changing assignment end time,
- extending or shortening vehicle access,
- changing the assigned car,
- changing the assigned user,
- updating lifetime or renewal behavior,
- correcting assignment data after reconciliation.
Before updating an assignment, the partner backend should have resolved:
- the correct
Customer-ID, - the flinkey
assignmentId, - the intended update operation,
- the expected local assignment state.
Do not treat the assignment update as final only because this API operation returned successfully.
Wait for the assignment updated result webhook before marking the local assignment update as successful.
Validation notes
PROD validation result:
PATCH /assignments/{assignmentId}with a JSON Patchreplaceoperation for/endreturned204 No Contentwithout a response body.- The configured assignment-updated webhook received an HTTP
POSTcontaining the same patch operation inupdateData. - The webhook contained
checksum, numericassignmentId, numericcustomerId,operationSucceeded,errorMessageandupdateData. operationSucceededwastrueanderrorMessagewasnullin the successful validation.- A configured webhook secret was transmitted in the
secretrequest header and was visible to the receiving test endpoint. - A subsequent assignment lookup confirmed that the updated end time was persisted.
Async behavior
Asynchronous.
The API response does not represent the final assignment update result.
The partner backend must wait for the assignment updated result webhook.
The local assignment should remain in a pending update state until the webhook has been processed.
Webhook result
Yes.
This operation produces an assignment updated result webhook.
The webhook result determines whether assignment update 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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Database ID of the assignment
Header Parameters
Section titled “Header Parameters”Customer database ID
Request Bodyrequired
Section titled “Request Bodyrequired”object
Update operation. Allowed values are remove and replace
Assignment field to update
New value for the selected path, or null where applicable
Example
[ { "op": "replace", "path": "/end", "value": "2026-01-31T20:00:00Z" }]Responses
Section titled “Responses”Assignment update request was accepted
Invalid subscription key or missing / invalid access token
Recommended handling: Check flinkey-API-Key, bearer token and environment configuration
API Manager was not found
Recommended handling: Check credentials, token context and Customer-ID
Server-side error
Recommended handling: Retry later if appropriate and escalate if persistent
