CloudFlow Client API API Reference

CloudFlow enables clients to initiate online requests to a connected payment device.

Contact: info@aevi.com
Request Content-Types: application/json
Response Content-Types: application/json
Version: 1

Authentication

apiToken

type
http
scheme
bearer
bearerFormat
base64({"accountId": "Your CloudFlow account id", "apiToken": "Your CloudFlow account API token"})

Paths

GET /token

Retrieve credentials to connect via a websocket.

401 Unauthorized
403 Forbidden
Response Content-Types: application/json
Response Example (200 OK)
{
  "connectionType": "string",
  "connectionUrl": "string",
  "tokenType": "string",
  "accessToken": "string"
}
Response Example (401 Unauthorized)
{
  "errorCode": "string",
  "errorMessage": "string"
}
Response Example (403 Forbidden)
{
  "errorCode": "string",
  "errorMessage": "string"
}

GET /devices/{referenceId}/connected

Check whether or not a device is connected

referenceId: string
in path

the referenceIdd of the device

200 OK

Ok

401 Unauthorized
404 Not Found
Response Content-Types: application/json
Response Example (200 OK)
{}
Response Example (401 Unauthorized)
{
  "errorCode": "string",
  "errorMessage": "string"
}
Response Example (404 Not Found)
{
  "errorCode": "string",
  "errorMessage": "string"
}

GET /devices

Returns a list of CloudFlow devices, optionally filtered by query parameters.

model: string
in query

A model name to filter devices by

serialNumber: string
in query

The serial number to filter devices by

location: string
in query

The location to filter devices by

200 OK

Ok

type
401 Unauthorized
403 Forbidden
404 Not Found
Response Content-Types: application/json
Response Example (200 OK)
[
  {
    "clientAccountId": "string",
    "referenceId": "string",
    "serialNumber": "string",
    "model": "string",
    "name": "string",
    "location": "string"
  }
]
Response Example (401 Unauthorized)
{
  "errorCode": "string",
  "errorMessage": "string"
}
Response Example (403 Forbidden)
{
  "errorCode": "string",
  "errorMessage": "string"
}
Response Example (404 Not Found)
{
  "errorCode": "string",
  "errorMessage": "string"
}

GET /devices/{referenceId}

Retrieve a device by referenceId.

referenceId: string
in path

The reference id of the device

200 OK

Ok

401 Unauthorized
403 Forbidden
404 Not Found
Response Content-Types: application/json
Response Example (200 OK)
{
  "clientAccountId": "string",
  "referenceId": "string",
  "serialNumber": "string",
  "model": "string",
  "name": "string",
  "location": "string"
}
Response Example (401 Unauthorized)
{
  "errorCode": "string",
  "errorMessage": "string"
}
Response Example (403 Forbidden)
{
  "errorCode": "string",
  "errorMessage": "string"
}
Response Example (404 Not Found)
{
  "errorCode": "string",
  "errorMessage": "string"
}

PATCH /devices/{referenceId}

Update the details for a device.

The device details to update

referenceId: string
in path

The device reference id

Request Example
{
  "name": "string",
  "location": "string"
}
200 OK

Ok

401 Unauthorized
403 Forbidden
404 Not Found
422 Unprocessable Entity
Response Content-Types: application/json
Response Example (200 OK)
{
  "clientAccountId": "string",
  "referenceId": "string",
  "serialNumber": "string",
  "model": "string",
  "name": "string",
  "location": "string"
}
Response Example (401 Unauthorized)
{
  "errorCode": "string",
  "errorMessage": "string"
}
Response Example (403 Forbidden)
{
  "errorCode": "string",
  "errorMessage": "string"
}
Response Example (404 Not Found)
{
  "errorCode": "string",
  "errorMessage": "string"
}
Response Example (422 Unprocessable Entity)
{
  "errorCode": "string",
  "errorMessage": "string"
}

POST /initiate

Initiates an asynchronous request over HTTP. In order to call this API the callbackUrl for this account must be set.

The format of the message send is the same as messages sent via the websocket.

Responses to this request will ONLY be sent to the callback URL of the account when received.

It is not possible to send a request via this API and listen for responses on the websocket connection and visa versa.

The request to initiate. This must be a valid instance of {@link CloudFlowMessage}.

Request Example
{
  "source": "string",
  "target": "string",
  "format": "string",
  "type": "string",
  "version": "string",
  "requestId": "string",
  "originatingRequestId": "string"
}
200 OK

Ok

401 Unauthorized
404 Not Found
410 Gone
412 Precondition Failed
422 Unprocessable Entity
Response Content-Types: application/json
Response Example (200 OK)
{
  "statusCode": "number (double)",
  "body": "string"
}
Response Example (401 Unauthorized)
{
  "errorCode": "string",
  "errorMessage": "string"
}
Response Example (404 Not Found)
{
  "errorCode": "string",
  "errorMessage": "string"
}
Response Example (410 Gone)
{
  "errorCode": "string",
  "errorMessage": "string"
}
Response Example (412 Precondition Failed)
{
  "errorCode": "string",
  "errorMessage": "string"
}
Response Example (422 Unprocessable Entity)
{
  "errorCode": "string",
  "errorMessage": "string"
}

Schema Definitions

CredentialsConnectionType: string

The connection type. Supported values are: ['websocket'].

string websocket

CredentialsTokenType: string

The type of access token provided. Supported values are: ['jwt'].

string jwt

ConnectionCredentials: object

Represents connection credentials required to connect to CloudFlow.

connectionType: CredentialsConnectionType

The connection type. Supported values are: ['websocket'].

connectionUrl: string

The websocket URL to connect to.

tokenType: CredentialsTokenType

The type of access token provided. Supported values are: ['jwt'].

accessToken: string

An access token to use for authentication when connecting to the websocket.

Example
{
  "connectionType": "string",
  "connectionUrl": "string",
  "tokenType": "string",
  "accessToken": "string"
}

ApiError: object

Represents a CloudFlow API error.

errorCode: string

The error code.

See documentation for a list of possible error codes and what they represent.

errorMessage: string

A description of the error that occurred.

Example
{
  "errorCode": "string",
  "errorMessage": "string"
}

Boolean: object

Example
{}

Device: object

Represents a CloudFlow device.

clientAccountId: string

The id of the client account that this device is registered to.

Must be a string of at least 8 characters. Alpha-numeric, hyphen and underscore characters are allowed.

referenceId: string

The unique reference id for this device.

This parameter is optional. If not set, CloudFlow will generate a random UUID.

Note that referenceIds are unique across all clients. Must be a string of at least 8 characters. Alpha-numeric, hyphen and underscore characters are allowed.

serialNumber: string

The physical unique manufacturers serial number for this device.

Must be at least one character.

Together with model, must be a unique combination.

model: string

The manufacturers model name for this device.

Must be at least one character.

Together with serialNumber, must be a unique combination.

name: string

An optional human-readable name for this device.

This can be used by external clients to display to users.

Must be at least one character.

CloudFlow does not enforce uniqueness for this parameter.

location: string

An optional location assigned for this device.

This may be used for querying purposes in the CloudFlow API.

Must be at least one character.

Example
{
  "clientAccountId": "string",
  "referenceId": "string",
  "serialNumber": "string",
  "model": "string",
  "name": "string",
  "location": "string"
}

DeviceUpdate: object

Represents an update to a CloudFlow device.

name: string

An optional human-readable name for this device.

This can be used by external clients to display to users.

Must be at least one character.

CloudFlow does not enforce uniqueness for this parameter.

location: string

An optional location assigned for this device.

This may be used for querying purposes in the CloudFlow API.

Must be at least one character.

Example
{
  "name": "string",
  "location": "string"
}

JsonResponse: object

statusCode: number (double) 200
body: string
headers: object [object Object]
Example
{
  "statusCode": "number (double)",
  "body": "string"
}

CloudFlowMessage: object

source: string
target: string
format: string
type: string
version: string
requestId: string
originatingRequestId: string
payload: object
Example
{
  "source": "string",
  "target": "string",
  "format": "string",
  "type": "string",
  "version": "string",
  "requestId": "string",
  "originatingRequestId": "string"
}