-
Notifications
You must be signed in to change notification settings - Fork 0
Bank API
The DadeCore Bank API allows RESTful access to bank data inside DadeCore.
The overview provides general details on how the API works, while the resources section outlines each of the resource endpoints.
All requests to the API require authentication via an access token which must
be included in the HTTP request as a token Authorization header.
Authorization: Token token="<TOKEN>"
On POST and PATCH requests, the API accepts JSON-formatted request bodies.
Content-Type: application/json
Fields that are not required may be omitted from the request when creating or updating resources. Unsupported fields will be ignored.
All requests to the API should include an Accept header to indicate the
requested API version.
Accept: application/vnd.dade.core.v1+json
Some endpoints support pagination via the page and per_page parameters.
On paginated responses, a Link header will be present. The links in the
header should be used to traverse results instead of manually constructing URLs
with the required query parameters.
Link: </bank-api/billers?page=1>; rel="first",
</bank-api/billers?page=10>; rel="last",
</bank-api/billers?page=4>; rel="previous",
</bank-api/billers?page=6>; rel="next"
The API makes use of standard HTTP response status codes to indicate success and failure states.
-
200 OK— success -
201 Created— e.g. a new resource has been created- the
Locationresponse header indicates the new resource URL
- the
-
401 Unauthorized— e.g. an invalid access token- the
WWW-Authenticateheader indicates the required authentication method
- the
-
403 Forbidden— e.g. the token is valid but not for the given resource -
422 Unprocessable Entity— e.g. validation errors
Returns the API root, which includes the endpoints for the resources. API clients should use this response to lookup the resource URLs instead of hard-coding them into the client.
GET /bank-api
{
"billers_url": "/bank-api/billers{?active,name,page,per_page}",
"cluster_search_url": "/bank-api/clusters{?active,name,page,per_page}",
"clusters_url": "/bank-api/clusters",
"fund_import_format_search_url": "/bank-api/fund_import_formats?biller_id={biller_id}{&active,external_key,external_number,name,page,per_page}",
"fund_import_formats_url": "/bank-api/fund_import_formats",
"lockbox_import_format_search_url": "/bank-api/lockbox_import_formats?biller_id={biller_id}{&active,external_key,external_number,name,page,per_page}",
"lockbox_import_formats_url": "/bank-api/lockbox_import_formats"
}Returns the bank’s billers.
-
active— optional filter by active status (trueorfalse) -
name— optional filter by name -
page— optional page number (default1) -
per_page— optional results per page (default30; maximum100)
GET /bank-api/billers?per_page=10`
[
{
"active": true,
"cluster": {
"id": "1",
"name": "Cluster 1"
},
"external_key": "eb1",
"fund_import_format_search_url": "/bank-api/fund_import_formats?biller_id=83{&active,external_key,external_number,name,page,per_page}",
"id": "83",
"lockbox_import_format_search_url": "/bank-api/lockbox_import_formats?biller_id=83{&active,external_key,external_number,name,page,per_page}",
"name": "Example Biller 1"
}
]Creates a new biller.
-
active— optional (defaulttrue) -
cluster— optional-
id— required
-
-
external_key— required -
name— required
POST /bank-api/billers
{
"active": true,
"cluster": {
"id": "1"
},
"external_key": "eb1",
"name": "Example Biller 1"
}
{
"active": true,
"cluster": {
"id": "1",
"name": "Cluster 1"
},
"external_key": "eb1",
"fund_import_format_search_url": "/bank-api/fund_import_formats?biller_id=83{&active,external_key,external_number,name,page,per_page}",
"id": "83",
"lockbox_import_format_search_url": "/bank-api/lockbox_import_formats?biller_id=83{&active,external_key,external_number,name,page,per_page}",
"name": "Example Biller 1"
}Updates a biller.
-
active— optional -
cluster— optional-
id— required
-
-
external_key— optional -
name— optional
PATCH /bank-api/billers/83
{
"active": false,
"cluster": {
"id": "2"
},
"external_key": "eb2"
}
{
"active": false,
"cluster": {
"id": "2",
"name": "Cluster 2"
},
"external_key": "eb2",
"fund_import_format_search_url": "/bank-api/fund_import_formats?biller_id=83{&active,external_key,external_number,name,page,per_page}",
"id": "83",
"lockbox_import_format_search_url": "/bank-api/lockbox_import_formats?biller_id=83{&active,external_key,external_number,name,page,per_page}",
"name": "Example Biller 1"
}Returns the bank’s clusters, which can be used to group together billers.
-
active— optional filter by active status (trueorfalse) -
name— optional filter by name -
page— optional page number (default1) -
per_page— optional results per page (default30; maximum100)
GET /bank-api/clusters?per_page=10
[
{
"active": true,
"id": "3",
"name": "Cluster 1"
}
]Creates a new cluster.
-
active— optional (defaulttrue) -
name— required
POST /bank-api/clusters
{
"name": "Cluster 1"
}
{
"active": true,
"id": "3",
"name": "Cluster 1"
}Updates a cluster.
-
active— optional -
name— optional
PATCH /bank-api/clusters/3
{
"active": false,
}
{
"active": false,
"id": "3",
"name": "Cluster 1"
}GET /bank-api/fund_import_formats?biller_id={biller_id}{&active,external_key,external_number,name,page,per_page}
Returns a biller’s fund import formats.
-
active— optional filter by active status (trueorfalse) -
biller_id— required -
external_key— optional filter by external key -
external_number— optional filter by external number -
name— optional filter by name -
page— optional page number (default1) -
per_page— optional results per page (default30; maximum100)
GET /bank-api/fund_import_formats?active=true&biller_id=83
[
{
"active": true,
"biller": {
"id": "83"
},
"external_key": "ach1",
"external_number": "1234124522",
"id": "12",
"name": "ACH Import 1"
}
]Creates a new fund import format for the given biller.
-
active— optional (defaulttrue) -
biller— required-
id— required
-
-
external_key— required -
external_number— required -
name— required
POST /bank-api/fund_import_formats
{
"active": true,
"biller": {
"id": "83"
},
"external_key": "ach1",
"external_number": "1234124522",
"name": "ACH Import 1"
}
{
"active": true,
"biller": {
"id": "83"
},
"external_key": "ach1",
"external_number": "1234124522",
"id": "12",
"name": "ACH Import 1"
}Updates a biller fund import format.
-
active— optional -
external_key— optional -
external_number— optional -
name— optional
PATCH /bank-api/fund_import_formats/12
{
"active": false,
"external_key": "ach1",
"external_number": "1234124522",
"id": "12",
"name": "ACH Import 1"
}
{
"active": false,
"biller": {
"id": "83"
},
"external_key": "ach1",
"external_number": "1234124522",
"id": "12",
"name": "ACH Import 1"
}Returns a check or coupon image. These URLs should not be generated directly, but instead they should be taken from the payments response.
GET /bank-api/images/173/front
The response is binary date with the image contents, typically with a content
type of image/png.
GET /bank-api/lockbox_import_formats?biller_id={biller_id}{&active,external_key,external_number,name,page,per_page}
Returns a biller’s lockbox import formats.
-
active— optional filter by active status (trueorfalse) -
biller_id— required -
external_key— optional filter by external key -
external_number— optional filter by external number -
name— optional filter by name -
page— optional page number (default1) -
per_page— optional results per page (default30; maximum100)
GET /bank-api/lockbox_import_formats?active=true&biller_id=83
[
{
"active": true,
"biller": {
"id": "83"
},
"external_key": "lbx1",
"external_number": "512",
"id": "12",
"name": "Lockbox 1"
}
]Creates a new biller lockbox import format.
-
active— optional (defaulttrue) -
biller— required-
id— required
-
-
external_key— required -
external_number— required -
name— required
POST /bank-api/lockbox_import_formats
{
"active": true,
"biller": {
"id": "83"
},
"external_key": "lbx1",
"external_number": "512",
"name": "Lockbox 1"
}
{
"active": true,
"biller": {
"id": "83"
},
"external_key": "lbx1",
"external_number": "512",
"id": "12",
"name": "Lockbox 1"
}Updates a biller lockbox import format.
-
active— optional -
external_key— optional -
external_number— optional -
name— optional
PATCH /bank-api/lockbox_import_formats/12
{
"active": false,
"external_key": "lbx2",
"name": "Lockbox 2"
}{
"active": false,
"biller": {
"id": "83"
},
"external_key": "lbx2",
"external_number": "512",
"id": "12",
"name": "Lockbox 2"
}Returns a bank payment.
GET /bank-api/payments/728
{
"checks": [
{
"amount": "3984.36",
"front_image_url": "/bank-api/images/173/front",
"number": "4169",
"rear_image_url": "/bank-api/images/173/rear"
}
],
"coupons": [
{
"front_image_url": "/bank-api/images/174/front"
}
],
"id": "728",
"posted_date": "2019-02-15",
"total": "3984.36",
"type": "lockbox"
}