# Jiko Customer API

## Introduction

Welcome to the Jiko Customer API Reference! Jiko enables you to integrate money storage and movement, backed by the safety and security of US Treasury Bills. Use the Customer API if you are a Jiko customer integrating Jiko directly into your internal systems.

**For questions regarding authorization for the Customer API, please visit [our OAuth guide](/products/customer-api/guides/oauth/getting-started)**


Version: Version: e5dd1ef9

## Servers

Production server
```
https://api.business.jiko.io
```

Sandbox server
```
https://customer-api.sandbox-api.jikoservices.com
```

## Security

### CodeBearer

Type: oauth2

## Download OpenAPI description

[Jiko Customer API](https://docs.jiko.io/_bundle/products/customer-api/reference.yaml)

## Pockets

### List Customer Pockets

 - [GET /api/v2/pockets/](https://docs.jiko.io/products/customer-api/reference/pockets/list_customer_pockets_api_v2_pockets__get.md): This endpoint lists all the pockets for a given customer. It returns a Pockets object which is a paginated list of Pocket objects.

### Create Customer Pocket

 - [POST /api/v2/pockets/](https://docs.jiko.io/products/customer-api/reference/pockets/create_customer_pocket_api_v2_pockets__post.md): This endpoint creates a new pocket for a customer.

The request body requires a CreatePocketRequest object, specifying the trading_strategy_id and a pocket_name. It returns the newly created Pocket object.

### Get Customer Pocket

 - [GET /api/v2/pockets/{pocket_id}/](https://docs.jiko.io/products/customer-api/reference/pockets/get_customer_pocket_api_v2_pockets__pocket_id___get.md): This endpoint retrieves the details of a specific pocket, and returns a Pocket object with detailed portfolio information.

### Update Pocket

 - [PATCH /api/v2/pockets/{pocket_id}/](https://docs.jiko.io/products/customer-api/reference/pockets/update_pocket_api_v2_pockets__pocket_id___patch.md): This endpoint updates a pocket's information, such as its name or status (e.g., closing a pocket).
If the intent is to close a pocket, then there are two requirements: The pocket needs to be empty,
and there has to be at least one other open pocket belonging to the customer. Additionally,
when you close a pocket, you also need to pass a closure_reason along with the status update.

The request body requires an UpdatePocketRequest object. It returns the updated Pocket object.

### Get Single Pocket Earnings

 - [GET /api/v2/pockets/{pocket_id}/earnings/](https://docs.jiko.io/products/customer-api/reference/pockets/get_single_pocket_earnings_api_v2_pockets__pocket_id__earnings__get.md): This endpoint returns pocket earnings for a single pocket for a specified datetime period.

- Optionally pre-defined ranges are defined as such:

  - ytd (Year-to-date) From January 1st of the current year
  - mtd (Month-to-date) From the 1st calendar day of the current month, or start of business that month
  - wtd (Week-to-date) From the most recent Monday, or start of business that week.
  - all-time (default) From Account start
  - All through to the current day if buisness day, or last buisness day.

When range is chosen, you need to specify date_from and date_to (inclusive).

## Portals

Use these endpoints to create and view Portals. Portals allow third-party financial institutions to initiate ACH and wire transfers. A Portal consists of a routing and an account number. Multiple Portals can be created for a single Pocket.

### List Account Portals

 - [GET /api/v1/accounts/{account_id}/portals/](https://docs.jiko.io/products/customer-api/reference/portals/list_account_portals_api_v1_accounts__account_id__portals__get.md): This endpoint lists the payment portals associated with a specific Jiko account ID. Portals provide account and routing numbers for receiving funds into an account.

Returns a ListPortalsResponse object containing a list of Portal objects.

### List Customer Portals

 - [GET /api/v1/portals/](https://docs.jiko.io/products/customer-api/reference/portals/list_customer_portals_api_v1_portals__get.md): This endpoint lists all portals for the customer. It returns a ListPortalsResponse object containing a list of Portal objects.

## Transactions

### List Transactions

 - [GET /api/v2/transactions/](https://docs.jiko.io/products/customer-api/reference/transactions/list_transactions_api_v2_transactions__get.md): This endpoint lists all transactions for a customer's pockets. It provides a comprehensive view of all financial activities.

It returns a paginated list of Transaction objects, which can be of various types (ACH, WIRE, CARD, etc.).

It does not include transactions between the bank account and brokerage account.

### Transactions As CSV

 - [GET /api/v2/transactions.csv](https://docs.jiko.io/products/customer-api/reference/transactions/transactions_as_csv_api_v2_transactions_csv_get.md): This endpoint downloads a customer's transaction history in CSV format. This is useful for accounting and reconciliation purposes, and can be filtered by pocket, transaction type, and a time range.

## Trading Strategies

### List Trading Strategies

 - [GET /api/v2/trading-strategies/](https://docs.jiko.io/products/customer-api/reference/trading-strategies/list_trading_strategies_api_v2_trading_strategies__get.md): This endpoint lists the available trading strategies that can be applied to a pocket. This is the modern replacement for "pocket configurations."

Returns a TradingStrategies object. You can filter strategies by their applicability (DEPOSIT or REINVESTMENT).

Note: This endpoint is preferred for use over /api/v1/pocket-configurations/.

## Trades

Use these endpoints to view Trades, or transactions related to the buying and selling of T-bills, within the brokerage account component of Jiko Pockets.

### List Trades

 - [GET /api/v1/trades/](https://docs.jiko.io/products/customer-api/reference/trades/list_trades_api_v1_trades__get.md): This endpoint lists all buy, sell, and maturity events for securities (T-bills) within the customer's accounts.

Returns a paginated TradeListResponse. The list can be filtered by account and a trade datetime range.

### Trades As CSV

 - [GET /api/v1/trades.csv](https://docs.jiko.io/products/customer-api/reference/trades/trades_as_csv_api_v1_trades_csv_get.md): This endpoint downloads the customer's complete trade history as a CSV file.

This is useful for record-keeping and analysis and can be filtered by account and a trade datetime range.

### Download Trade Confirmation

 - [GET /api/v1/accounts/{account_id}/trades/{trade_id}/confirmation/](https://docs.jiko.io/products/customer-api/reference/trades/download_trade_confirmation_api_v1_accounts__account_id__trades__trade_id__confirmation__get.md): This endpoint downloads the confirmation for a specific trade, and returns a 307 Temporary Redirect to the trade confirmation PDF location.

Trade confirmations are sensitive documents. For security reasons, we return trade confirmations as PDFs through a URL with a 10-minute TTL.

Trade confirmation PDFs should be fetched and served just-in-time, not stored in databases.

Trades with "activity": "MATURITY" do not have trade confirmations.

### List Trades

 - [GET /api/v2/trades/](https://docs.jiko.io/products/customer-api/reference/trades/list_trades_api_v2_trades__get.md): Returns a list of trades including standard trades (BUY, SELL, MATURITY), external security transfer trades, and same-entity security transfer trades. Optionally filter by pocket.

## Counterparties

### Get Counterparties

 - [GET /api/v2/counterparties/](https://docs.jiko.io/products/customer-api/reference/counterparties/list-counterparties-v2.md): This endpoint allows you to list all the counterparties associated with a customer's pocket. You can filter the results by
counterparty type (ach, wire, international_wire, on_us, etc.) and status (PENDING, LINKED, UNLINKED, etc.).

It returns a paginated list of Counterparty objects. The response includes a next_page token for retrieving more results.

### Create Counterparty

 - [POST /api/v2/counterparties/](https://docs.jiko.io/products/customer-api/reference/counterparties/create-counterparty-v2.md): This endpoint is used to create a new counterparty for a customer. You can create different types of counterparties,
including ach, on-us, wire, and international_wire, by providing the relevant details in the request body.

Note: The account_number field for creating an on-us counterparty represents the Jiko network address of the pocket.

The request body must conform to one of the request schemas. On success, it returns the newly created counterparty object.

### Get Counterparty

 - [GET /api/v2/counterparties/{counterparty_id}/](https://docs.jiko.io/products/customer-api/reference/counterparties/get-counterparty-v2.md): This endpoint retrieves the details of a specific counterparty by its unique ID. It returns a single counterparty object corresponding to the provided counterparty_id.

### Update Counterparty

 - [PATCH /api/v2/counterparties/{counterparty_id}/](https://docs.jiko.io/products/customer-api/reference/counterparties/update-counterparty-v2.md): This endpoint is used to update the status of a counterparty. For example, you can use it to unlink a counterparty that is no longer needed.

The request body takes an UpdateCounterpartyRequest object. On success, it returns the updated counterparty object.

## Transfer Requests

Use these endpoints to manage Dual Authorization for Tranfer Requests.

### Create Transfer Request

 - [POST /api/v1/transfer-requests/](https://docs.jiko.io/products/customer-api/reference/transfer-requests/create_transfer_request_api_v1_transfer_requests__post.md): This endpoint creates a new transfer request. This is the first step in a dual-control workflow for making transfers.

The request body requires a CreateTransferRequest object, which specifies the transfer details and the reviewers.

### Get Transfer Requests

 - [GET /api/v1/transfer-requests/](https://docs.jiko.io/products/customer-api/reference/transfer-requests/get_transfer_requests_api_v1_transfer_requests__get.md): This endpoint retrieves a list of transfer requests.

You can filter by status, reviewer, and other criteria, and returns a paginated list of TransferRequest objects.

### Get Transfer Request Reviewers

 - [GET /api/v1/transfer-requests/reviewers/](https://docs.jiko.io/products/customer-api/reference/transfer-requests/get_transfer_request_reviewers_api_v1_transfer_requests_reviewers__get.md): This endpoint retrieves a list of team members who are authorized to review transfer requests, and returns a list of DualAuthUser objects.

### Get Transfer Request

 - [GET /api/v1/transfer-requests/{transfer_id}/](https://docs.jiko.io/products/customer-api/reference/transfer-requests/get_transfer_request_api_v1_transfer_requests__transfer_id___get.md): This endpoint retrieves the details of a specific transfer request, and returns a single TransferRequest object.

### Cancel Transfer Request

 - [DELETE /api/v1/transfer-requests/{transfer_id}/](https://docs.jiko.io/products/customer-api/reference/transfer-requests/cancel_transfer_request_api_v1_transfer_requests__transfer_id___delete.md): This endpoint cancels a pending transfer request, and returns a 204 No Content response upon a successful cancellation.

### Update Transfer Request Status

 - [PATCH /api/v1/transfer-requests/{transfer_id}/status/](https://docs.jiko.io/products/customer-api/reference/transfer-requests/update_transfer_request_status_api_v1_transfer_requests__transfer_id__status__patch.md): This endpoint is used to approve or deny a transfer request as part of a dual-control workflow.

The request body requires an UpdateTransferRequestStatus object. It returns the updated TransferRequest object.

## Subscriptions

Use these endpoints to create, view, and manage Subscriptions. Subscriptions provide Partners with the ability to subscribe to Events. Once subscribed, Events will be sent to the specified URL.

### Create Subscription

 - [POST /api/v1/subscriptions/](https://docs.jiko.io/products/customer-api/reference/subscriptions/create_subscription_api_v1_subscriptions__post.md): This endpoint creates a new webhook subscription to receive real-time notifications for specified events.

The request body requires a CreateSubscriptionRequest object, which includes the url for the webhook, the events to subscribe to, and a shared_secret for verifying request signatures.

### Get Subscriptions

 - [GET /api/v1/subscriptions/](https://docs.jiko.io/products/customer-api/reference/subscriptions/get_subscriptions_api_v1_subscriptions__get.md): This endpoint lists all of your current webhook subscriptions, and returns a paginated list of Subscription objects.

### Update Subscription

 - [PATCH /api/v1/subscriptions/{subscription_id}/](https://docs.jiko.io/products/customer-api/reference/subscriptions/update_subscription_api_v1_subscriptions__subscription_id___patch.md): This endpoint updates an existing webhook subscription. You can change the url, the subscribed events, or the status (enabled/disabled).

The request body requires an UpdateSubscriptionRequest object. It returns a 202 Accepted response with the updated Subscription object.

### Get Subscription

 - [GET /api/v1/subscriptions/{subscription_id}/](https://docs.jiko.io/products/customer-api/reference/subscriptions/get_subscription_api_v1_subscriptions__subscription_id___get.md): This endpoint retrieves the details of a specific webhook subscription, and returns a single Subscription object.

### Delete Subscription

 - [DELETE /api/v1/subscriptions/{subscription_id}/](https://docs.jiko.io/products/customer-api/reference/subscriptions/delete_subscription_api_v1_subscriptions__subscription_id___delete.md): This endpoint deletes a webhook subscription, and returns a 202 Accepted response upon successful deletion.

## Events

Use these endpoints to view Events.

### Get Events

 - [GET /api/v1/events/](https://docs.jiko.io/products/customer-api/reference/events/get_events_api_v1_events__get.md): This endpoint retrieves a list of events that have occurred for a customer's account, often related to webhook notifications. You can filter events by subscription_id and/or a time range query parameter (after).

It returns a paginated list of Event objects, each containing details about the event and any delivery attempts if it's a webhook event.

## Notifications

Use these endpoints for interacting with Notifications.

### List Notifications

 - [GET /api/v1/notifications/](https://docs.jiko.io/products/customer-api/reference/notifications/list_notifications_api_v1_notifications__get.md): This endpoint lists all notifications for a customer. You can filter by status (READ or UNREAD).

It returns a paginated list of CustomerNotification objects.

### Get Notification

 - [GET /api/v1/notifications/{notification_id}/](https://docs.jiko.io/products/customer-api/reference/notifications/get_notification_api_v1_notifications__notification_id___get.md): This endpoint retrieves a single notification by its notification_id, and returns a CustomerNotification object.

### Patch Notification

 - [PATCH /api/v1/notifications/{notification_id}/](https://docs.jiko.io/products/customer-api/reference/notifications/patch_notification_api_v1_notifications__notification_id___patch.md): This endpoint allows you to update the status of a notification, for example, to mark it as read.

The request body must contain an UpdateCustomerNotificationStatus object. It returns the updated CustomerNotification object.

## Statements

Use these endpoints to retrieve monthly statements for bank and brokerage accounts.

### List Customer Statements

 - [GET /api/v1/statements/](https://docs.jiko.io/products/customer-api/reference/statements/list_customer_statements_api_v1_statements__get.md): This endpoint retrieves a list of all available account statements (e.g., BANK, BROKERAGE) and tax documents (1099-INT, 1099-B).

Returns a paginated StatementListResponse. The list can be filtered by account, statement type, and date key (e.g., "2023" or "2023-01").

Customers can expect monthly statements to be available by the 15th of every month.

## Reports

**⚠️ Experimental ⚠️** These endpoints are subject to change. 

 Use these endpoints to interact with Reports.

### Create Customer Report Request

 - [POST /api/v1/report-requests/](https://docs.jiko.io/products/customer-api/reference/reports/create_customer_report_request_api_v1_report_requests__post.md): This endpoint triggers an asynchronous process to create a report request based on the provided parameters. Available report types are:

## Type BANK_STATEMENT_REPORT

End-of-day bank statement for the pocket’s bank account, exported in ISO 20022 camt.053 format. Transactions reported in this statement include fund deposits and withdrawals, incoming and outgoing third-party payments (when applicable), fees, automated sweep transactions between the pocket’s bank account and its linked brokerage account.

_Note:_ since Jiko automatically sweeps funds between the bank account and the associated brokerage account in the pocket, the bank account’s end-of-day balance is always 0. To report on balances held with Jiko, we invite you to use:

- Either the Brokerage statement, to import the value of held T-bills in the cash position of your treasury management system, reported as the closing balance of an account,

- or the Trade report, to import individual buy and sell transactions into your treasury management system and derive the corresponding position.

Valid output_formats values: CAMT053.

## Type BROKERAGE_STATEMENT_REPORT

End-of-day statement for the pocket’s brokerage account, exported in ISO 20022 camt.053 format. With the opening value and closing value of the T-bills held in the pocket on the selected reporting date, represented as the account balance. Values are based on end-of-day market prices, or on the current market price if the report is generated before day-end.

The statement also includes the following records that explain the change between the opening and closing values:

- Additions: new funds deposited into the brokerage account.

- Subtractions: funds withdrawn from the brokerage account.

- Gains/Losses from T-bills held in the account.

- Fees charged and deducted from the brokerage account.

Valid output_formats values: CAMT053.

## Type TRADE_REPORT

List of T-bill buy & sell trades within a user-defined range of trade dates, exported in CSV format. Each trade in the file includes three categories of information:

- Security master data: CUSIP, issuer, issue date, maturity date.

- Trading entity parameters: transaction code, custodian details.

- Trade details: buy/sell indicator, trade date, price, amount, reference.

The date ranges filter has a maximum range of 31 days. Optionally, the date range filter can be configured to be based on either settlement dates, or book dates. 

Valid output_formats values: KYRIBA_CSV, CSV.

## Type SECURITY_PRICE_REPORT

End-of-day security prices within a user-defined range of dates, exported in CSV format. With:

- An “SE” field identifying the entry as a security price.

- The name of the price provider: “JIKO”.

- The CUSIP of the security.

- The pricing date.

- The end-of-day price.

Valid output_formats values: KYRIBA_CSV.

## Type POSITION_SUMMARY_REPORT

Provides a snapshot of holdings as of a user-selected date, showing CUSIP-level positions by pocket along with associated cash values. The report includes the following key fields: Pocket, CUSIP, Quantity, Market Price, Market Value, and Historical Cost Value.
Customers use this report to export pocket-level valuations to downstream systems and to reconcile imported buy and sell transactions against the quantities reflected in the Position Summary

Valid output_formats values: PDF, CSV.

### List Customer Report Requests

 - [GET /api/v1/report-requests/](https://docs.jiko.io/products/customer-api/reference/reports/list_customer_report_requests_api_v1_report_requests__get.md): This endpoint lists all report request for a customer. You can filter by date from and to

It returns a paginated list of ReportRequest objects.

### Get Customer Report Request

 - [GET /api/v1/report-requests/{report_request_id}/](https://docs.jiko.io/products/customer-api/reference/reports/get_customer_report_request_api_v1_report_requests__report_request_id___get.md): This endpoint retrieves the details of a specific report request, and returns a single ReportRequest object.

### Get Customer Report

 - [GET /api/v1/reports/{report_id}/](https://docs.jiko.io/products/customer-api/reference/reports/get_customer_report_api_v1_reports__report_id___get.md): This endpoint retrieves the details of a specific report, and returns a single Report object.

### Download Customer Report

 - [POST /api/v1/reports/{report_id}/download/](https://docs.jiko.io/products/customer-api/reference/reports/download_customer_report_api_v1_reports__report_id__download__post.md): This endpoint creates a temporary, time-limited URL for downloading the report corresponding to the given id, and returns a single ReportDownload object.

## User

Use these endpoints to view User information.

### Get User Info

 - [GET /api/v1/user/](https://docs.jiko.io/products/customer-api/reference/user/get_user_info_api_v1_user__get.md): This endpoint retrieves information about the currently authenticated user.

It returns a UserInfo object containing the user's user_id, email, name, role, and other details.

### Get Memberships

 - [GET /api/v1/user/memberships/](https://docs.jiko.io/products/customer-api/reference/user/get-user-memberships.md): This endpoint retrieves all team memberships for the currently authenticated user.

It returns a list of MembershipInfo objects, each detailing a team and the user's role within it.

## Team

Use these endpoints to view and manage details for a Team and its members.

### Get Team

 - [GET /api/v1/team/](https://docs.jiko.io/products/customer-api/reference/team/get_team_api_v1_team__get.md): This endpoint retrieves information about the team, including a list of all team members.

It returns a TeamResponse object which contains the team ID and a list of MemberGroup objects, categorized by member status (ACTIVE, PENDING, etc.).

### Get Team Member

 - [GET /api/v1/team/{member_id}/](https://docs.jiko.io/products/customer-api/reference/team/get_team_member_api_v1_team__member_id___get.md): This endpoint retrieves the details of a specific team member, and returns a TeamMemberResponse object.

### Edit Team Member

 - [PUT /api/v1/team/{member_id}/](https://docs.jiko.io/products/customer-api/reference/team/edit_team_member_api_v1_team__member_id___put.md): This endpoint allows you to edit a team member's role or status.

The request body takes an EditTeamMemberRequest object, and returns the updated TeamMemberResponse object.

### Deactivate Team Member

 - [DELETE /api/v1/team/{member_id}/](https://docs.jiko.io/products/customer-api/reference/team/deactivate_team_member_api_v1_team__member_id___delete.md): This endpoint deactivates a team member from a team, and returns the TeamMemberResponse object for the deactivated member.

### Invite Team Member

 - [POST /api/v1/team/invite/](https://docs.jiko.io/products/customer-api/reference/team/invite_team_member_api_v1_team_invite__post.md): This endpoint invites a new member to a team.

The request body requires an InviteMemberRequest object containing the new member's first_name, last_name, email, phone_number, and role.

### Resend Invite Team Member

 - [POST /api/v1/team/{member_id}/invite/](https://docs.jiko.io/products/customer-api/reference/team/resend_invite_team_member_api_v1_team__member_id__invite__post.md): This endpoint resends an invitation to a team member, and returns a 200 OK response upon a successful request.

### Cancel Invite Team Member

 - [DELETE /api/v1/team/{member_id}/invite/](https://docs.jiko.io/products/customer-api/reference/team/cancel_invite_team_member_api_v1_team__member_id__invite__delete.md): This endpoint cancels an invitation that has been sent to a team member, and returns a 200 OK response upon a successful request.

### Create Service User

 - [POST /api/v1/team/service-users/](https://docs.jiko.io/products/customer-api/reference/team/create_service_user_api_v1_team_service_users__post.md)

## Team Audits

### Get Team Audit Logs

 - [GET /api/v1/team/audit-logs/](https://docs.jiko.io/products/customer-api/reference/team-audits/get_team_audit_logs_api_v1_team_audit_logs__get.md): This endpoint retrieves audit logs for the entire team. This is useful for tracking actions performed by team members.

It returns a paginated list of CustomerAuditLogEntry objects, which can be filtered by a time range.

### Get Team Member Audit Logs

 - [GET /api/v1/team/members/{member_id}/audit-logs/](https://docs.jiko.io/products/customer-api/reference/team-audits/get_team_member_audit_logs_api_v1_team_members__member_id__audit_logs__get.md): This endpoint retrieves audit logs for a specific team member, and returns a paginated list of CustomerAuditLogEntry objects.

### Team Audits As Csv

 - [GET /api/v1/team/audit-logs.csv](https://docs.jiko.io/products/customer-api/reference/team-audits/team_audits_as_csv_api_v1_team_audit_logs_csv_get.md): This endpoint downloads team audit logs in CSV format for offline analysis and record-keeping, and can be filtered by member_id and a timestamp range.

## Customer

Use these endpoints to view and manage personal details for a Customer.

### Get Customer

 - [GET /api/v1/customer/](https://docs.jiko.io/products/customer-api/reference/customer/get_customer_api_v1_customer__get.md): This endpoint retrieves the customer's profile information. This can be for an individual or a business.

It returns a Customer object which can be either an Individual or a Business object, containing details like name, address, email, and account_status.

### Upload Document To Customer

 - [POST /api/v1/documents/{document_type}/](https://docs.jiko.io/products/customer-api/reference/customer/upload_document_to_customer_api_v1_documents__document_type___post.md): This endpoint uploads a verification document (e.g., passport, articles of incorporation) directly to the customer's profile.

The document_type is specified in the URL path. The raw file data is sent in the request body with Content-Type and Content-Length headers. It returns the document's new document_id.

It is mainly used to verify customer requests (e.g. Customer change request, close account request, ACH request).

### Get Beneficial Owners

 - [GET /api/v1/customer/beneficial-owners/](https://docs.jiko.io/products/customer-api/reference/customer/get_beneficial_owners_api_v1_customer_beneficial_owners__get.md): For business customers, this endpoint lists the beneficial owners who have been identified for the account.

It returns a ListBeneficialOwnersResponse object containing a list of BusinessIndividual objects.

## Agreements

Use this endpoint to fetch Agreements specific to your institution and Jiko.

### List Agreements

 - [GET /api/v1/agreements/](https://docs.jiko.io/products/customer-api/reference/agreements/list_agreements_api_v1_agreements__get.md): This endpoint retrieves a list of legal agreements that a customer can acknowledge. These agreements could include terms of service, privacy policies, or other legal documents.

It returns an Agreement object which contains the version, release_date, and a list of documents. Each document includes a pdf_download_url, title, type, and category.

