### Get All Accounts Source: https://docs.treasuryprime.com/docs/getting-started Retrieves a list of all available accounts in the Developer Sandbox. This endpoint is useful for getting an overview of existing accounts and their basic details. ```APIDOC ## GET /account ### Description Retrieves a list of all available accounts. Useful for initial setup and overview. ### Method GET ### Endpoint https://api.sandbox.treasuryprime.com/account ### Parameters #### Query Parameters None #### Request Body None ### Request Example ```bash curl -u "$API_KEY_ID:$API_SECRET_KEY" https://api.sandbox.treasuryprime.com/account ``` ### Response #### Success Response (200) - **data** (array) - An array of account objects. - **total_estimated** (integer) - The total number of accounts. #### Response Example ```json { "data": [ { "account_type": "savings", "bank_id": "bank_treasuryprime", "updated_at": "2021-02-01T16:32:34Z", "currency": null, "routing_number": "000000000", "account_number": "123000012345", "id": "acct_qda4pJZfpzn4fc", "created_at": "2021-01-13T15:05:14Z", "userdata": null }, { "account_type": "checking", "bank_id": "bank_treasuryprime", "updated_at": "2021-02-01T16:32:34Z", "currency": null, "routing_number": "000000000", "account_number": "123000067890", "id": "acct_wVwR87rxhMRdwD", "created_at": "2021-01-13T15:05:13Z", "userdata": null } ], "total_estimated": 10 } ``` ``` -------------------------------- ### Example GET Request with Pagination - Treasury Prime API Source: https://docs.treasuryprime.com/reference/introduction Illustrates an example GET request to the Treasury Prime API for retrieving counterparty data. It demonstrates the use of 'page_size' and 'page_cursor' for pagination and requires API key authentication. ```bash $ curl "https://api.treasuryprime.com/counterparty?page_size=2&page_cursor=cp_10" \ -u $API_KEY_ID:$API_KEY_VALUE ``` -------------------------------- ### Configure Authentication Environment Variables Source: https://docs.treasuryprime.com/ Sets the API Key ID and Secret Key as environment variables in the command line for use in subsequent authenticated requests. ```bash export API_KEY_ID= export API_SECRET_KEY= ``` -------------------------------- ### Get All Accounts (Bash) Source: https://docs.treasuryprime.com/docs/getting-started Retrieves a list of all accounts associated with your API key. This is the first step to identifying an account for balance checks. It requires your API key ID and secret key for authentication. ```bash curl -u "$API_KEY_ID:$API_SECRET_KEY" https://api.sandbox.treasuryprime.com/account ``` -------------------------------- ### Retrieve Account Information Source: https://docs.treasuryprime.com/ Fetches a list of available accounts or specific account details using the account endpoint. Requires valid API credentials passed via Basic Auth. ```bash # List all accounts curl -u "$API_KEY_ID:$API_SECRET_KEY" https://api.sandbox.treasuryprime.com/account # Get specific account details curl -u "$API_KEY_ID:$API_SECRET_KEY" https://api.sandbox.treasuryprime.com/account/:id ``` -------------------------------- ### API Object Listing and Filtering (Bash) Source: https://docs.treasuryprime.com/reference/filtering Demonstrates how to list and filter API objects, specifically ACH objects, using a GET request with query parameters. The example shows filtering by 'status=pending' and includes an example response. ```bash GET <>/$OBJECT_PATH ``` ```bash $ curl https://api.treasuryprime.com/ach?status=pending" \ -u $API_KEY_ID:$API_KEY_VALUE ``` ```json { "data": [ { "account_id": "acct_123", "amount": "10.00", "counterparty_id": "cp_123", "created_at": "2018-10-30T23:57:11Z", "description": null, "direction": "credit", "effective_date": "2018-10-30T23:57:11Z", "id": "ach_1234567890", "sec_code": "ccd", "service": "standard", "status": "pending", "updated_at": "2018-10-30T23:57:11Z", "userdata": null }, { "account_id": "acct_456", "amount": "1.00", "counterparty_id": "cp_456", "created_at": "2018-10-30T23:57:09Z", "description": null, "direction": "credit", "effective_date": "2018-10-30T23:57:09Z", "id": "ach_1234567891", "sec_code": "ccd", "service": "standard", "status": "pending", "updated_at": "2018-10-30T23:57:09Z", "userdata": null } ], "page_next": "https://api.treasuryprime.com/ach?page_cursor=acct_456" } ``` -------------------------------- ### Configure API Credentials and Test Connectivity Source: https://docs.treasuryprime.com/docs/getting-started Sets environment variables for authentication and performs a health check request to the Treasury Prime API using curl and HTTP Basic Auth. ```bash export API_KEY_ID= export API_SECRET_KEY= curl -u "$API_KEY_ID:$API_SECRET_KEY" https://api.sandbox.treasuryprime.com/ping ``` -------------------------------- ### Create an Initial Deposit via ACH Source: https://docs.treasuryprime.com/docs/opening-an-account Demonstrates how to fund a new account by making a POST request to the deposit endpoint. The request includes the amount and the ACH source details. ```bash curl -u $API_KEY_ID:$API_SECRET_KEY https://api.treasuryprime.com/apply/deposit \ -H 'Content-Type: application/json' \ -d '{ "amount": "100.00", "ach": { "account_number": "2020611", "account_type": "checking", "routing_number": "123123123" }, "name_on_account": "George Washington" }' ``` -------------------------------- ### Create a Business Application via API Source: https://docs.treasuryprime.com/docs/opening-an-account Demonstrates how to submit a POST request to the business_application endpoint. It requires business details and an array of person_applications with their respective roles and ownership percentages. ```bash curl -u $API_KEY_ID:$API_SECRET_KEY https://api.treasuryprime.com/apply/business_application \ -H 'Content-Type: application/json' \ -d '{ "description": "Our company is engaged in the buying and selling of goods", "established_on": "2014-08-01", "incorporation_state": "DE", "legal_structure": "llc", "mailing_address": { "street_line_1": "1300 L St", "city": "Sacramento", "state": "CA", "postal_code": "95814" }, "naics": "42", "naics_description": "Wholesale Trade", "name": "Acme Goods Inc", "person_applications": [ { "id": "apsn_11g55jve4455", "roles": ["signer"], "ownership_percentage": 60, "title": "CEO" }, { "id": "apsn_11g55kan445a", "roles": ["control_person", "signer"], "ownership_percentage": 20, "title": "CFO" } ], "phone_number": "4155551111", "physical_address": { "street_line_1": "115 West St", "city": "Benicia", "state": "CA", "postal_code": "94510" }, "tin": "11-3344555" }' ``` -------------------------------- ### Get Account Details and Balance Source: https://docs.treasuryprime.com/docs/getting-started Retrieves detailed information for a specific account, including its available balance. This is useful for checking the current financial status of an account. ```APIDOC ## GET /account/:id ### Description Retrieves the details for a specific account, including the available balance. ### Method GET ### Endpoint https://api.sandbox.treasuryprime.com/account/:id ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the account (e.g., `acct_2w458dsi392h2m`). #### Query Parameters None #### Request Body None ### Request Example ```bash curl -u "$API_KEY_ID:$API_SECRET_KEY" https://api.sandbox.treasuryprime.com/account/:id ``` ### Response #### Success Response (200) - **address** (object) - The address associated with the account. - **account_type** (string) - The type of the account (e.g., 'checking', 'savings'). - **bank_id** (string) - The ID of the bank. - **person_ids** (array) - An array of person IDs associated with the account. - **available_balance** (string) - The amount of money in the account that is immediately available for transactions. - **name** (string) - The name associated with the account. - **updated_at** (string) - The timestamp when the account was last updated. - **currency** (string) - The currency of the account (e.g., 'USD'). - **routing_number** (string) - The routing number of the bank. - **status** (string) - The current status of the account (e.g., 'open'). - **primary_person_id** (string) - The ID of the primary person associated with the account. - **account_number** (string) - The account number. - **locked** (boolean) - Indicates if the account is locked. - **id** (string) - The unique identifier of the account. - **funded** (boolean) - Indicates if the account is funded. - **business_ids** (array) - An array of business IDs associated with the account. - **current_balance** (string) - The current total balance of the account. - **created_at** (string) - The timestamp when the account was created. - **userdata** (object) - User-defined data associated with the account. #### Response Example ```json { "address": { "street_line_1": "123 Kearny St", "street_line_2": null, "city": "San Francisco", "state": "CA", "postal_code": "94102" }, "account_type": "checking", "bank_id": "bank_treasuryprime", "person_ids": ["psn_26a98dsf184j7a"], "available_balance": "5000.00", "name": "Account Owner", "updated_at": "2021-01-28T14:47:13Z", "currency": "USD", "routing_number": "000000000", "status": "open", "primary_person_id": "psn_26a98dsf184j7a", "account_number": "098234989485", "locked": false, "id": "acct_23f18dja392m60", "funded": false, "business_ids": [], "current_balance": "5000.00", "created_at": "2021-01-28T14:47:11Z", "userdata": null } ``` ``` -------------------------------- ### Account Endpoint Source: https://docs.treasuryprime.com/docs/getting-started The /account endpoint is related to account management within the Treasury Prime API. ```APIDOC ## GET /account ### Description Retrieves account information. Specific details depend on the API's implementation for this endpoint. ### Method GET ### Endpoint https://api.sandbox.treasuryprime.com/account ### Parameters #### Query Parameters None #### Request Body None ### Authentication Requires authentication, typically via API keys passed in headers or Basic Auth. ### Request Example ```bash curl -u "$API_KEY_ID:$API_SECRET_KEY" https://api.sandbox.treasuryprime.com/account ``` ### Response #### Success Response (200) - Details of the account (specific fields not provided in the source text). #### Response Example (Example response structure not provided in the source text) ``` -------------------------------- ### Create Personal Account Application using Treasury Prime API Source: https://docs.treasuryprime.com/docs/opening-an-account This bash command demonstrates how to create a personal account application via the Treasury Prime API. It sends a POST request to the `/apply/account_application` endpoint with a JSON payload specifying the `person_applications`, `primary_person_application_id`, and `account_product_id`. Authentication is handled via API key ID and secret key. ```bash curl -u $API_KEY_ID:$API_SECRET_KEY https://api.treasuryprime.com/apply/account_application \ -H 'Content-Type: application/json' \ -d '{ "person_applications": [ { "id": "apsn_01d5w6yaa6vt", "roles": ["owner", "signer"] } ], "primary_person_application_id": "apsn_01d5w6yaa6vt", "account_product_id": "apt_11gqk87qmrax" }' ``` -------------------------------- ### Get Specific Account Details and Balance (Bash) Source: https://docs.treasuryprime.com/docs/getting-started Fetches detailed information for a specific account, including its current and available balance. This endpoint requires the unique account ID obtained from the 'Get All Accounts' call. Authentication with API keys is necessary. ```bash curl -u "$API_KEY_ID:$API_SECRET_KEY" https://api.sandbox.treasuryprime.com/account/:id ``` -------------------------------- ### Ping Endpoint Source: https://docs.treasuryprime.com/docs/getting-started The /ping endpoint is used to validate API keys and check the health of the API. It requires HTTP Basic Authentication. ```APIDOC ## GET /ping ### Description Verifies API key validity and checks API health. ### Method GET ### Endpoint https://api.sandbox.treasuryprime.com/ping ### Parameters #### Query Parameters None #### Request Body None ### Authentication HTTP Basic Auth using API Key ID as username and API Secret Key as password. ### Request Example ```bash curl -u "$API_KEY_ID:$API_SECRET_KEY" https://api.sandbox.treasuryprime.com/ping ``` ### Response #### Success Response (200) - **api_version** (string) - The API version. - **version** (string) - The service version. - **time** (string) - The current server time. #### Response Example ```json { "api_version": "1", "version": "1.11.207-gb5accf2c", "time": "2021-02-25T01:59:23.091Z" } ``` ``` -------------------------------- ### Create Person Application Request - Bash Source: https://docs.treasuryprime.com/docs/opening-an-account This bash script demonstrates how to make a POST request to the person_application endpoint to create a new person application. It includes authentication headers and a JSON payload with personal details. The response contains an ID for the created application. ```bash curl -u $API_KEY_ID:$API_SECRET_KEY https://api.treasuryprime.com/apply/person_application \ -H 'Content-Type: application/json' \ -d '{ "citizenship": "US", "date_of_birth": "1980-02-22", "email_address": "[email protected]", "first_name": "George", "last_name": "Washington", "phone_number": "2025551111", "physical_address": { "street_line_1": "1600 Pennsylvania Ave", "city": "Washington", "state": "DC", "postal_code": "20500", "country": "US" }, "tin": "111222444" }' ``` -------------------------------- ### Validate API Connection Source: https://docs.treasuryprime.com/ Uses curl to send an authenticated request to the ping endpoint to verify that the provided API credentials are valid. ```bash curl -u "$API_KEY_ID:$API_SECRET_KEY" https://api.sandbox.treasuryprime.com/ping ``` -------------------------------- ### Create Account Application with Initial Deposit via cURL Source: https://docs.treasuryprime.com/docs/opening-an-account Submits a POST request to create an account application that includes an initial funding deposit. This requires the deposit_id in addition to the standard business or personal application parameters. ```bash curl -u $API_KEY_ID:$API_SECRET_KEY https://api.treasuryprime.com/apply/account_application \ -H 'Content-Type: application/json' \ -d '{ "deposit_id": "adpt_11g55kqm445g", "business_application_id": "abus_11g55khf445e", "primary_person_application_id": "apsn_11g55jve4455", "account_product_id": "apt_11gqk87qmrax", }' ``` -------------------------------- ### Simulate Card Authorization Request Source: https://docs.treasuryprime.com/docs/testing-cards Creates a mock authorization request for a card at a specific merchant. This simulates the initial swipe at a point of sale and is verified against card controls. Requires API key, card ID, amount, and merchant details. ```bash curl -u $API_KEY_ID:$API_KEY_VALUE https://api.sandbox.treasuryprime.com/simulation \ -H 'Content-Type: application/json' \ -d '{"type": "card_event.auth_request", "simulation": { "card_id": "card_104", "amount": "25.10", "merchant": { "mcc": "5411", "mid": "4445025949032", "name": "KROGER #10626", "address": {"city": "LAS VEGAS", "state": "NV", "country": "USA", "postal_code": "88901"}}}}' ``` -------------------------------- ### Retrieve Business Information via API (Bash) Source: https://docs.treasuryprime.com/docs/opening-an-account Illustrates how to retrieve information about a business linked to an account. This requires a GET request to the /business/:id endpoint, utilizing the business ID. ```bash curl -u $API_KEY_ID:$API_SECRET_KEY https://api.treasuryprime.com/business/com_11g55kw6446a ``` -------------------------------- ### POST /apply/account_application Source: https://docs.treasuryprime.com/docs/opening-an-account Creates a new account application. Supports personal, joint, and business account types, with optional initial deposit funding. ```APIDOC ## POST /apply/account_application ### Description Creates a new account application for personal or business entities. Can be configured for joint accounts or include an initial deposit. ### Method POST ### Endpoint https://api.treasuryprime.com/apply/account_application ### Parameters #### Request Body - **person_applications** (array) - Optional - List of person application objects for joint accounts. - **primary_person_application_id** (string) - Required - The ID of the primary person application. - **business_application_id** (string) - Optional - The ID of the business application. - **account_product_id** (string) - Required - The ID of the account product. - **deposit_id** (string) - Optional - The ID of an existing deposit to fund the account. ### Request Example { "business_application_id": "abus_11sen7m398ab", "primary_person_application_id": "apsn_11g55jve4455", "account_product_id": "apt_11gqk87qmrax" } ### Response #### Success Response (200) - **id** (string) - The unique identifier for the account application. - **status** (string) - Current status of the application (e.g., "submitted"). - **created_at** (string) - Timestamp of creation. #### Response Example { "id": "aact_11g55mh84484", "status": "submitted", "account_product_id": "apt_11gqk87qmrax" } ``` -------------------------------- ### Get Card Product ID Source: https://docs.treasuryprime.com/docs/issuing-a-card Retrieve the Card Product ID, which serves as a template for issuing cards. Make a GET request to the /cardproduct endpoint to get a list of Card Product objects and select the desired ID. ```APIDOC ## GET /cardproduct ### Description Retrieves a list of available card products. ### Method GET ### Endpoint /cardproduct ### Parameters #### Query Parameters None #### Request Body None ### Request Example ```bash curl -u $API_KEY_ID:$API_SECRET_KEY https://api.treasuryprime.com/cardproduct ``` ### Response #### Success Response (200) - **data** (array) - A list of Card Product objects. - **created_at** (string) - The timestamp when the card product was created. - **updated_at** (string) - The timestamp when the card product was last updated. - **card_back_image_file_id** (string or null) - The ID of the card back image file. - **type** (string) - The type of card product (e.g., 'virtual'). - **card_front_image_file_id** (string or null) - The ID of the card front image file. - **status** (string) - The status of the card product (e.g., 'active'). - **id** (string) - The unique identifier for the card product. - **userdata** (object or null) - User-defined data associated with the card product. - **total_estimated** (integer) - The total estimated number of card products. #### Response Example ```json { "data": [ { "created_at": "2021-02-09T18:58:31Z", "updated_at": "2021-02-09T18:58:31Z", "card_back_image_file_id": null, "type": "virtual", "card_front_image_file_id": null, "status": "active", "id": "cdpt_xjwj391iu6rv", "userdata": null }, { "created_at": "2021-02-02T21:31:14Z", "updated_at": "2021-02-02T21:31:14Z", "card_back_image_file_id": null, "type": "virtual", "card_front_image_file_id": null, "status": "active", "id": "cdpt_b7z5bfb0my2u", "userdata": null } ], "total_estimated": 10 } ``` ``` -------------------------------- ### POST /apply/deposit Source: https://docs.treasuryprime.com/docs/opening-an-account Initiates a deposit to fund a new account using ACH or debit card information. ```APIDOC ## POST /apply/deposit ### Description Funds a new account application by creating a deposit record using external account details. ### Method POST ### Endpoint https://api.treasuryprime.com/apply/deposit ### Parameters #### Request Body - **amount** (string) - Required - The amount to deposit - **ach** (object) - Required - ACH details including account_number and routing_number - **name_on_account** (string) - Required - Name of the account holder ### Request Example { "amount": "100.00", "ach": { "account_number": "2020611", "account_type": "checking", "routing_number": "123123123" }, "name_on_account": "George Washington" } ### Response #### Success Response (200) - **id** (string) - Unique identifier for the deposit - **amount** (string) - The processed amount ``` -------------------------------- ### Get Account ID Source: https://docs.treasuryprime.com/docs/issuing-a-card Retrieve the Account ID required for card issuance by making a GET request to the /account endpoint. This returns a list of Account objects, from which you can select the appropriate account ID. ```APIDOC ## GET /account ### Description Retrieves a list of accounts associated with the user. ### Method GET ### Endpoint /account ### Parameters #### Query Parameters None #### Request Body None ### Request Example ```bash curl -u $API_KEY_ID:$API_SECRET_KEY https://api.treasuryprime.com/account ``` ### Response #### Success Response (200) - **data** (array) - A list of Account objects. - **account_type** (string) - The type of the account (e.g., 'savings', 'checking'). - **bank_id** (string) - The ID of the bank. - **updated_at** (string) - The timestamp when the account was last updated. - **currency** (string or null) - The currency of the account. - **routing_number** (string) - The routing number of the account. - **account_number** (string) - The account number. - **id** (string) - The unique identifier for the account. - **created_at** (string) - The timestamp when the account was created. - **userdata** (object or null) - User-defined data associated with the account. - **total_estimated** (integer) - The total estimated number of accounts. #### Response Example ```json { "data": [ { "account_type": "savings", "bank_id": "bank_treasuryprime", "updated_at": "2021-02-01T16:32:34Z", "currency": null, "routing_number": "000000000", "account_number": "123000012345", "id": "acct_qda4pJZfpzn4fc", "created_at": "2021-01-13T15:05:14Z", "userdata": null }, { "account_type": "checking", "bank_id": "bank_treasuryprime", "updated_at": "2021-02-01T16:32:34Z", "currency": null, "routing_number": "000000000", "account_number": "123000067890", "id": "acct_wVwR87rxhMRdwD", "created_at": "2021-01-13T15:05:13Z", "userdata": null } ], "total_estimated": 10 } ``` ``` -------------------------------- ### Retrieve Account Products using Treasury Prime API Source: https://docs.treasuryprime.com/docs/opening-an-account This bash command uses `curl` to make a GET request to the Treasury Prime API's `/account_product` endpoint. It requires authentication using an API key ID and secret key. The response is expected to be a JSON object containing a list of available account products. ```bash curl -u $API_KEY_ID:$API_SECRET_KEY https://api.treasuryprime.com/account_product \ -H 'Content-Type: application/json' ``` -------------------------------- ### Create Person Application Response - Bash Source: https://docs.treasuryprime.com/docs/opening-an-account This bash script shows an example JSON response from the person_application endpoint after successfully creating a person application. The response includes details of the application and a unique 'id' property that is crucial for subsequent API calls. ```bash { "bankdata": null, "citizenship": "US", "created_at": "2019-05-15T03:39:26Z", "date_of_birth": "1980-02-22", "document_ids": [], "email_address": "[email protected]", "first_name": "George", "gov_id": null, "id": "apsn_11g55jve4455", "last_name": "Washington", "mailing_address": null, "middle_name": null, "occupation": null, "person_id": null, "phone_number": "+1 202-555-1111", "physical_address": { "city": "Washington", "postal_code": "20500", "state": "DC", "street_line_1": "1600 Pennsylvania Ave", "street_line_2": null, "country": "US" }, "secondary_email_address": null, "updated_at": "2019-05-15T03:39:26Z", "user_id": null, "userdata": null } ``` -------------------------------- ### GET /counterparty Source: https://docs.treasuryprime.com/reference/pagination Fetches a list of counterparty objects with optional pagination parameters applied. Results are returned in reverse chronological order. ```APIDOC ## GET /counterparty ### Description Fetches a list of counterparty objects with optional pagination parameters applied. Results are returned in reverse chronological order. ### Method GET ### Endpoint `https://api.treasuryprime.com/counterparty` ### Parameters #### Query Parameters - **page_cursor** (string) - Optional - Pagination cursor, value is the object ID. Used to fetch the next set of results. - **page_size** (number) - Optional - Limits the number of objects in the returned list. Must be a number greater than or equal to 1. Defaults to `100`. - **from_date** (string) - Optional - Lists objects created on the date provided and onwards. Date must be in ISO 8601 format ("YYYY-MM-DD"). - **to_date** (string) - Optional - Lists objects created before the date provided. Date must be in ISO 8601 format ("YYYY-MM-DD"). ### Request Example ```bash curl "https://api.treasuryprime.com/counterparty?page_size=2&page_cursor=cp_10" \ -u $API_KEY_ID:$API_KEY_VALUE ``` ### Response #### Success Response (200) - **data** (array) - A list of counterparty objects. - **page_next** (string) - A URL containing the cursor for the next page of results. #### Response Example ```json { "data": [ { "ach": { "account_number": "64141601", "account_type": "checking", "routing_number": "021001208" }, "created_at": "2018-10-30T22:30:09Z", "id": "cp_9", "name": "John Smith", "updated_at": "2018-10-30T22:30:09Z", "userdata": null, "wire": null }, { "ach": { "account_number": "54545454", "account_type": "checking", "routing_number": "021001208" }, "created_at": "2018-10-30T22:20:09Z", "id": "cp_8", "name": "Jane Doe", "updated_at": "2018-10-30T22:20:09Z", "userdata": null, "wire": null } ], "page_next": "https://api.treasuryprime.com/counterparty?page_cursor=cp_8" } ``` ``` -------------------------------- ### Return an incoming ACH transfer via API Source: https://docs.treasuryprime.com/docs/returning-incoming-ach Demonstrates how to initiate an ACH return by updating the status of an incoming ACH transaction to 'return'. Requires an API key and a valid return code. ```bash curl -X PATCH \ -u $API_KEY_ID:$API_KEY_VALUE \ {% api-endpoint /%}/incoming_ach/inach_11jdq4073ea9k \ -H 'Content-Type: application/json' \ -d '{ "status": "return", "return_code": "R29", "description": "Returned as unauthorized" }' ``` -------------------------------- ### Webhook Payload Example (Bash) Source: https://docs.treasuryprime.com/reference/webhook This example demonstrates the structure of a webhook payload sent by the Treasury Prime API. It includes event details, operation type, resource ID, and the API endpoint for the resource. This payload is typically sent via an HTTP POST request. ```bash POST https://example.application.com/notify { "event": "ach.update", "op": "update", "id": "ach_01123456789", "url": "https://api.treasuryprime.com/ach/ach_01123456789" } ``` -------------------------------- ### Get Account Details for Person ID (Bash) Source: https://docs.treasuryprime.com/docs/issuing-a-card Retrieves account details, including primary and associated person IDs, by making a GET request to the accounts endpoint. This is a prerequisite for associating a card with a specific person. Requires an API key and the account ID. ```bash curl -u $API_KEY_ID:$API_SECRET_KEY https://api.treasuryprime.com/account/:id ``` -------------------------------- ### Incoming ACH Credit Description Example (JSON) Source: https://docs.treasuryprime.com/docs/incoming-ach This example illustrates the format of the `desc` field within a Transaction object for an inbound ACH credit. The value typically starts with 'INCOMING ACH CREDIT' and may include additional details from the original ACH. ```json "desc": "INCOMING ACH CREDIT PAYPAL [091000015555123][PPD]" ``` -------------------------------- ### Example Treasury Prime API Response for Account Products List Source: https://docs.treasuryprime.com/docs/opening-an-account This JSON structure shows a list of account products available through the Treasury Prime API. Each product includes its type, creation and update timestamps, a unique ID, name, ownership type, and user-defined data. The `id` property is crucial for subsequent account application requests. ```json { "data": [ { "account_type": "checking", "created_at": "2021-10-27T18:56:55Z", "id": "apt_11gqk87qmrax", "name": "Personal checking", "ownership": "personal", "updated_at": "2021-10-27T18:56:55Z", "userdata": null }, ... ] } ``` -------------------------------- ### Retrieve Card Product IDs Source: https://docs.treasuryprime.com/docs/issuing-a-card Fetches a list of available card products to identify the template ID for new cards. This is a GET request to the /cardproduct endpoint. ```bash curl -u $API_KEY_ID:$API_SECRET_KEY https://api.treasuryprime.com/cardproduct ``` -------------------------------- ### POST /apply/business_application Source: https://docs.treasuryprime.com/docs/opening-an-account Creates a new business application for a bank account, including associated person applications. ```APIDOC ## POST /apply/business_application ### Description Creates a business application by providing company details and associating individuals via their person application IDs. ### Method POST ### Endpoint https://api.treasuryprime.com/apply/business_application ### Parameters #### Request Body - **name** (string) - Required - Legal name of the business - **legal_structure** (string) - Required - Business structure (e.g., llc) - **tin** (string) - Required - Tax Identification Number - **person_applications** (array) - Required - List of person application objects with roles and ownership - **mailing_address** (object) - Required - Business mailing address - **physical_address** (object) - Required - Business physical address ### Request Example { "name": "Acme Goods Inc", "legal_structure": "llc", "tin": "11-3344555", "person_applications": [ { "id": "apsn_11g55jve4455", "roles": ["signer"], "ownership_percentage": 60, "title": "CEO" } ] } ### Response #### Success Response (200) - **id** (string) - Unique identifier for the business application - **bank_id** (string) - The bank associated with the application #### Response Example { "id": "abus_11g55khf445e", "name": "Acme Goods Inc", "status": "pending" } ``` -------------------------------- ### API Pagination Response Structure Source: https://docs.treasuryprime.com/reference/pagination An example of the JSON response returned by the Treasury Prime API. It includes a list of data objects and a 'page_next' URL for fetching the subsequent page of results. ```json { "data": [ { "ach": { "account_number": "64141601", "account_type": "checking", "routing_number": "021001208" }, "created_at": "2018-10-30T22:30:09Z", "id": "cp_9", "name": "John Smith", "updated_at": "2018-10-30T22:30:09Z", "userdata": null, "wire": null }, { "ach": { "account_number": "54545454", "account_type": "checking", "routing_number": "021001208" }, "created_at": "2018-10-30T22:20:09Z", "id": "cp_8", "name": "Jane Doe", "updated_at": "2018-10-30T22:20:09Z", "userdata": null, "wire": null } ], "page_next": "https://api.treasuryprime.com/counterparty?page_cursor=cp_8" } ```