Table of Contents
1. Authentication
Before you can access any data, you need to authenticate with our API. We use a token-based authentication system.Login API
To obtain an access token, use the Login APIEndpoint
POST /login
Request Body
Parameter Data Type Description UserName string The username of the credential TenantName string The name of the tenant that the user belongs to. Password string The password of the credentialRequest Body Sample
Response Body
Parameter Data Type Description cognitoToken.AuthenticationResult.IdToken string The JWT token that serves as the identity token cognitoToken.AuthenticationResult.AccessToken string The token used to access API resources cognitoToken.AuthenticationResult.RefreshToken string The token used to refresh the authentication when the current token expires cognitoToken.AuthenticationResult.ExpiresIn integer The expiration time of the token in seconds cognitoToken.AuthenticationResult.TokenType string The type of the token provided user.OloID string OloID of the user user.TenantID string The ID of the tenant user.TenantName string The name of the tenant that the user belongs to.Sample Response
AccessToken securely. You’ll need to include it in the Authorization header for subsequent API calls. For more details on the Login API, see the full Login API documentation.
2. Retrieving Transactions
To fetch transactions, use the List Transactions API:Endpoint
POST /transactions
Headers
Authorization: Bearer <your_access_token>Content-Type: application/json
Request Body
Parameter Data Type Description PageSize number Number of items in the result set FromDate Epoch time The start timestamp for filtering results ToDate Epoch time The end timestamp for filtering results ApplicationID string The ID of the applicationSample curl Request
Response Body
Parameter Data Type Description data.NextPageToken Json Object To paginate through the result set data.transactions Array A list of transactions message string Additional information about the status of transactionsSample Response
NextPageToken in your next request. For more details on the List Transactions API, see the full List Transactions API documentation.
3. Retrieving Activity Events
To fetch activity events, use the Filter Activity API:Endpoint
POST /filterActivity
Headers
Authorization: Bearer <your_access_token>Content-Type: application/json
Request Body
Parameter Data Type Description start Epoch time The start timestamp for filtering results end Epoch time The end timestamp for filtering results limit Number Number of items on result set Sample curl RequestSample Response
nextToken in your next request.
For more details on the Filter Activity API, see the full Filter Activity API documentation.
Best Practices
- Implement token refresh logic to maintain uninterrupted access.
- When fetching large amounts of data, use pagination to improve performance.
- Consider implementing rate limiting in your application to avoid hitting API limits.
Error Handling
All APIs may return error responses. Always check the HTTP status code and error message in the response body. Common error codes include:- 400: Bad Request
- 401: Unauthorized
- 403: Forbidden
- 404: Not Found
- 500: Internal Server Error