Skip to main content
GET
/
api
/
cases
/
{id}
/
transactions
List transactions for a specific case
curl --request GET \
  --url http://localhost/api/api/cases/{id}/transactions \
  --header 'Authorization: Bearer <token>'
import requests

url = "http://localhost/api/api/cases/{id}/transactions"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('http://localhost/api/api/cases/{id}/transactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "http://localhost/api/api/cases/{id}/transactions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "http://localhost/api/api/cases/{id}/transactions"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("http://localhost/api/api/cases/{id}/transactions")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("http://localhost/api/api/cases/{id}/transactions")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "results": [
    {
      "transactions": [
        {
          "id": 123,
          "client_transaction_id": "<string>",
          "transaction_type": "<string>",
          "cp_a": {
            "id": 123,
            "name": "<string>",
            "client_subject_id": "<string>"
          },
          "cp_a_country": "<string>",
          "cp_a_bank": "<string>",
          "cp_b": {
            "id": 123,
            "name": "<string>",
            "client_subject_id": "<string>"
          },
          "cp_b_country": "<string>",
          "cp_b_bank": "<string>",
          "transaction_timestamp": "2023-11-07T05:31:56Z",
          "transaction_currency": {
            "id": 123,
            "code": "<string>",
            "name": "<string>"
          },
          "amount": 123,
          "alt_currency": {
            "id": 123,
            "code": "<string>",
            "name": "<string>"
          },
          "amount_in_alt_currency": 123,
          "payment_mode": "<string>",
          "purpose_of_transfer": "<string>"
        }
      ],
      "transaction_count": 123,
      "next_token": "<string>",
      "prev_token": "<string>"
    }
  ],
  "next": "http://api.example.org/accounts/?cursor=cD00ODY%3D\"",
  "previous": "http://api.example.org/accounts/?cursor=cj0xJnA9NDg3"
}
{
"detail": "<string>",
"code": "<string>",
"field_errors": {}
}
{
"detail": "<string>",
"code": "<string>",
"field_errors": {}
}
transaction_id is where the page_direction will begin from
Note: Retrieving Transactions by Case Id API Endpoint uses cursor pagination. The default behaviour returns 10 transactions in a response which can be changed by using argument page_limit, with further transactions stored in offsets. Optional Queries
  • page_limit
  • page_direction
  • transaction_id
page_direction· must conform to one of the following options
  • NEXT
  • PREV

Authorizations

Authorization
string
header
required

JWT token obtained from AWS Cognito or custom authentication service

Path Parameters

id
integer
required

Query Parameters

cursor
string

Cursor for pagination

page_limit
integer

Number of results to return per page.

Response

Transactions retrieved successfully.

results
object[]
required
next
string<uri> | null
Example:

"http://api.example.org/accounts/?cursor=cD00ODY%3D\""

previous
string<uri> | null
Example:

"http://api.example.org/accounts/?cursor=cj0xJnA9NDg3"