Aino.io Data API (version 2.0)

The Data API can be used to store information about transactions from any HTTPS enabled platform into Aino.io.

The Aino.io API can be accessed from any integration platform, application or even from scripts. In the following sections you will first learn the basic concept and terms related to our API and the philosophy behind it. You will also learn the structure of the API and see some examples of how our API can be used in various situations.

Transaction API

Using the API

  • The URL of the API version 2.0 is https://data.aino.io/rest/v2.0/transaction
  • The format of the API version 2.0 is REST/JSON.
  • The API only accepts POST requests over HTTPS.
  • If your platform supports it, it is recommended to send data in batches. A batch can contain several transactions in a JSON array. If buffering and batch-sending is not feasible, data can be sent one transaction at a time.
  • The API consists of four required fields and six optional fields of different data types. See the data field details below.

Headers

Authorization

All API requests must contain your Aino.io instance’s valid API Key for identifying and authorizing the request. You can generate the required keys in the Administration section of your instance.

Authorization: apikey [YOUR API KEY HERE]

Content-type

Aino.io API currently accepts only JSON payloads.

Content-type: application/json

Data limits

The batch size is currently limited to 1 MB in both gzipped and uncompressed API requests.

Required fields

N

From

The from field defines the sender or source of the transferred data or message.

Required data field of type String with a maximum length of 50 characters.

N

Timestamp

The timestamp field defines when the transaction in question took place.

Required data field of type timestamp in seconds or milliseconds since epoch (e.g. 1457460431123), or ISO Date String (e.g. 2016-03-08T18:07:11.123Z)

Note! Transactions with timestamps older than 12 hours will be rejected by the API.

N

To

The to field defines the recipient or destination of the transferred data or message.

Required data field of type String with a maximum length of 50 characters.

N

Status

The status field defines whether the transaction was successful or if it failed. If the status cannot be determined, the status may be defined as “unknown”.

Required data field of enumerated type with the possible values success, failureand unknown.

Optional fields

L

Message (optional)

The message field should be used to store a human-readable and easily understandable description or statement about the transaction which took place.

Optional data field of type String with a maximum length of 200 characters.

L

Payload type (optional)

The payloadType field can be used to specify what kind of data or information was transferred in the transaction.

Optional data field of type String with a maximum length of 50 characters.

L

Flow identifier (optional)

The flowId field can be used group related transactions that make up an integration “flow” or “sequence”. A unique identifier should be used and assigned at the beginning of the flow or sequence.

Optional data field of type String with a maximum length of 200 characters.

L

Operation (optional)

The operation field can be used to specify which business-level operation or process the transaction takes part in.

Optional data field of type String with a maximum length of 100 characters.

L

Identifiers (optional)

The ids field can be used to store identifiers related to the payload of the transaction. These identifiers can be searched in the user interface of Aino.io.

Optional data field of type String-key – String-value array. Strings have a maximum length of 50 characters.

L

Metadata (optional)

The metadata field can be used to store any additional information that the standard fields do not include.

Optional data field of type String-key – String-value array. Value has a maximum length of 3000 characters.

Example usage

Minimal example (only required fields)

{
  "transactions": [
    {
      "from": "CRM",
      "to": "Invoicing",
      "status": "success",
      "timestamp": 1457460431123
    }
  ]
}

In this example, a successful transaction has taken place between a CRM system and an Invoicing service. This is the minimum amount of data that is possible and worthwhile to store in Aino.io.

Application- or system-level statistics can be computed from this data and high-level alerts can be generated. The following example describes how to store more information that will benefit several types of users of Aino.io and give much more insight into what is actually happening between the integrated applications.

Full example

{
  "transactions": [
    {
      "from": "CRM",
      "to": "Invoicing",
      "status": "success",
      "timestamp": 1457460431123,
      "message": "Updated customer invoicing address successfully.",
      "operation": "Customer Details Update",
      "payloadType": "Customer Invoicing Address",
      "ids": [{
          "idType": "Customer ID",
          "values": ["123", "456", "789"]
      }],
      "metadata": [
          { "name": "Extra information", "value": "Hello World!" },
          { "name": "Support ticketing", "value": "https://example.com/ticket/123abc" }

      ],
      "flowId": "af75d5da-5a5c-4cf2-bd6e-3be813ea2145"
    }
  ]
}
Share This