Skip to main content

Get Transactions

Description: To get a list of agency transactions, a HTTP GET request is made to the URL with the page number, transaction type and session token.

Method: GET

URI: /agency/transactions

Parameters:

  • page: The page of transactions

  • type: The type of transaction. Either "credit" or "debit".

Headers: Authorization: Third party based authorization header

Returns

FieldTypeDescription
idIntegerUnique ID of the transaction.
agency_idIntegerUnique ID of the transaction's agency.
user_idIntegerUnique ID of the user who created the transaction.
referenceStringUnique reference number of the transaction.
amountIntegerMonetary value specified in cents.
commentStringComment about the transaction.
createdIntegerReturns Unix timestamp of when transaction was created.
creditBooleanThe transaction is a credit type.
debitBooleanThe transaction is a debit type.
given_nameStringFirst name of the transaction's creator.
surnameStringLast name of the transaction's creator.
form_idIntegerUnique ID of the form in the transaction.
failedBooleanReturns true if trasaction failed.
failed_reasonStringA string relating to why the transaction failed.

Example

Request
curl https://app-api.reiformslive.com.au/agency/transactions \
--request GET \
--header "content-type: application/json" \
--header "Authorization: Basic YTlkOWIwYItNGY4Yi1hYTQxLTI5NzZmMTcyZmEyMQ==" \
--data '{
"page":1,
"type":"debit"
}'
Response
[
{
"id": 1,
"agency_id": 1,
"user_id": 9,
"reference": "000000000000000",
"amount": 0,
"comment": "comment",
"created": 1349150524,
"credit": false,
"debit": true,
"given_name": "John",
"surname": "Doe",
"form_id": null,
"failed": false,
"failed_reason": null
}, ...
]