Skip to main content
POST
Create a transaction
To upload your transactions into Athena, perform the following API call with the given sample request bodies. Transaction type must conform to one of the following types
  • PAY
  • WITHDRAW
  • DEPOSIT
Requirements before posting a transaction
  • cp_a_id and cp_b_id needs to be one of the Subjects enrolled via the Subjects API.
  • If transaction_type is PAY, both cp_a_id and cp_b_id must be present.
  • If transaction_type is DEPOSIT, at least cp_b_id must be present.
  • If transaction_type is WITHDRAW, at least cp_a_id needs to be present.
  • transaction_currency_id must be the currency set as the master currency..
  • cp_a_country and cp_b_country, where provided, must be a valid three letter country code.
  • transaction_timestamp cannot be dated in the future.
  • If provided, the “populate_buckets” field must contain a list of bucket names, all of which are available at the time of transaction upload. Otherwise, the record will be rejected and not provided to Athena.
transaction_timestamp must conform to one of the following time formats
  • 2020-08-20T13:31:02.777 (YYYY-MM-DDTHH:MM:SS.SSS)
  • 2020-08-20T13:31:02 (YYYY-MM-DDTHH:MM:SS)
  • 2020-08-20T13:31 (YYYY-MM-DDTHH:MM)
Sample Request Body (Mandatory Fields):
Sample Request (All Fields):
Note: For cp_a_country and cp_b_country, it must be a valid three letter country code. Please refer to the link below. ISO 3166 - 3 Digit Code and Full Country Spelling

Authorizations

Authorization
string
header
required

JWT token obtained from AWS Cognito or custom authentication service

Body

A ModelSerializer that takes an additional fields argument that controls which fields should be displayed.

transaction_currency_id
string
required
write-only
Minimum string length: 1
client_transaction_id
string
required
Required string length: 1 - 255
transaction_type
string
required
Required string length: 1 - 255
transaction_timestamp
string<date-time>
required
amount
number<double>
required
populate_buckets
string[]
write-only
Minimum string length: 1
cp_a_id
string
write-only
Minimum string length: 1
cp_b_id
string
write-only
Minimum string length: 1
alt_currency_id
string
write-only
Minimum string length: 1
cp_a_country
string
Maximum string length: 60
cp_b_country
string
Maximum string length: 60
cp_a_bank
string
Maximum string length: 255
cp_b_bank
string
Maximum string length: 255
amount_in_alt_currency
number<double> | null
payment_mode
string
Maximum string length: 255
purpose_of_transfer
string
Maximum string length: 255
notes
string
Maximum string length: 255

Response

201 - application/json

A ModelSerializer that takes an additional fields argument that controls which fields should be displayed.

id
integer
required
read-only
bucket_loading_status
string
default:Transaction loaded into [ORDINARY] and requested buckets
required
read-only
cp_a
object
required
cp_b
object
required
transaction_currency
object
required
alt_currency
object
required
modified_by
object
required
created_by
object
required
client_transaction_id
string
required
Maximum string length: 255
transaction_type
string
required
Maximum string length: 255
transaction_timestamp
string<date-time>
required
amount
number<double>
required
cp_a_country
string
Maximum string length: 60
cp_b_country
string
Maximum string length: 60
cp_a_bank
string
Maximum string length: 255
cp_b_bank
string
Maximum string length: 255
amount_in_alt_currency
number<double> | null
payment_mode
string
Maximum string length: 255
purpose_of_transfer
string
Maximum string length: 255
notes
string
Maximum string length: 255