Skip to content

Users

Info

Person or entity, represented by a user ID, who is considered to have access to different cars.

Get users

GET /users

Tip

The returned data can be manipulated using OData.

Request parameters

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.

Response

200 OK

{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "number",
        "format": "int32"
      },
      "emailAddress": {
        "type": "string"
      },
      "userData": {
        "type": "object",
        "properties": {
          "firstName": {
            "type": [
              "string",
              "null"
            ]
          },
          "lastName": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    }
  }
}

Response

401 UNAUTHORIZED

Access denied due to invalid subscription key. 
Make sure to provide a valid key for an active subscription.
{
  "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."
} 

Response

404 NOT FOUND

Unable to find a manager for the given OAuth ID claim data.

Response

500 INTERNAL SERVER ERROR

Internal server error.

Get user

GET /users/{userId}

Tip

The returned data can be manipulated using OData.

Request parameters

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.

Response

200 OK

{
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "format": "int32"
    },
    "emailAddress": {
      "type": "string"
    },
    "userData": {
      "type": "object",
      "properties": {
        "firstName": {
          "type": [
            "string",
            "null"
          ]
        },
        "lastName": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    }
  }
}

Response

401 UNAUTHORIZED

Access denied due to invalid subscription key. 
Make sure to provide a valid key for an active subscription.
{
  "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."
} 

Response

404 NOT FOUND

Unable to find a manager for the given OAuth ID claim data.
Unable to find a user for the given userId which is assigned to the given customerId.

Response

500 INTERNAL SERVER ERROR

Internal server error.

Create user

PUT /users

Info

Anonymous users can not sign in to the flinkey App for Android and iOS.

Request parameters

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

Request body

{
  "type": "object",
  "properties": {
    "emailAddress": {
      "type": "string"
    },
    "userData": {
      "type": "object",
      "properties": {
        "firstName": {
          "type": "string"
        },
        "lastName": {
          "type": "string"
        }
      }
    },
    "password": {
      "type": [
        "string",
        "null"
      ]
    },
    "type": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "Normal",
        "Anonymous"
      ],
      "default": "Anonymous"
    }
  },
  "required": [
    "emailAddress",
    "userData"
  ]
}

Response

201 CREATED

{
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "format": "int32"
    },
    "password": {
      "type": [
        "string",
        "null"
      ]
    }
  }
}

Response

400 BAD REQUEST

Couldn't create user. No e-mail address provided.
Couldn't create user. No userData provided.
Couldn't create user. No firstName and lastName provided.
Couldn't create user. No firstName provided.
Couldn't create user. No lastName provided.

Response

401 UNAUTHORIZED

Access denied due to invalid subscription key. 
Make sure to provide a valid key for an active subscription.
{
  "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."
} 

Response

404 NOT FOUND

Unable to find a manager for the given OAuth ID claim data.

Response

409 CONFLICT

A user with the given e-mail address already exists.

Response

415 UNSUPPORTED MEDIA TYPE

{
  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.13",
  "title": "Unsupported Media Type",
  "status": "415",
  "traceId": "<traceId>"
}

Response

500 INTERNAL SERVER ERROR

Internal server error.

Assign user to customer

PUT /users/assignments/customers

Request parameters

Name Type Location Description

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

Request body

{
  "type": "object",
  "properties": {
    "emailAddress": {
      "type": [
        "string",
        "null"
      ]
    },
    "userId": {
      "type": [
        "number",
        "null"
      ],
      "format": "int32"
    }
  }
}

Response

204 NO CONTENT

Response

400 BAD REQUEST

Invalid e-mail address and userId given. Please provide one valid parameter.

Response

401 UNAUTHORIZED

Access denied due to invalid subscription key. 
Make sure to provide a valid key for an active subscription.
{
  "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."
} 

Response

404 NOT FOUND

Unable to find a manager for the given OAuth ID claim data.
Unable to find a user for the given userId and e-mail address parameters.

Response

409 CONFLICT

Could not assign user to customer because the user is already assigned to the customer.

Response

415 UNSUPPORTED MEDIA TYPE

{
  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.13",
  "title": "Unsupported Media Type",
  "status": "415",
  "traceId": "<traceId>"
}

Response

500 INTERNAL SERVER ERROR

Internal server error.

Unassign user from customer

DELETE /users/assignments/customers

Request parameters

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

Request body

{
  "type": "object",
  "properties": {
    "emailAddress": {
      "type": [
        "string",
        "null"
      ]
    },
    "userId": {
      "type": [
        "number",
        "null"
      ],
      "format": "int32"
    }
  }
}

Response

204 NO CONTENT

Response

400 BAD REQUEST

Invalid e-mail address and userId given. Please provide one valid parameter.

Response

401 UNAUTHORIZED

Access denied due to invalid subscription key. 
Make sure to provide a valid key for an active subscription.
{
  "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."
} 

Response

404 NOT FOUND

Unable to find a manager for the given OAuth ID claim data.
Unable to find an user for the given userId and e-mail address parameters.
Could not delete the assignment because it does not exist.

Response

415 UNSUPPORTED MEDIA TYPE

{
  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.13",
  "title": "Unsupported Media Type",
  "status": "415",
  "traceId": "<traceId>"
}

Response

500 INTERNAL SERVER ERROR

Internal server error.