Update Account Details

Administrators have the ability to modify account details, specifically enabling users to update the account name, type or designate the account as searchable on the network. This functionality is restricted solely to administrators. To update account details, the administrator initiates a PUT request directed to the following endpoint:

https://cubi-sandbox-api.customersbank.com/accounts/v1/{accountId}

This request requires the additional data to be included in the path and the body of the request.
Path Parameter Data Element Details:

NameTypeDescription
accountIdstringunique identifier of an account

Body Parameter Data Element Details:

NameTypeDescription
namestring | nullname assigned to the account
searchablebooleanindicates if the account can be searched by other clients
controlTypestringindicates if the account is dual or single control. Can be one of the following: Dual; Single

Example Request:

PUT /accounts/v1/[ACCOUNT ID] HTTP/1.1
Host: cubi-sandbox-api.customersbank.com
Content-Type: application/json
Authorization: Bearer ••••••

{
    "name": "Test Account",
    "searchable": true
}

A successful request will generate a response of 202 – Accepted.

Error Handling
Common errors will include:
400 – Bad Request
401 – Unauthorized
403 – Forbidden
404 – Not Found
422 – Client Error
For guidance on troubleshooting error codes please consult the Error Code Handling section of this guide.


View All Accounts

Users have the ability to view account details on all accounts that are tagged as searchable within their client profile. Account details may include the account id, name, account number, if the account is frozen, the control type, and balances.
To view account details, initiate a GET request directed to the following endpoint:

https://cubi-sandbox-api.customersbank.com/accounts/v1/

This request requires the additional data to be included in the query of the request.

Query Parameter Data Element Details:

NameTypeDescription
accountNamestringname associated with account
paginateResultsbooleanindicates whether the request should be paginated
pageint32indicates the page to return
perPageint32indicates how many items are on a page
sortOnstringindicates the attribute which the data is sorted on
sortAscendingbooleanindicates if the data is sorted in ascending or descending order
balancesbooleanindicates if the balance will be displayed in the response

Example Request:

GET /accounts/v1 HTTP/1.1
Host: cubi-sandbox-api.customersbank.com
Authorization: Bearer ••••••

A successful request will generate a response of 200 – Ok.

Example Response:

{
    "pageSize": 100,
    "pageOffset": 0,
    "totalPages": 1,
    "totalItemCount": 2,
    "items": [
        {
            "id": "44040e53-2d2d-49f5-a1da-a5dd386fd9e8",
            "name": "Test Account 1",
            "accountNumber": "1169268",
            "isSearchable": true,
            "isFrozen": false,
            "controlType": "Single",
            "availableBalance": 55762.92,
            "balance": 55762.92
        },
        {
            "id": "367621ff-8007-489f-8bbc-6a43e2e2576d",
            "name": "Test Account 2",
            "accountNumber": "1126190",
            "isSearchable": true,
            "isFrozen": false,
            "controlType": "Dual",
            "availableBalance": 25172.14,
            "balance": 25172.14
        }
    ]
}

Response Data Element Details:

NameTypeDescription
pageSizeint32number of items displayed on a page
pageOffsetint32offset index indicating starting point for page items
totalPagesint32total number of pages
totalItemCountint32total count of items across all pages
itemsarray of objects | nullitems model
> idstringaccount id
> namestring | nullaccount name
> accountNumberstring | nullaccount number
> isSearchablebooleanindicates if the account can be searched by other clients
> isFrozenbooleanindicates if the account is frozen
> controlTypestringindicates if the account is dual or single control. Can be one of the following: Dual; Single
> availableBalancedoublethe account balance available for use
> balancedoublethe full balance in an account, whether available for use or not

Error Handling
Common errors will include:
400 – Bad Request
401 – Unauthorized
403 – Forbidden
404 – Not Found
422 – Client Error

For guidance on troubleshooting error codes please consult the Error Code Handling section of this guide.


View a Specific Account

Similar to the prior request, a user can obtain the same level of information for a specific account if they know the accountID. To get account information for a specific account, initiate a GET request directed to the following endpoint:

https://cubi-sandbox-api.customersbank.com/accounts/v1/{accountId}

This request requires the additional data to be included in the path of the request.
Path Parameter Data Element Details:

NameTypeDescription
accountIdstringunique identifier of an account

Example Request:

GET /accounts/v1/c61e4cb1-4cb9-4868-9cc0-1f789edbda90 HTTP/1.1
Host: cubi-sandbox-api.customersbank.com
Authorization: Bearer ••••••

A successful request will generate a response of 200 – Ok.

Example Response:

{
    "id": "c61e4cb1-4cb9-4868-9cc0-1f789edbda90",
    "name": "Test Account 1",
    "accountNumber": "1123123",
    "isSearchable": true,
    "isFrozen": false,
    "controlType": "Single",
    "availableBalance": 55799.93,
    "balance": 55799.93
}

Response Data Element Details:

NameTypeDescription
idstringaccount id
namestring | nullaccount name
accountNumberstring | nullaccount number
isSearchablebooleanindicates if the account can be searched by other clients
isFrozenbooleanindicates if the account is frozen
controlTypestringindicates if the account is dual or single control. Can be one of the following: Dual; Single
availableBalancedoublethe account balance available for use
balancedoublethe full balance in an account, whether available for use or not

Error Handling
Common errors will include:
400 – Bad Request
401 – Unauthorized
403 – Forbidden
404 – Not Found
422 – Client Error
For guidance on troubleshooting error codes please consult the Error Code Handling section of this guide.


View Transactions

A user has the ability to view details for all transactions within a specified date range.
To view transactions, initiate a GET request directed to the following endpoint:

https://cubi-sandbox-api.customersbank.com/accounts/v1/{accountId}/transactions

This request requires the additional data to be included in the path and query of the request.
Path Parameter Data Element Details:

NameTypeDescription
accountIdstringunique identifier of an account

Query Parameter Data Element Details:

NameTypeDescription
fromDatedate-time (as date-time in RFC3339)starting date
toDatedate-time (as date-time in RFC3339)ending date
pageint32indicates the page to return
perPageint32indicates how many items are on a page

Example Request:

GET /accounts/v1/c61e4cb1-4cb9-4868-9cc0-1f789edbda90/transactions HTTP/1.1
Host: cubi-sandbox-api.customersbank.com
Authorization: Bearer ••••••

A successful request will generate a response of 200 – Ok.

Example Response:

{
    "transactions": [
      {
          "description": "INCOMING WIRE FROM COUNTERPARTY test   ",
          "transactionCode": "148",
          "transactionCodeDescription": "A2A TRSF CREDIT",
          "postingDate": "2024-06-04T00:00:00",
          "amount": 5.28,
          "serialNumber": "46000000000",
          "controlNumber": "000000000000460",
          "transactionType": "C",
          "rail": "Wire",
          "id": "c15664bb-2eda-4893-83fe-b185009da7ac"
      },
      {
          "description": "INCOMING WIRE FROM COUNTERPARTY test 2   ",
          "transactionCode": "148",
          "transactionCodeDescription": "A2A TRSF CREDIT",
          "effectiveDate": "2024-06-03T00:00:00",
          "postingDate": "2024-06-03T00:00:00",
          "amount": 3.56,
          "serialNumber": "44500000000",
          "controlNumber": "000000000000445",
          "transactionType": "C",
          "rail": "Wire",
          "id": "80cb278e-66c4-48ae-9f1e-b18400c368e0"
      }
    ],
    "hasMorePages": false
}

Response Data Element Details:

NameTypeDescription
transactionsarray of objects | nulltransactions model
> descriptionstring | nulldescription associated with the transaction
> transactionCodestring | nulltransaction code
> transactionCodeDescription /string | nulltransaction code description
> effectiveDatedate-time | nulldate transaction occurred
> postingDatedate-time | nulldate transaction was recorded
> amountdoubleamount of transaction
> serialNumberstring | null
> controlNumberstring | null
> transactionTypestring | null
> railstringpayment rail associated with the transaction. Can be one of the following: BookTransfer; Wire; Ach; Rtp; FedNow
> idstring | nulltransaction id
hasMorePagesbooleanindicates there are more pages included in the response

Error Handling
Common errors will include:
400 – Bad Request
401 – Unauthorized
403 – Forbidden
404 – Not Found
422 – Client Error

For guidance on troubleshooting error codes please consult the Error Code Handling section of this guide.