Transactions v0.10.0
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
The Transactions API manages banking account transactions for bank customers.
The Transactions API can view account transaction history for accounts held at the current financial instuitution. The /transactions
collection lists all transactions, both pending and completed. For accounts with transaction history, the user can view those transactions via the /history
endpoint (the getHistory
operation). Pending transactions are managed in a separate collection, under /pendingTransactions
(via the getPendingTransactions
operation).
Note that the queries to filter transactions do not use the actual account numbers:
GET /transactions/history?account=0399abed-fd3d-4830-a88b-30f38b8a365c
For security, these queries only filter based on the opaque account resource ID, which is decoupled from the account number. Thus, account numbers do not appear in the request URLs or in web traffic logs.
Download OpenAPI Definition (YAML)
Base URLs:
Authentication
- API Key (
apiKey
)- header parameter: API-Key
- API Key based authentication. Each client application must pass its private, unique API key, allocated in the developer portal, via the
API-Key: {api-key}
request header.
- OAuth2 authentication (
accessToken
)- OAuth2 client access token authentication. The client authenticates against the server at
authorizationUrl
, passing the client's privateclientId
(and optionalclientSecret
) as part of this flow. The client obtains an access token from the server attokenUrl
. It then passes the received access token via theAuthorization: Bearer {access-token}
header in subsequent API calls. The authorization process also returns a refresh token which the client should use to renew the access token before it expires. - Flow:
authorizationCode
- Authorization URL = https://auth.apiture.com/oauth2/authorize
- Token URL = http://auth.apiture.com/auth/oauth2/token
- OAuth2 client access token authentication. The client authenticates against the server at
Scope | Scope Description |
---|---|
banking/read |
Read access to accounts and account-related resources such as transfers and transactions. |
banking/write |
Write (update) access to accounts and account-related resources such as transfers and transactions. |
banking/delete |
Delete access to deletable accounts and account-related resources such as transfers. |
banking/readBalance |
Read access to account balances. This must be granted in addition to the banking/read scope in order to view balances, but is included in the banking/full scope. |
banking/full |
Full access to accounts and account-related resources such as transfers and transactions. |
API
Endpoints Which Describe This API
getApi
Code samples
# You can also use wget
curl -X GET /transactions/ \
-H 'Accept: application/hal+json' \
-H 'API-Key: API_KEY'
GET /transactions/ HTTP/1.1
Accept: application/hal+json
var headers = {
'Accept':'application/hal+json',
'API-Key':'API_KEY'
};
$.ajax({
url: '/transactions/',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const headers = {
'Accept':'application/hal+json',
'API-Key':'API_KEY'
};
fetch('/transactions/',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/hal+json',
'API-Key' => 'API_KEY'
}
result = RestClient.get '/transactions/',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/hal+json',
'API-Key': 'API_KEY'
}
r = requests.get('/transactions/', params={
}, headers = headers)
print r.json()
URL obj = new URL("/transactions/");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/hal+json"},
"API-Key": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/transactions/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
Top-level resources and operations in this API
GET /
Return links to the top-level resources and operations in this API. This API returns the following links: apiture:accounts
: links to the collection of accounts held at this financial institution
Example responses
OK
{
"id": "accounts",
"name": "User Bank Accounts",
"apiVersion": "0.1.0",
"_profile": "https://api.apiture.com/schemas/common/root/v1.0.0/profile.json",
"_links": {
"apiture:transactions": {
"href": "/transactions/transactions"
}
}
}
200 Response
{
"id": "apiName",
"name": "API name",
"apiVersion": "1.0.0",
"_profile": "https://api.apiture.com/schemas/common/root/v1.0.0/profile.json",
"_links": {}
}
Responses
Status | Description |
---|---|
200 | OK |
OK | |
Schema: root |
getApiDoc
Code samples
# You can also use wget
curl -X GET /transactions/apiDoc \
-H 'Accept: application/json' \
-H 'API-Key: API_KEY'
GET /transactions/apiDoc HTTP/1.1
Accept: application/json
var headers = {
'Accept':'application/json',
'API-Key':'API_KEY'
};
$.ajax({
url: '/transactions/apiDoc',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json',
'API-Key':'API_KEY'
};
fetch('/transactions/apiDoc',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'API-Key' => 'API_KEY'
}
result = RestClient.get '/transactions/apiDoc',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'API-Key': 'API_KEY'
}
r = requests.get('/transactions/apiDoc', params={
}, headers = headers)
print r.json()
URL obj = new URL("/transactions/apiDoc");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"API-Key": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/transactions/apiDoc", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
Return API definition document
GET /apiDoc
Return the OpenAPI document that describes this API.
Example responses
200 Response
{}
Responses
Status | Description |
---|---|
200 | OK |
OK | |
Schema: Inline |
Response Schema
Transactions
Bank Account Transactions
getTransactions
Code samples
# You can also use wget
curl -X GET /transactions/transactions \
-H 'Accept: application/hal+json' \
-H 'API-Key: API_KEY' \
-H 'Authorization: Bearer {access-token}'
GET /transactions/transactions HTTP/1.1
Accept: application/hal+json
var headers = {
'Accept':'application/hal+json',
'API-Key':'API_KEY',
'Authorization':'Bearer {access-token}'
};
$.ajax({
url: '/transactions/transactions',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const headers = {
'Accept':'application/hal+json',
'API-Key':'API_KEY',
'Authorization':'Bearer {access-token}'
};
fetch('/transactions/transactions',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/hal+json',
'API-Key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/transactions/transactions',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/hal+json',
'API-Key': 'API_KEY',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/transactions/transactions', params={
}, headers = headers)
print r.json()
URL obj = new URL("/transactions/transactions");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/hal+json"},
"API-Key": []string{"API_KEY"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/transactions/transactions", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
Return a collection of pending and completed transactions.
GET /transactions
Return a paginated sortable filterable searchable collection of pending and completed transactions. The links in the response include pagination links.
The default will show transactions for all accounts that the user has access to.
Parameters
Parameter | Description |
---|---|
checkNumber (query) |
string Specify one or more check numbers or check number ranges. This is a comma-separated or | separated list of number or ranges. Ranges have the form number-number . For example, the value 201,202,210-213 will match the transactions where the check number is 201, 202, 210, 211, 212, or 213; this may also be expressed as 201|202|210-213 |
holdState (query) |
string Subset the transactions collection to those whose holdState matches this value. Use | to separate multiple values. For example, ?holdState=active will match only items whose holdState is active ; ?holdState=active|expired will match items whose holdState is active or expired . This is combined with an implicit and with other filters if they are used. See filtering. |
start (query) |
integer(int64) The zero-based index of the first transaction in this page. The default, 0, represents the first page of the collection. |
limit (query) |
integer(int32) The maximum number of transaction representations to return in this page. |
sortBy (query) |
string Optional sort criteria. See sort criteria format, such as ?sortBy=field1,-field2 . |
filter (query) |
string Optional filter criteria. See filtering. |
q (query) |
string Optional search string. See searching. |
account (query) |
string A list of server-supplied values which identify the account instances, i.e. ?account=acct1 |
Example responses
200 Response
{
"_profile": "https://api.apiture.com/schemas/transactions/transactions/v/profile.json",
"start": 10,
"limit": 10,
"count": 67,
"name": "transactions",
"_links": {
"self": {
"href": "/transactions/transactions?start=10&limit=10"
},
"first": {
"href": "/transactions/transactions?start=0&limit=10"
},
"next": {
"href": "/transactions/transactions?start=20&limit=10"
},
"collection": {
"href": "/transactions/transactions"
}
},
"_embedded": {
"items": [
{
"_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
"_profile": "https://api.apiture.com/schemas/transaction/v/profile.json",
"_links": {
"self": {
"href": "/transactions/transactions/0399abed-fd3d-4830-a88b-30f38b8a365c"
},
"apiture:account": {
"href": "/transactions/accounts/86de587e-a5a7-11e8-98d0-529269fb1459"
},
"apiture:organization": {
"href": "/transactions/organizations/86de587e-a5a7-11e8-98d0-529269fb1459"
}
},
"amount": {
"value": "35.00",
"currency": "USD"
},
"state": "pending",
"type": "debit",
"providerSummary": "gas station"
},
{
"_id": "d62c0701-0d74-4836-83f9-ebf3709442ea",
"_profile": "https://api.apiture.com/schemas/transaction/v/profile.json",
"_links": {
"self": {
"href": "/transactions/transactions/d62c0701-0d74-4836-83f9-ebf3709442ea"
},
"apiture:account": {
"href": "/transactions/accounts/86de587e-a5a7-11e8-98d0-529269fb1459"
},
"apiture:organization": {
"href": "/transactions/organizations/86de587e-a5a7-11e8-98d0-529269fb1459"
}
},
"amount": {
"value": "1000.00",
"currency": "USD"
},
"state": "pending",
"type": "debit",
"providerSummary": "donation"
}
]
}
}
Responses
Status | Description |
---|---|
200 | OK |
OK | |
Schema: transactions | |
400 | Bad Request |
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error. | |
Schema: errorResponse | |
422 | Unprocessable Entity |
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error. | |
Schema: errorResponse |
getTransaction
Code samples
# You can also use wget
curl -X GET /transactions/transactions/{transactionId} \
-H 'Accept: application/hal+json' \
-H 'API-Key: API_KEY' \
-H 'Authorization: Bearer {access-token}'
GET /transactions/transactions/{transactionId} HTTP/1.1
Accept: application/hal+json
var headers = {
'Accept':'application/hal+json',
'API-Key':'API_KEY',
'Authorization':'Bearer {access-token}'
};
$.ajax({
url: '/transactions/transactions/{transactionId}',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const headers = {
'Accept':'application/hal+json',
'API-Key':'API_KEY',
'Authorization':'Bearer {access-token}'
};
fetch('/transactions/transactions/{transactionId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/hal+json',
'API-Key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/transactions/transactions/{transactionId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/hal+json',
'API-Key': 'API_KEY',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/transactions/transactions/{transactionId}', params={
}, headers = headers)
print r.json()
URL obj = new URL("/transactions/transactions/{transactionId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/hal+json"},
"API-Key": []string{"API_KEY"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/transactions/transactions/{transactionId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
Fetch a representation of this transaction
GET /transactions/{transactionId}
Return a HAL representation of this transaction resource.
Parameters
Parameter | Description |
---|---|
transactionId (path) |
string (required) The unique identifier of this transaction. This is an opaque string. This string is not the same as the bank's core transaction ID; it is simply the resource ID for referencing the transaction resource via the API. |
unmasked (query) |
boolean When requesting a transaction, the full account number is not included in the response by default, for security reasons. Include this query parameter, with a value of true , to request that the response body includes the full account number. Such requests are auditable. |
Example responses
200 Response
{
"_id": "969d61b1-2b49-4eb6-9b7d-356f242ca0aa",
"amount": {
"value": "327.50",
"currency": "USD"
},
"balance": {
"current": "2180.27",
"currency": "USD"
},
"state": "completed",
"type": "debit",
"providerSummary": "check 1856 | Don't Bug Me Pest Control",
"summary": "check 1856 | Don't Bug Me Pest Control",
"description": "check 1856, processed May 10, 2019",
"checkNumber": 1856,
"sourceAccountNumbers": {
"masked": "*************3210",
"full": "9876543210"
},
"sourceAccountName": "My Personal Checking",
"transactionCode": "D480",
"postedOn": {},
"network": "check",
"_links": {
"self": {
"href": "/transactions/transactions/969d61b1-2b49-4eb6-9b7d-356f242ca0aa"
},
"apiture:account": {
"href": "/accounts/accounts/7e6acb45-71c0-4aa8-9fe4-a5f3b4298be7"
},
"apiture:checkFrontImage": {
"href": "/vault/files/14361265-7837-4eab-8b74-3232c9716385/content"
},
"apiture:checkFrontFile": {
"href": "/vault/files/14361265-7837-4eab-8b74-3232c9716385"
},
"apiture:checkBackImage": {
"href": "/vault/files/41c9daba-c4c6-412d-9faf-eb82bc76e2e1/content"
},
"apiture:checkBackFile": {
"href": "/vault/files/41c9daba-c4c6-412d-9faf-eb82bc76e2e1"
},
"apiture:sourceAccount": {
"href": "/accounts/accounts/85efad52-14f6-494f-a52b-5b5960000766"
}
}
}
Responses
Status | Description |
---|---|
200 | OK |
OK | |
Schema: transaction | |
304 | Not Modified |
Not Modified. The resource has not been modified since it was last fetched. | |
404 | Not Found |
Not Found. There is no such transaction resource at the specified {transactionId} The _error field in the response will contain details about the request error. | |
Schema: error |
Response Headers
Status | Description |
---|---|
200 | ETag string |
The ETag response header specifies an entity tag which must be provided in an If-Match request header for PUT or PATCH operations which update this resource. |
Pending Transactions
Bank Account Pending Transactions
getPendingTransactions
Code samples
# You can also use wget
curl -X GET /transactions/pendingTransactions \
-H 'Accept: application/hal+json' \
-H 'API-Key: API_KEY' \
-H 'Authorization: Bearer {access-token}'
GET /transactions/pendingTransactions HTTP/1.1
Accept: application/hal+json
var headers = {
'Accept':'application/hal+json',
'API-Key':'API_KEY',
'Authorization':'Bearer {access-token}'
};
$.ajax({
url: '/transactions/pendingTransactions',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const headers = {
'Accept':'application/hal+json',
'API-Key':'API_KEY',
'Authorization':'Bearer {access-token}'
};
fetch('/transactions/pendingTransactions',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/hal+json',
'API-Key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/transactions/pendingTransactions',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/hal+json',
'API-Key': 'API_KEY',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/transactions/pendingTransactions', params={
}, headers = headers)
print r.json()
URL obj = new URL("/transactions/pendingTransactions");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/hal+json"},
"API-Key": []string{"API_KEY"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/transactions/pendingTransactions", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
Return a collection of pending transactions
GET /pendingTransactions
Return a paginated sortable filterable searchable collection of pending transactions. The links in the response include pagination links.
The default will show pending transactions for all accounts that the user has access to.
Parameters
Parameter | Description |
---|---|
checkNumber (query) |
string Specify one or more check numbers or check number ranges. This is a comma-separated or | separated list of number or ranges. Ranges have the form number-number . For example, the value 201,202,210-213 will match the transactions where the check number is 201, 202, 210, 211, 212, or 213; this may also be expressed as 201|202|210-213 |
holdState (query) |
string Subset the transactions collection to those whose holdState matches this value. Use | to separate multiple values. For example, ?holdState=active will match only items whose holdState is active ; ?holdState=active|expired will match items whose holdState is active or expired . This is combined with an implicit and with other filters if they are used. See filtering. |
start (query) |
integer(int64) The zero-based index of the first transaction in this page. The default, 0, represents the first page of the collection. |
limit (query) |
integer(int32) The maximum number of transaction representations to return in this page. |
sortBy (query) |
string Optional sort criteria. See sort criteria format, such as ?sortBy=field1,-field2 . |
filter (query) |
string Optional filter criteria. See filtering. |
q (query) |
string Optional search string. See searching. |
account (query) |
string A list of server-supplied values which identify the account instances, i.e. ?account=acct1 |
Example responses
200 Response
{
"_profile": "https://api.apiture.com/schemas/transactions/transactions/v/profile.json",
"start": 10,
"limit": 10,
"count": 67,
"name": "transactions",
"_links": {
"self": {
"href": "/transactions/transactions?start=10&limit=10"
},
"first": {
"href": "/transactions/transactions?start=0&limit=10"
},
"next": {
"href": "/transactions/transactions?start=20&limit=10"
},
"collection": {
"href": "/transactions/transactions"
}
},
"_embedded": {
"items": [
{
"_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
"_profile": "https://api.apiture.com/schemas/transaction/v/profile.json",
"_links": {
"self": {
"href": "/transactions/transactions/0399abed-fd3d-4830-a88b-30f38b8a365c"
},
"apiture:account": {
"href": "/transactions/accounts/86de587e-a5a7-11e8-98d0-529269fb1459"
},
"apiture:organization": {
"href": "/transactions/organizations/86de587e-a5a7-11e8-98d0-529269fb1459"
}
},
"amount": {
"value": "35.00",
"currency": "USD"
},
"state": "pending",
"type": "debit",
"providerSummary": "gas station"
},
{
"_id": "d62c0701-0d74-4836-83f9-ebf3709442ea",
"_profile": "https://api.apiture.com/schemas/transaction/v/profile.json",
"_links": {
"self": {
"href": "/transactions/transactions/d62c0701-0d74-4836-83f9-ebf3709442ea"
},
"apiture:account": {
"href": "/transactions/accounts/86de587e-a5a7-11e8-98d0-529269fb1459"
},
"apiture:organization": {
"href": "/transactions/organizations/86de587e-a5a7-11e8-98d0-529269fb1459"
}
},
"amount": {
"value": "1000.00",
"currency": "USD"
},
"state": "pending",
"type": "debit",
"providerSummary": "donation"
}
]
}
}
Responses
Status | Description |
---|---|
200 | OK |
OK | |
Schema: transactions | |
400 | Bad Request |
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error. | |
Schema: errorResponse | |
422 | Unprocessable Entity |
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error. | |
Schema: errorResponse |
History
Bank Account Past Transactions
getHistory
Code samples
# You can also use wget
curl -X GET /transactions/history \
-H 'Accept: application/hal+json' \
-H 'API-Key: API_KEY' \
-H 'Authorization: Bearer {access-token}'
GET /transactions/history HTTP/1.1
Accept: application/hal+json
var headers = {
'Accept':'application/hal+json',
'API-Key':'API_KEY',
'Authorization':'Bearer {access-token}'
};
$.ajax({
url: '/transactions/history',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const headers = {
'Accept':'application/hal+json',
'API-Key':'API_KEY',
'Authorization':'Bearer {access-token}'
};
fetch('/transactions/history',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/hal+json',
'API-Key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/transactions/history',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/hal+json',
'API-Key': 'API_KEY',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/transactions/history', params={
}, headers = headers)
print r.json()
URL obj = new URL("/transactions/history");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/hal+json"},
"API-Key": []string{"API_KEY"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/transactions/history", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
Return a collection of past transactions
GET /history
Return a paginated sortable filterable searchable collection of transactions. The links in the response include pagination links.
Transactions in the history are immutable and not deletable.
The default will show transactions for all accounts that the user has access to.
Parameters
Parameter | Description |
---|---|
checkNumber (query) |
string Specify one or more check numbers or check number ranges. This is a comma-separated or | separated list of number or ranges. Ranges have the form number-number . For example, the value 201,202,210-213 will match the transactions where the check number is 201, 202, 210, 211, 212, or 213; this may also be expressed as 201|202|210-213 |
holdState (query) |
string Subset the transactions collection to those whose holdState matches this value. Use | to separate multiple values. For example, ?holdState=active will match only items whose holdState is active ; ?holdState=active|expired will match items whose holdState is active or expired . This is combined with an implicit and with other filters if they are used. See filtering. |
start (query) |
integer(int64) The zero-based index of the first transaction in this page. The default, 0, represents the first page of the collection. |
limit (query) |
integer(int32) The maximum number of transaction representations to return in this page. |
sortBy (query) |
string Optional sort criteria. See sort criteria format, such as ?sortBy=field1,-field2 . |
filter (query) |
string Optional filter criteria. See filtering. |
q (query) |
string Optional search string. See searching. |
account (query) |
string A list of server-supplied values which identify the account instances, i.e. ?account=acct1 |
Example responses
200 Response
{
"_profile": "https://api.apiture.com/schemas/transactions/transactions/v/profile.json",
"start": 10,
"limit": 10,
"count": 67,
"name": "transactions",
"_links": {
"self": {
"href": "/transactions/transactions?start=10&limit=10"
},
"first": {
"href": "/transactions/transactions?start=0&limit=10"
},
"next": {
"href": "/transactions/transactions?start=20&limit=10"
},
"collection": {
"href": "/transactions/transactions"
}
},
"_embedded": {
"items": [
{
"_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
"_profile": "https://api.apiture.com/schemas/transaction/v/profile.json",
"_links": {
"self": {
"href": "/transactions/transactions/0399abed-fd3d-4830-a88b-30f38b8a365c"
},
"apiture:account": {
"href": "/transactions/accounts/86de587e-a5a7-11e8-98d0-529269fb1459"
},
"apiture:organization": {
"href": "/transactions/organizations/86de587e-a5a7-11e8-98d0-529269fb1459"
}
},
"amount": {
"value": "35.00",
"currency": "USD"
},
"state": "pending",
"type": "debit",
"providerSummary": "gas station"
},
{
"_id": "d62c0701-0d74-4836-83f9-ebf3709442ea",
"_profile": "https://api.apiture.com/schemas/transaction/v/profile.json",
"_links": {
"self": {
"href": "/transactions/transactions/d62c0701-0d74-4836-83f9-ebf3709442ea"
},
"apiture:account": {
"href": "/transactions/accounts/86de587e-a5a7-11e8-98d0-529269fb1459"
},
"apiture:organization": {
"href": "/transactions/organizations/86de587e-a5a7-11e8-98d0-529269fb1459"
}
},
"amount": {
"value": "1000.00",
"currency": "USD"
},
"state": "pending",
"type": "debit",
"providerSummary": "donation"
}
]
}
}
Responses
Status | Description |
---|---|
200 | OK |
OK | |
Schema: transactions | |
400 | Bad Request |
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error. | |
Schema: errorResponse | |
422 | Unprocessable Entity |
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error. | |
Schema: errorResponse |
Schemas
transactionType
"debit"
Transaction Type
type
should indicate the type of the transaction (not what is allowed for the account). i.e.
credit
- the transaction was a credit posted to the account, such as the transfer of funds to this account or interested posted to the accountdebit
- the transaction debited funds from the account, such as a check written against an account.
Type: string
Enumerated values: debit
credit
transactionState
"pending"
Transaction State
state
indicates the current state of the transaction
Type: string
Enumerated values: pending
completed
reversed
holdState
"active"
Hold State
Indicates the hold state of the transaction. the holdState
will be none
if no hold is associated to the transaction; otherwise, the holdState
will indicate if the hold is currently active
or has expired
.
Type: string
Enumerated values: active
expired
none
transaction
{
"_id": "969d61b1-2b49-4eb6-9b7d-356f242ca0aa",
"amount": {
"value": "327.50",
"currency": "USD"
},
"balance": {
"current": "2180.27",
"currency": "USD"
},
"state": "completed",
"type": "debit",
"providerSummary": "check 1856 | Don't Bug Me Pest Control",
"summary": "check 1856 | Don't Bug Me Pest Control",
"description": "check 1856, processed May 10, 2019",
"checkNumber": 1856,
"sourceAccountNumbers": {
"masked": "*************3210",
"full": "9876543210"
},
"sourceAccountName": "My Personal Checking",
"transactionCode": "D480",
"postedOn": {},
"network": "check",
"_links": {
"self": {
"href": "/transactions/transactions/969d61b1-2b49-4eb6-9b7d-356f242ca0aa"
},
"apiture:account": {
"href": "/accounts/accounts/7e6acb45-71c0-4aa8-9fe4-a5f3b4298be7"
},
"apiture:checkFrontImage": {
"href": "/vault/files/14361265-7837-4eab-8b74-3232c9716385/content"
},
"apiture:checkFrontFile": {
"href": "/vault/files/14361265-7837-4eab-8b74-3232c9716385"
},
"apiture:checkBackImage": {
"href": "/vault/files/41c9daba-c4c6-412d-9faf-eb82bc76e2e1/content"
},
"apiture:checkBackFile": {
"href": "/vault/files/41c9daba-c4c6-412d-9faf-eb82bc76e2e1"
},
"apiture:sourceAccount": {
"href": "/accounts/accounts/85efad52-14f6-494f-a52b-5b5960000766"
}
}
}
A transaction
An financial transaction, such as a deposit, a check payment, interest, fees, transaction reversals, etc. Transaction instances contain one or more links to related resources in their _links
object. The following links may appear:
self
- the URL of the current transaction resource.apiture:account
- the URL of the local account the transaction applies to.apiture:sourceAccount
- for account to account transfer transactions, this is the account where the funds were debited (withdrawn from), if available. This may be an external account.apiture:targetAccount
- For account to account transfer transactions, this is the account where the funds were credited (deposited to) if available. This may be an external account.apiture:checkFrontImage
- The URL of the image of the front of a processed check written from the account.apiture:checkFrontFile
- The URL of a file resource in Vault; this contains information about the front of a processed check.apiture:checkBackImage
- The URL of the image of the back of a processed check check written from the account.apiture:checkBackFile
- The URL of a file resource in Vault; this contains information about the back of a processed check.apiture:reversedBy
- If this transaction isreversed
, this is the URL of a later transaction which reverses this transaction.apiture:reverses
- If this transaction is a reversal, this is the URL of an earlier transaction which this transaction reverses.
Properties
Name | Description |
---|---|
_links | object An optional map of links, mapping each link relation to a link object. This model defines the _links object of HAL representations.
|
» additionalProperties | link Describes a hypermedia link within a _links object in HAL representations. In Apiture APIs, links are HAL links, but Apiture APIs do not use the name or hreflang properties of HAL. Apiture links may include a method property.
|
_embedded | object An optional map of nested resources, mapping each nested resource name to a nested resource representation. |
_profile | string(uri) The URI of a resource profile which describes the representation. |
_error | error An object which describes an error. This value is omitted if the operation succeeded without error. |
_id | string The unique identifier for this approval resource. This is an immutable opaque string. |
amount | money The amount of the transaction. |
balance | balance The account's running balance as of this transaction. This property is optional and is omitted if not computable. |
state | transactionState state indicates the current state of the transaction
|
type | transactionType
|
subtype | string A subtype, more specific transaction type. |
providerSummary | string Human readable version of the transaction description. |
summary | string A cleansed version of the providerSummary .
|
description | string This field contains additional descriptive information about the transaction. |
checkNumber | number(integer) If this transaction represents a check drafted against this account, this is the check number. maximum: 4294967295
|
sourceAccountNumbers | accountNumbers The account number returned from the core. |
sourceAccountName | string The account name returned from the core. |
targetAccountNumbers | targetAccountNumbers The account number returned from the core. |
targetAccountName | string The account name returned from the core. |
transactionCode | string The transaction code returned from the core. |
postedOn | string(date) The date when the transaction was completed. This property is set only if the state is completed .
|
reversedOn | string(date) The date when the transaction was reversed. This property is set only if the state is reversed .
|
network | string The name of the settlement network that is the transaction source, one of:
|
holdState | holdState Indicates the hold state of the transaction. the holdState will be none if no hold is associated to the transaction; otherwise, the holdState will indicate if the hold is currently active or has expired .
|
holdAmount | money The amount of funds on hold. |
holdExpiresAt | string(date-time) The date-time when the hold will expire. This is an RFC 3369 formatted date-time string, YYYY-MM-DDThh:mm:ss.sssZ .
|
eft | electronicFundsTransfer The electronic funds transfer. This property exists only if network is eft .
|
ach | ach The automated clearing house transfer. This property exists only if network is ach .
|
transactions
{
"_profile": "https://api.apiture.com/schemas/transactions/transactions/v/profile.json",
"start": 10,
"limit": 10,
"count": 67,
"name": "transactions",
"_links": {
"self": {
"href": "/transactions/transactions?start=10&limit=10"
},
"first": {
"href": "/transactions/transactions?start=0&limit=10"
},
"next": {
"href": "/transactions/transactions?start=20&limit=10"
},
"collection": {
"href": "/transactions/transactions"
}
},
"_embedded": {
"items": [
{
"_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
"_profile": "https://api.apiture.com/schemas/transaction/v/profile.json",
"_links": {
"self": {
"href": "/transactions/transactions/0399abed-fd3d-4830-a88b-30f38b8a365c"
},
"apiture:account": {
"href": "/transactions/accounts/86de587e-a5a7-11e8-98d0-529269fb1459"
},
"apiture:organization": {
"href": "/transactions/organizations/86de587e-a5a7-11e8-98d0-529269fb1459"
}
},
"amount": {
"value": "35.00",
"currency": "USD"
},
"state": "pending",
"type": "debit",
"providerSummary": "gas station"
},
{
"_id": "d62c0701-0d74-4836-83f9-ebf3709442ea",
"_profile": "https://api.apiture.com/schemas/transaction/v/profile.json",
"_links": {
"self": {
"href": "/transactions/transactions/d62c0701-0d74-4836-83f9-ebf3709442ea"
},
"apiture:account": {
"href": "/transactions/accounts/86de587e-a5a7-11e8-98d0-529269fb1459"
},
"apiture:organization": {
"href": "/transactions/organizations/86de587e-a5a7-11e8-98d0-529269fb1459"
}
},
"amount": {
"value": "1000.00",
"currency": "USD"
},
"state": "pending",
"type": "debit",
"providerSummary": "donation"
}
]
}
}
Transaction Collection
Collection of transactions. The items in the collection are ordered in the _embedded
object with array items
. The top-level _links
object may contain pagination links (self
, next
, prev
, first
, last
, collection
).
When this repsonse is used for the getPendingTransactions
operation, the pagination links will reference /transactions/pendingTransactions
; when this repsonse is used for the getTransactions
operation, the pagination links will reference /transactions/transactions
; when this repsonse is used for the getHistory
operation, the pagination links will reference /transactions/history
. The example shows the response for getTransactions
.
Properties
Name | Description |
---|---|
_links | object An optional map of links, mapping each link relation to a link object. This model defines the _links object of HAL representations.
|
» additionalProperties | link Describes a hypermedia link within a _links object in HAL representations. In Apiture APIs, links are HAL links, but Apiture APIs do not use the name or hreflang properties of HAL. Apiture links may include a method property.
|
_embedded | object |
» items | [transaction] An array containing a page of transaction items. |
_profile | string(uri) The URI of a resource profile which describes the representation. |
_error | error An object which describes an error. This value is omitted if the operation succeeded without error. |
count | integer The number of items in the collection. This value is optional and my be omitted if the count is not computable efficiently. If a filter is applied to the collection (either implicitly or explicitly), the count, if present, indicates the number of items that satisfy the filter. |
start | integer The start index of this page of items. |
limit | integer The maximum number of items per page. |
name | string The name of the collection. |
attributes
{}
Attributes
An optional map of name/value pairs which contains additional dynamic data about the resource.
Properties
balance
{
"current": "3450.30",
"available": "3450.30",
"currency": "USD"
}
Account Balance
The balance of the account. This is derived data and not mutable through the API. Balances may be negative, indicating a deficit or loan balance.
Properties
Name | Description |
---|---|
current | string The string representation of the current account balance. This is an exact decimal representation of the numeric balance value. The current balance does not include pending transactions. read-only |
value | string The current balance. Note: This property is deprecated. Use balance.current instead. This property will be removed in the next release of this service.
read-only |
available | string The string representation of the exact decimal available balance. For deposit accounts, this reflects the amount that may be used for withdrawals or transfers. This field does not apply to debit accounts such as loans. read-only |
currency | string The ISO 4217 currency code for this balance. read-only |
money
{
"value": "3456.78",
"currency": "str"
}
Money
An amount of money in a specific currency.
Properties
Name | Description |
---|---|
value | string The net monetary value. A negative amount denotes a debit; a positive amount a credit. The numeric value is represented as a string so that it can be exact with no loss of precision. |
currency | string The ISO 4217 currency code for this monetary value. This is always upper case ASCII. TODO: ISO 4217 defines three-character codes. However, ISO 4217 does not account for cryptocurrencies. Of note, DASH uses 4 characters. minLength: 3
maxLength: 3
|
electronicFundsTransfer
{
"cashBackAmount": {
"amount": "123.45",
"currency": "USD"
},
"fee": "6.78",
"merchantAddress": {
"addressLine1": "100 Front St.",
"city": "Wilmington",
"regionCode": "NC",
"postalCode": "28401",
"countryCode": "US"
},
"panEntryMode": "manual"
}
Electronic Funds Transfer
Representaion of an electronic funds transfer.
Properties
Name | Description |
---|---|
cashBackAmount | money The amount in which the buyer receives cash at the time of purchase. |
fee | string Fees (if applicable). |
merchantAddress | address Merchant's full address. |
panEntryMode | string Indicates how the primary account number (PAN) was entered into the system. This value encodes ISO 8583 point of service PAN entry modes.
|
ach
{
"traceId": "1234567890"
}
Automated Clearing House Transfer
Representaion of an automated clearing house transfer.
Properties
Name | Description |
---|---|
traceId | string ACH Trace ID (threadId). |
address
{
"type": "home",
"addressLine1": "555 N Front Street",
"addressLine2": "Suite 5555",
"city": "Wilmington",
"regionCode": "NC",
"postalCode": "28401-5405",
"countryCode": "US"
}
Address
A postal address.
Properties
Name | Description |
---|---|
addressLine1 | string The first street address line of the address, normally a house number and street name. |
addressLine2 | string The optional second street address line of the address. |
city | string The name of the city or municipality. |
regionCode | string The mailing address region code, such as state in the US, or a province in Canada. |
postalCode | string The mailing address postal code, such as a US Zip or Zip+4 code, or a Canadian postal code. |
countryCode | string The ISO 3166-1 country code. minLength: 2
maxLength: 2
|
targetAccountNumbers
{
"masked": "*************3210",
"full": "9876543210"
}
Target Account Numbers
The account numbers necessary to link an target account.
Properties
Name | Description |
---|---|
masked | string A partial account number that does not contain all the digits of the full account number. This masked number appears in statements or in user experience presentation. It is sufficient for a user to differentiate this account from other accounts they hold, but is not sufficient for initiating transfers, etc. The first character is the mask character and is repeated; this does not indicate that the full account number is the same as the mask length. This value is derived and immutable. minLength: 9
maxLength: 32
|
full | string The full account number. This value only appears when ?unmasked=true is passed on the get request. Not included in the summary representation of the account that is included in account collection responses. minLength: 9
maxLength: 32
|
root
{
"id": "apiName",
"name": "API name",
"apiVersion": "1.0.0",
"_profile": "https://api.apiture.com/schemas/common/root/v1.0.0/profile.json",
"_links": {}
}
API Root
A HAL response, with hypermedia _links
for the top-level resources and operations in API.
Properties
Name | Description |
---|---|
_links | object An optional map of links, mapping each link relation to a link object. This model defines the _links object of HAL representations.
|
» additionalProperties | link Describes a hypermedia link within a _links object in HAL representations. In Apiture APIs, links are HAL links, but Apiture APIs do not use the name or hreflang properties of HAL. Apiture links may include a method property.
|
_embedded | object An optional map of nested resources, mapping each nested resource name to a nested resource representation. |
_profile | string(uri) The URI of a resource profile which describes the representation. |
_error | error An object which describes an error. This value is omitted if the operation succeeded without error. |
_id | string This API's unique ID. |
name | string This API's name. |
apiVersion | string This API's version. |
errorResponse
{
"_profile": "https://api.apiture.com/schemas/common/errorResponse/v1.0.0/profile.json",
"_error": {
"_id": "2eae46e1-575c-4d69-8a8f-0a7b0115a4b3",
"message": "The value for deposit must be greater than 0.",
"statusCode": 422,
"type": "positiveNumberRequired",
"attributes": {
"value": -125.5
},
"remediation": "Provide a value which is greater than 0",
"occurredAt": "2018-01-25T05:50:52.375Z",
"_links": {
"describedby": {
"href": "https://api.apiture.com/errors/positiveNumberRequired"
}
},
"_embedded": {
"errors": []
}
}
}
Error Response
Describes an error response, typically returned on 4xx or 5xx errors from API operations. The _error
object contains the error details.
Properties
Name | Description |
---|---|
_links | object An optional map of links, mapping each link relation to a link object. This model defines the _links object of HAL representations.
|
» additionalProperties | link Describes a hypermedia link within a _links object in HAL representations. In Apiture APIs, links are HAL links, but Apiture APIs do not use the name or hreflang properties of HAL. Apiture links may include a method property.
|
_embedded | object An optional map of nested resources, mapping each nested resource name to a nested resource representation. |
_profile | string(uri) The URI of a resource profile which describes the representation. |
_error | error An object which describes an error. This value is omitted if the operation succeeded without error. |
error
{
"_id": "2eae46e1-575c-4d69-8a8f-0a7b0115a4b3",
"message": "The value for deposit must be greater than 0.",
"statusCode": 422,
"type": "positiveNumberRequired",
"attributes": {
"value": -125.5
},
"remediation": "Provide a value which is greater than 0",
"occurredAt": "2018-01-25T05:50:52.375Z",
"_links": {
"describedby": {
"href": "https://developer.apiture.com/errors/positiveNumberRequired"
}
},
"_embedded": {
"errors": []
}
}
Error
Describes an error in an API request or in a service called via the API.
Properties
Name | Description |
---|---|
message | string (required) A localized message string describing the error condition. |
_id | string A unique identifier for this error instance. This may be used as a correlation ID with the root cause error (i.e. this ID may be logged at the source of the error). This is is an opaque string. |
statusCode | integer The HTTP status code associate with this error. minimum: 100
maximum: 599
|
type | string An error identifier which indicates the category of error and associate it with API support documentation or which the UI tier can use to render an appropriate message or hint. This provides a finer level of granularity than the statusCode . For example, instead of just 400 Bad Request, the type may be much more specific. such as integerValueNotInAllowedRange or numericValueExceedsMaximum or stringValueNotInAllowedSet .
|
occurredAt | string(date-time) An RFC 3339 UTC time stamp indicating when the error occurred. |
attributes | attributes Informative values or constraints which describe the error. For example, for a value out of range error, the attributes may specify the minimum and maximum values. This allows clients to present error messages as they see fit (the API does not assume the client/presentation tier). The set of attributes varies by error type .
|
remediation | string An optional localized string which provides hints for how the user or client can resolve the error. |
errors | [error] An optional array of nested error objects. This property is not always present. |
_links | links An optional map of links, mapping each link relation to a link object. This model defines the _links object of HAL representations.
|
_embedded | object Embedded objects. An error object may contain nested errors. For example, an API which validates its request body may find multiple errors in the request, which are returned with an error response with nested errors. These are held in an items array of errorResponse objects. _embedded or _embedded.items may not exist if the error does not have nested errors. This property is deprecated; use see error.errors instead.
|
» items | [errorResponse] An array of error objects. |
accountNumbers
{
"masked": "*************3210",
"full": "9876543210"
}
Account Numbers
Different representations of an account number.
Properties
Name | Description |
---|---|
masked | string A partial account number that does not contain all the digits of the full account number. This masked number appears in statements or in user experience presentation. It is sufficient for a user to differentiate this account from other accounts they hold, but is not sufficient for initiating transfers, etc. The first character is the mask character and is repeated; this does not indicate that the full account number is the same as the mask length. This value is derived and immutable. read-only minLength: 8
maxLength: 32
|
full | string The full account number. This value only appears when ?unmasked=true is passed on the GET request. Not included in the summary representation of the account that is included in account collection responses. This value is derived and immutable.
read-only minLength: 4
maxLength: 17
|
link
{
"href": "/contacts/contacts/328f6bf6-d762-422f-a077-ab91ca4d0b6f",
"title": "Applicant"
}
Link
Describes a hypermedia link within a _links
object in HAL representations. In Apiture APIs, links are HAL links, but Apiture APIs do not use the name
or hreflang
properties of HAL. Apiture links may include a method
property.
Properties
Name | Description |
---|---|
href | string(uri) (required) The URI or URI template for the resource/operation this link refers to. |
type | string The media type for the resource. |
templated | boolean If true, the link's href is a URI template. |
title | string An optional human-readable localized title for the link. |
deprecation | string(uri) If present, the containing link is deprecated and the value is a URI which provides human-readable text information about the deprecation. |
profile | string(uri) The URI of a profile document, a JSON document which describes the target resource/operation. |
links
{
"property1": {
"href": "/contacts/contacts/328f6bf6-d762-422f-a077-ab91ca4d0b6f",
"title": "Applicant"
},
"property2": {
"href": "/contacts/contacts/328f6bf6-d762-422f-a077-ab91ca4d0b6f",
"title": "Applicant"
}
}
Links
An optional map of links, mapping each link relation to a link object. This model defines the _links
object of HAL representations.
Properties
Name | Description |
---|---|
additionalProperties | link Describes a hypermedia link within a _links object in HAL representations. In Apiture APIs, links are HAL links, but Apiture APIs do not use the name or hreflang properties of HAL. Apiture links may include a method property.
|