1. Documentation
  2. CloudFlow
  3. Integration
  4. API

CloudFlow REST API

CloudFlow exposes a REST API that provides administrative functions and communication related functions.

API Endpoints

The API is divided up into sections based on target users.

Client API

This is intended for POS vendors integration with CloudFlow in order to initiate transactions on connected payment devices.

Device API

This is intended for application developers integrating with CloudFlow on a payment device in order to accept transations from a POS client.

Release notes

1.0

  • Support for Client and Device REST API endpoints
  • Support for bidirectional communication between clients and devices using websockets

1.1

  • Support for asynchronous communication via a new REST API endpoint in the Client API
  • Added endpoint to check device connection status in the Client API
  • Bug fixes

Documentation & Downloads

The CloudFlow APIs are defined and documented using OpenAPI / Swagger. Below is a table of links to API documentation and Swagger downloads for import into tools such as Postman or other HTTP clients.

API Group Version Documentation Swagger yaml
Client API 1.0 View Download
Client API 1.1 View Download
Device API 1.0 View Download
Device API 1.1 View Download

Case sensitivity

Note that all fields and parameters used in CloudFlow API are case sensitive. As an example, if a client or device tries to authenticate with CloudFlow using an account id or api token in the wrong case compared to how it was set, it will fail.

HTTP error codes

Any errors as a result of calling a CloudFlow HTTP endpoint will return a status code and a response body, as per the below format:

{
    "errorMessage": "someMessage",
    "errorCode": "someErrorCode"
}

Below is a table of the various errors.

HTTP status code Error code Description
400 failed Unexpected failure
401 unauthorized Missing or invalid Authorization bearer token
403 forbidden The operation attempted is not allowed
404 notFound The item requested or referenced does not exist
409 duplicateItem The item can not be created as it already exists
410 connectionLost The target the request was intended for is not available
412 preconditionFailed The operation attempted can not be carried out due to existing preconditions
417 storageFailed The item could not be persisted
422 invalidData The request is missing required data or the data defined is invalid
429 tooManyConnections The number of websocket connections have exceeded the account limit