Skip to main content
List Transactions API
Updated over 3 months ago

List Transactions API

Endpoint

POST /transactions

Description

This endpoint allows you to retrieve a list of transactions based on specified criteria. It supports pagination and filtering options to customize the results.

Request

Headers

  • Content-Type: application/json

  • Authorization: Bearer {access_token}

Body

The request body should be a JSON object with the following structure:

{ 
"SearchField": "string",
"PageSize": number,
"NextPageToken": {},
"EndpointID": "string",
"FromDate": "string",
"ToDate": "string",
"ApplicationID": "string"
}

Fields

  • SearchField (string, optional): Field to search on.

  • PageSize (number, optional): Number of results to return per page.

  • NextPageToken (object, optional): Token for retrieving the next page of results.

  • EndpointID (string, optional): Filter transactions by a specific endpoint.

  • FromDate (string, optional): Start date for the transaction search range.

  • ToDate (string, optional): End date for the transaction search range.

  • ApplicationID (string, optional): Filter transactions by a specific application.

Response

Success Response

  • Status Code: 200 OK

  • Content-Type: application/json

{
"data": {
"NextPageToken": {},
"transactions": [
{
"ApplicationName": "string",
"User": {},
"EndpointName": "string",
"IsAuthorized": boolean,
"FRMethod": "string",
"EndpointID": "string",
"Mode": "string",
"CreatedOn": number,
"ApplicationID": "string",
"CapturedFace": "string",
"TransactionID": "string"
}
]
},
"message": "string"
}

Fields

  • data (object): Contains the response data.

    • NextPageToken (object): Token for retrieving the next page of results.

    • transactions (array): List of transaction objects.

      • ApplicationName (string): Name of the application associated with the transaction.

      • User (object): Details of the user associated with the transaction.

      • EndpointName (string): Name of the endpoint where the transaction occurred.

      • IsAuthorized (boolean): Indicates if the transaction was authorized.

      • FRMethod (string): Face recognition method used.

      • EndpointID (string): ID of the endpoint.

      • Mode (string): Mode of the transaction.

      • CreatedOn (number): Timestamp of when the transaction was created.

      • ApplicationID (string): ID of the application.

      • CapturedFace (string): Image data of the captured face.

      • TransactionID (string): Unique identifier for the transaction.

  • message (string): A message indicating the result of the operation.

Example

Request

POST /transactions
Content-Type: application/json
Authorization: Bearer {access_token}

{
"PageSize": 10,
"FromDate": "2023-09-01T00:00:00Z",
"ToDate": "2023-09-05T23:59:59Z",
"ApplicationID": "app-123"
}

Success Response

HTTP/1.1 200 OK
Content-Type: application/json

{
"data": {
"NextPageToken": {
"lastEvaluatedKey": "transaction-789"
},
"transactions": [
{
"ApplicationName": "AccessControl",
"User": {
"name": "John Doe",
"id": "user-456"
},
"EndpointName": "Main Entrance",
"IsAuthorized": true,
"FRMethod": "FaceRecognition",
"EndpointID": "endpoint-123",
"Mode": "Entry",
"CreatedOn": 1662364800,
"ApplicationID": "app-123",
"CapturedFace": "base64_encoded_image_data",
"TransactionID": "trans-789"
}
// ... more transactions ...
]
},
"message": "Transactions retrieved successfully"
}

Notes

  • This API requires authentication. Make sure to include the necessary authentication headers when making the request.

  • The NextPageToken in the response can be used to retrieve the next page of results by including it in the next request.

  • Date fields should be in a standard format, preferably ISO 8601 (e.g., "2023-09-05T23:59:59Z").

  • The PageSize parameter can be used to control the number of results returned per request.

  • If no filters are specified, the API will return the most recent transactions up to the specified PageSize.

Did this answer your question?