Assignments¶
Info
Please find the assignment definition here.
Get assignment¶
Tip
The returned data can be manipulated using OData.
Name | Type | Location | Description |
---|---|---|---|
flinkey-API-Key | string | header | Required. API key which provides access to this API. |
Authorization | string | header | Required. The bearer token. |
Customer-ID | integer | header | Required. The database ID of the customer. |
assignmentId | integer | path | Required. The database ID of the assignment. |
200 OK
{
"type": "object",
"properties": {
"id": {
"type": "number",
"format": "int32"
},
"carId": {
"type": "number",
"format": "int32"
},
"userId": {
"type": [
"number",
"null"
],
"format": "int32"
},
"start": {
"type": "string",
"format": "date-time"
},
"end": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"lifetime": {
"type": [
"number",
"null"
],
"format": "int32"
},
"renewableAfter": {
"type": [
"number",
"null"
],
"format": "int32"
}
}
}
401 UNAUTHORIZED
{
"statusCode": 401,
"message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription."
}
{
"statusCode": 401,
"message": "Unauthorized. Access token is missing or invalid."
}
404 NOT FOUND
Unable to find a manager for the given OAuth ID claim data.
Unable to find an assignment for the given assignmentId.
500 INTERNAL SERVER ERROR
Internal server error.
Get assignments of car¶
Tip
The returned data can be manipulated using OData.
Name | Type | Location | Description |
---|---|---|---|
flinkey-API-Key | string | header | Required. API key which provides access to this API. |
Authorization | string | header | Required. The bearer token. |
Customer-ID | integer | header | Required. The database ID of the customer. |
carId | integer | path | Required. The database ID of the car. |
200 OK
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "number",
"format": "int32"
},
"userId": {
"type": [
"number",
"null"
],
"format": "int32"
},
"start": {
"type": "string",
"format": "date-time"
},
"end": {
"type": [
"string",
"null"
],
"format": "date-time"
}
}
}
}
401 UNAUTHORIZED
{
"statusCode": 401,
"message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription."
}
{
"statusCode": 401,
"message": "Unauthorized. Access token is missing or invalid."
}
404 NOT FOUND
Unable to find a manager for the given OAuth ID claim data.
Unable to find a car for the given carId which is assigned to the given customerId.
500 INTERNAL SERVER ERROR
Internal server error.
Get assignments of user¶
Tip
The returned data can be manipulated using OData.
Name | Type | Location | Description |
---|---|---|---|
flinkey-API-Key | string | header | Required. API key which provides access to this API. |
Authorization | string | header | Required. The bearer token. |
Customer-ID | integer | header | Required. The database ID of the customer. |
userId | integer | path | Required. The database ID of the user. |
200 OK
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "number",
"format": "int32"
},
"carId": {
"type": [
"number",
"null"
],
"format": "int32"
},
"start": {
"type": "string",
"format": "date-time"
},
"end": {
"type": [
"string",
"null"
],
"format": "date-time"
}
}
}
}
401 UNAUTHORIZED
{
"statusCode": 401,
"message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription."
}
{
"statusCode": 401,
"message": "Unauthorized. Access token is missing or invalid."
}
404 NOT FOUND
Unable to find a manager for the given OAuth ID claim data.
Unable to find an user for the given userId which is assigned to the given customerId.
500 INTERNAL SERVER ERROR
Internal server error.
Create assignment¶
Info
Assignments are set asynchronously. You will receive the response of the operation via webhook.
Info
The format of start
and end
is: yyyy-MM-ddTHH:mm:ssZ
Info
The structure of lifetime
and renewableAfter
is: renewableAfter
< lifetime
lifetime
> 604800 (7 days)
lifetime
< 2419200 (28 days)
Info
The default values of lifetime
is 604800 (7 days) and of renewableAfter
is half of lifetime
Info
You could create an unrestricted assignment. If you want to do this set the value of end
to null
.
Info
This API endpoint supports webhooks. More detailed information could be found here.
Name | Type | Location | Description |
---|---|---|---|
flinkey-API-Key | string | header | Required. API key which provides access to this API. |
Authorization | string | header | Required. The bearer token. |
Customer-ID | integer | header | Required. The database ID of the customer. |
Content-Type | string | header | Required. The content type of the request. Value: application/json |
{
"type": "object",
"properties": {
"carId": {
"type": "number",
"format": "int32"
},
"userId": {
"type": "number",
"format": "int32"
},
"start": {
"type": "string",
"format": "date-time"
},
"end": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"lifetime": {
"type": [
"number",
"null"
],
"format": "int32"
},
"renewableAfter": {
"type": [
"number",
"null"
],
"format": "int32"
}
}
}
204 NO CONTENT
401 UNAUTHORIZED
{
"statusCode": 401,
"message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription."
}
{
"statusCode": 401,
"message": "Unauthorized. Access token is missing or invalid."
}
404 NOT FOUND
Unable to find a manager for the given OAuth ID claim data.
415 UNSUPPORTED MEDIA TYPE
{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.13",
"title": "Unsupported Media Type",
"status": "415",
"traceId": "<traceId>"
}
429 TO MANY REQUESTS
{
"status": "429",
"message": "Rate limit is exceeded. Try again in x seconds."
}
500 INTERNAL SERVER ERROR
Internal server error.
Update assignment¶
Info
Assignments are updated asynchronously. You will receive the response of the operation via webhook.
Info
The format of start
and end
is: yyyy-MM-ddTHH:mm:ssZ
Info
The structure of lifetime
and renewableAfter
is: renewableAfter
< lifetime
lifetime
> 604800 (7 days)
lifetime
< 2419200 (28 days)
Info
The default values of lifetime
is 604800 (7 days) and of renewableAfter
is half of lifetime
Info
You could create an unrestricted assignment. If you want to do this set the value of end
to null
.
Info
This API endpoint supports webhooks. More detailed information could be found here.
Name | Type | Location | Description |
---|---|---|---|
flinkey-API-Key | string | header | Required. API key which provides access to this API. |
Authorization | string | header | Required. The bearer token. |
Customer-ID | integer | header | Required. The database ID of the customer. |
Content-Type | string | header | Required. The content type of the request. Value: application/json |
assignmentId | integer | path | Required. The database ID of the assignment. |
{
"type": "array",
"items": {
"type": "object",
"properties": {
"op": {
"type": "string",
"enum": [
"remove",
"replace"
]
},
"path": {
"type": "string",
"enum": [
"/carId",
"/userId",
"/start",
"/end",
"/lifetime",
"/renewableAfter"
]
},
"value": {
"type": [
"string",
"null"
]
}
}
}
}
204 NO CONTENT
401 UNAUTHORIZED
{
"statusCode": 401,
"message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription."
}
{
"statusCode": 401,
"message": "Unauthorized. Access token is missing or invalid."
}
404 NOT FOUND
Unable to find a manager for the given OAuth ID claim data.
415 UNSUPPORTED MEDIA TYPE
{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.13",
"title": "Unsupported Media Type",
"status": "415",
"traceId": "<traceId>"
}
500 INTERNAL SERVER ERROR
Internal server error.
Delete assignment¶
Info
Assignments are deleted asynchronously. You will receive the response of the operation via webhook.
Info
This API endpoint supports webhooks. More detailed information could be found here.
Name | Type | Location | Description |
---|---|---|---|
flinkey-API-Key | string | header | Required. API key which provides access to this API. |
Authorization | string | header | Required. The bearer token. |
Customer-ID | integer | header | Required. The database ID of the customer. |
assignmentId | integer | path | Required. The database ID of the assignment. |
204 NO CONTENT
401 UNAUTHORIZED
{
"statusCode": 401,
"message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription."
}
{
"statusCode": 401,
"message": "Unauthorized. Access token is missing or invalid."
}
404 NOT FOUND
Unable to find a manager for the given OAuth ID claim data.
500 INTERNAL SERVER ERROR
Internal server error.