Class JournalsApi

java.lang.Object
markets.alpaca.client.openapi.broker.api.JournalsApi

public class JournalsApi extends Object
Generated client for JournalsApi operations.

This class is generated from the configured OpenAPI spec. Operation method Javadocs include OAS summaries, descriptions, parameters, return types, response details, and external documentation links when present in the spec.

Operations

  • createBatchJournal: Create a Batch Journal Transaction (One-to-Many)
  • createJournal: Create a Journal
  • deleteJournalById: Cancel a Pending Journal
  • getAllJournals: Retrieve a List Journals
  • getV1JournalsJournalId: Retrieve a Single Journal Entry
  • postV1JournalsReverseBatch: Create a Reverse Batch Journal Transaction (Many-to-One)
  • Constructor Details

    • JournalsApi

      public JournalsApi()
    • JournalsApi

      public JournalsApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • getHostIndex

      public int getHostIndex()
    • setHostIndex

      public void setHostIndex(int hostIndex)
    • getCustomBaseUrl

      public String getCustomBaseUrl()
    • setCustomBaseUrl

      public void setCustomBaseUrl(String customBaseUrl)
    • createBatchJournalCall

      public okhttp3.Call createBatchJournalCall(@Nonnull BatchJournalRequest batchJournalRequest, @Nullable String idempotencyKey, ApiCallback _callback) throws ApiException
      Build call for createBatchJournal
      Parameters:
      batchJournalRequest - (required)
      idempotencyKey - The unique key for idempotent create. When supplied, duplicate requests (same key and body) return the original journal batch instead of creating a new one. Use a client-generated value (e.g. UUID) per logical batch. Strongly recommended for production to prevent duplicate journal batches on retries. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 an array of journal objects with an extra attribute error_message in the case when a specific account fails to receive a journal. -
      422 Unprocessable Entity. Returned when an idempotency key is reused with a different request body. -
    • createBatchJournal

      public List<BatchJournalResponse> createBatchJournal(@Nonnull BatchJournalRequest batchJournalRequest, @Nullable String idempotencyKey) throws ApiException
      Create a Batch Journal Transaction (One-to-Many) You can create a batch of journal requests by using this endpoint. This is enabled on JNLC type Journals for now only. Every single request must be valid for the entire batch operation to succeed. In the case of a successful request, the response will contain an array of journal objects with an extra attribute error_message in the case when a specific account fails to receive a journal. **Idempotency**: When the `Idempotency-Key` header is supplied, this endpoint is idempotent. Multiple requests with the same key and identical request body will create only one batch. A subsequent request returns the previously created batch with the same response (no duplicate is created). If the same key is used with a different request body, the API returns `422 Unprocessable Entity`. **Recommended for production**: Always supply `Idempotency-Key` when creating journal batches. This allows safe retries on timeouts, network errors, or 5xx responses without risking duplicate batches. Use a client-generated unique value (e.g. UUID).
      Parameters:
      batchJournalRequest - (required)
      idempotencyKey - The unique key for idempotent create. When supplied, duplicate requests (same key and body) return the original journal batch instead of creating a new one. Use a client-generated value (e.g. UUID) per logical batch. Strongly recommended for production to prevent duplicate journal batches on retries. (optional)
      Returns:
      List<BatchJournalResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 an array of journal objects with an extra attribute error_message in the case when a specific account fails to receive a journal. -
      422 Unprocessable Entity. Returned when an idempotency key is reused with a different request body. -
    • createBatchJournalWithHttpInfo

      public ApiResponse<List<BatchJournalResponse>> createBatchJournalWithHttpInfo(@Nonnull BatchJournalRequest batchJournalRequest, @Nullable String idempotencyKey) throws ApiException
      Create a Batch Journal Transaction (One-to-Many) You can create a batch of journal requests by using this endpoint. This is enabled on JNLC type Journals for now only. Every single request must be valid for the entire batch operation to succeed. In the case of a successful request, the response will contain an array of journal objects with an extra attribute error_message in the case when a specific account fails to receive a journal. **Idempotency**: When the `Idempotency-Key` header is supplied, this endpoint is idempotent. Multiple requests with the same key and identical request body will create only one batch. A subsequent request returns the previously created batch with the same response (no duplicate is created). If the same key is used with a different request body, the API returns `422 Unprocessable Entity`. **Recommended for production**: Always supply `Idempotency-Key` when creating journal batches. This allows safe retries on timeouts, network errors, or 5xx responses without risking duplicate batches. Use a client-generated unique value (e.g. UUID).
      Parameters:
      batchJournalRequest - (required)
      idempotencyKey - The unique key for idempotent create. When supplied, duplicate requests (same key and body) return the original journal batch instead of creating a new one. Use a client-generated value (e.g. UUID) per logical batch. Strongly recommended for production to prevent duplicate journal batches on retries. (optional)
      Returns:
      ApiResponse<List<BatchJournalResponse>>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 an array of journal objects with an extra attribute error_message in the case when a specific account fails to receive a journal. -
      422 Unprocessable Entity. Returned when an idempotency key is reused with a different request body. -
    • createBatchJournalAsync

      public okhttp3.Call createBatchJournalAsync(@Nonnull BatchJournalRequest batchJournalRequest, @Nullable String idempotencyKey, ApiCallback<List<BatchJournalResponse>> _callback) throws ApiException
      Create a Batch Journal Transaction (One-to-Many) (asynchronously) You can create a batch of journal requests by using this endpoint. This is enabled on JNLC type Journals for now only. Every single request must be valid for the entire batch operation to succeed. In the case of a successful request, the response will contain an array of journal objects with an extra attribute error_message in the case when a specific account fails to receive a journal. **Idempotency**: When the `Idempotency-Key` header is supplied, this endpoint is idempotent. Multiple requests with the same key and identical request body will create only one batch. A subsequent request returns the previously created batch with the same response (no duplicate is created). If the same key is used with a different request body, the API returns `422 Unprocessable Entity`. **Recommended for production**: Always supply `Idempotency-Key` when creating journal batches. This allows safe retries on timeouts, network errors, or 5xx responses without risking duplicate batches. Use a client-generated unique value (e.g. UUID).
      Parameters:
      batchJournalRequest - (required)
      idempotencyKey - The unique key for idempotent create. When supplied, duplicate requests (same key and body) return the original journal batch instead of creating a new one. Use a client-generated value (e.g. UUID) per logical batch. Strongly recommended for production to prevent duplicate journal batches on retries. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 an array of journal objects with an extra attribute error_message in the case when a specific account fails to receive a journal. -
      422 Unprocessable Entity. Returned when an idempotency key is reused with a different request body. -
    • createJournalCall

      public okhttp3.Call createJournalCall(@Nonnull CreateJournalRequest createJournalRequest, @Nullable String idempotencyKey, ApiCallback _callback) throws ApiException
      Build call for createJournal
      Parameters:
      createJournalRequest - (required)
      idempotencyKey - Unique key for idempotent create. When supplied, duplicate requests (same key and body) return the original journal instead of creating a new one. Use a client-generated value (e.g. UUID) per logical journal. Strongly recommended for production to prevent duplicate journals on retries. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 The New Journal object -
      400 One of the parameters is invalid. -
      403 The amount requested to move is not available. -
      404 One of the account is not found. -
      422 Unprocessable Entity. Returned when an idempotency key is reused with a different request body. -
    • createJournal

      public Journal createJournal(@Nonnull CreateJournalRequest createJournalRequest, @Nullable String idempotencyKey) throws ApiException
      Create a Journal A journal can be JNLC (move cash) or JNLS (move shares), dictated by `entry_type`. Generally, journal requests are subject to approval and starts from the `pending` status. The status changes are propagated through the Event API. Under certain conditions agreed for the partner, such journal transactions that meet the criteria are executed right away. **Idempotency**: When the `Idempotency-Key` header is supplied, this endpoint is idempotent. Multiple requests with the same key and identical request body will create only one journal. A subsequent request returns the previously created journal with the same response (no duplicate is created). If the same key is used with a different request body, the API returns `422 Unprocessable Entity`. **Recommended for production**: Always supply `Idempotency-Key` when creating journals. This allows safe retries on timeouts, network errors, or 5xx responses without risking duplicate journals. Use a client-generated unique value (e.g. UUID).
      Parameters:
      createJournalRequest - (required)
      idempotencyKey - Unique key for idempotent create. When supplied, duplicate requests (same key and body) return the original journal instead of creating a new one. Use a client-generated value (e.g. UUID) per logical journal. Strongly recommended for production to prevent duplicate journals on retries. (optional)
      Returns:
      Journal
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 The New Journal object -
      400 One of the parameters is invalid. -
      403 The amount requested to move is not available. -
      404 One of the account is not found. -
      422 Unprocessable Entity. Returned when an idempotency key is reused with a different request body. -
    • createJournalWithHttpInfo

      public ApiResponse<Journal> createJournalWithHttpInfo(@Nonnull CreateJournalRequest createJournalRequest, @Nullable String idempotencyKey) throws ApiException
      Create a Journal A journal can be JNLC (move cash) or JNLS (move shares), dictated by `entry_type`. Generally, journal requests are subject to approval and starts from the `pending` status. The status changes are propagated through the Event API. Under certain conditions agreed for the partner, such journal transactions that meet the criteria are executed right away. **Idempotency**: When the `Idempotency-Key` header is supplied, this endpoint is idempotent. Multiple requests with the same key and identical request body will create only one journal. A subsequent request returns the previously created journal with the same response (no duplicate is created). If the same key is used with a different request body, the API returns `422 Unprocessable Entity`. **Recommended for production**: Always supply `Idempotency-Key` when creating journals. This allows safe retries on timeouts, network errors, or 5xx responses without risking duplicate journals. Use a client-generated unique value (e.g. UUID).
      Parameters:
      createJournalRequest - (required)
      idempotencyKey - Unique key for idempotent create. When supplied, duplicate requests (same key and body) return the original journal instead of creating a new one. Use a client-generated value (e.g. UUID) per logical journal. Strongly recommended for production to prevent duplicate journals on retries. (optional)
      Returns:
      ApiResponse<Journal>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 The New Journal object -
      400 One of the parameters is invalid. -
      403 The amount requested to move is not available. -
      404 One of the account is not found. -
      422 Unprocessable Entity. Returned when an idempotency key is reused with a different request body. -
    • createJournalAsync

      public okhttp3.Call createJournalAsync(@Nonnull CreateJournalRequest createJournalRequest, @Nullable String idempotencyKey, ApiCallback<Journal> _callback) throws ApiException
      Create a Journal (asynchronously) A journal can be JNLC (move cash) or JNLS (move shares), dictated by `entry_type`. Generally, journal requests are subject to approval and starts from the `pending` status. The status changes are propagated through the Event API. Under certain conditions agreed for the partner, such journal transactions that meet the criteria are executed right away. **Idempotency**: When the `Idempotency-Key` header is supplied, this endpoint is idempotent. Multiple requests with the same key and identical request body will create only one journal. A subsequent request returns the previously created journal with the same response (no duplicate is created). If the same key is used with a different request body, the API returns `422 Unprocessable Entity`. **Recommended for production**: Always supply `Idempotency-Key` when creating journals. This allows safe retries on timeouts, network errors, or 5xx responses without risking duplicate journals. Use a client-generated unique value (e.g. UUID).
      Parameters:
      createJournalRequest - (required)
      idempotencyKey - Unique key for idempotent create. When supplied, duplicate requests (same key and body) return the original journal instead of creating a new one. Use a client-generated value (e.g. UUID) per logical journal. Strongly recommended for production to prevent duplicate journals on retries. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 The New Journal object -
      400 One of the parameters is invalid. -
      403 The amount requested to move is not available. -
      404 One of the account is not found. -
      422 Unprocessable Entity. Returned when an idempotency key is reused with a different request body. -
    • deleteJournalByIdCall

      public okhttp3.Call deleteJournalByIdCall(@Nonnull UUID journalId, ApiCallback _callback) throws ApiException
      Build call for deleteJournalById
      Parameters:
      journalId - (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      204 The cancel request succeeded. (No-content) -
      404 The journal is not found. -
      422 The journal is not in the pending status. -
    • deleteJournalById

      public void deleteJournalById(@Nonnull UUID journalId) throws ApiException
      Cancel a Pending Journal You can only delete a journal if the journal is still in a pending state, if a journal is executed you will not be able to delete. The alternative is to create a mirror journal entry to reverse the flow of funds.
      Parameters:
      journalId - (required)
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      204 The cancel request succeeded. (No-content) -
      404 The journal is not found. -
      422 The journal is not in the pending status. -
    • deleteJournalByIdWithHttpInfo

      public ApiResponse<Void> deleteJournalByIdWithHttpInfo(@Nonnull UUID journalId) throws ApiException
      Cancel a Pending Journal You can only delete a journal if the journal is still in a pending state, if a journal is executed you will not be able to delete. The alternative is to create a mirror journal entry to reverse the flow of funds.
      Parameters:
      journalId - (required)
      Returns:
      ApiResponse<Void>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      204 The cancel request succeeded. (No-content) -
      404 The journal is not found. -
      422 The journal is not in the pending status. -
    • deleteJournalByIdAsync

      public okhttp3.Call deleteJournalByIdAsync(@Nonnull UUID journalId, ApiCallback<Void> _callback) throws ApiException
      Cancel a Pending Journal (asynchronously) You can only delete a journal if the journal is still in a pending state, if a journal is executed you will not be able to delete. The alternative is to create a mirror journal entry to reverse the flow of funds.
      Parameters:
      journalId - (required)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      204 The cancel request succeeded. (No-content) -
      404 The journal is not found. -
      422 The journal is not in the pending status. -
    • getAllJournalsCall

      public okhttp3.Call getAllJournalsCall(@Nullable LocalDate after, @Nullable LocalDate before, @Nullable JournalStatus status, @Nullable String entryType, @Nullable UUID toAccount, @Nullable UUID fromAccount, @Nullable Integer limit, ApiCallback _callback) throws ApiException
      Build call for getAllJournals
      Parameters:
      after - By journal creation date. Format: 2020-01-01 (optional)
      before - By journal creation date. Format: 2020-01-01 (optional)
      status - See the JournalStatus model for more info (optional)
      entryType - JNLC or JNLS (optional)
      toAccount - The account id that received the journal (optional)
      fromAccount - The account id that initiated the journal (optional)
      limit - The maximum number of results to return (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 OK -
      400 One of the parameters is invalid. -
      422 Result set exceeds 100,000 records. -
    • getAllJournals

      public List<Journal> getAllJournals(@Nullable LocalDate after, @Nullable LocalDate before, @Nullable JournalStatus status, @Nullable String entryType, @Nullable UUID toAccount, @Nullable UUID fromAccount, @Nullable Integer limit) throws ApiException
      Retrieve a List Journals Returns an array of journal objects.
      Parameters:
      after - By journal creation date. Format: 2020-01-01 (optional)
      before - By journal creation date. Format: 2020-01-01 (optional)
      status - See the JournalStatus model for more info (optional)
      entryType - JNLC or JNLS (optional)
      toAccount - The account id that received the journal (optional)
      fromAccount - The account id that initiated the journal (optional)
      limit - The maximum number of results to return (optional)
      Returns:
      List<Journal>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 OK -
      400 One of the parameters is invalid. -
      422 Result set exceeds 100,000 records. -
    • getAllJournalsWithHttpInfo

      public ApiResponse<List<Journal>> getAllJournalsWithHttpInfo(@Nullable LocalDate after, @Nullable LocalDate before, @Nullable JournalStatus status, @Nullable String entryType, @Nullable UUID toAccount, @Nullable UUID fromAccount, @Nullable Integer limit) throws ApiException
      Retrieve a List Journals Returns an array of journal objects.
      Parameters:
      after - By journal creation date. Format: 2020-01-01 (optional)
      before - By journal creation date. Format: 2020-01-01 (optional)
      status - See the JournalStatus model for more info (optional)
      entryType - JNLC or JNLS (optional)
      toAccount - The account id that received the journal (optional)
      fromAccount - The account id that initiated the journal (optional)
      limit - The maximum number of results to return (optional)
      Returns:
      ApiResponse<List<Journal>>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 OK -
      400 One of the parameters is invalid. -
      422 Result set exceeds 100,000 records. -
    • getAllJournalsAsync

      public okhttp3.Call getAllJournalsAsync(@Nullable LocalDate after, @Nullable LocalDate before, @Nullable JournalStatus status, @Nullable String entryType, @Nullable UUID toAccount, @Nullable UUID fromAccount, @Nullable Integer limit, ApiCallback<List<Journal>> _callback) throws ApiException
      Retrieve a List Journals (asynchronously) Returns an array of journal objects.
      Parameters:
      after - By journal creation date. Format: 2020-01-01 (optional)
      before - By journal creation date. Format: 2020-01-01 (optional)
      status - See the JournalStatus model for more info (optional)
      entryType - JNLC or JNLS (optional)
      toAccount - The account id that received the journal (optional)
      fromAccount - The account id that initiated the journal (optional)
      limit - The maximum number of results to return (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 OK -
      400 One of the parameters is invalid. -
      422 Result set exceeds 100,000 records. -
    • getV1JournalsJournalIdCall

      public okhttp3.Call getV1JournalsJournalIdCall(@Nonnull UUID journalId, ApiCallback _callback) throws ApiException
      Build call for getV1JournalsJournalId
      Parameters:
      journalId - (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 OK -
    • getV1JournalsJournalId

      public Journal getV1JournalsJournalId(@Nonnull UUID journalId) throws ApiException
      Retrieve a Single Journal Entry You can query a specific journal entry that you submitted to Alpaca by passing into the query the journal_id. Will return a journal entry if a journal entry with journal_id exists, otherwise will throw an error.
      Parameters:
      journalId - (required)
      Returns:
      Journal
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 OK -
    • getV1JournalsJournalIdWithHttpInfo

      public ApiResponse<Journal> getV1JournalsJournalIdWithHttpInfo(@Nonnull UUID journalId) throws ApiException
      Retrieve a Single Journal Entry You can query a specific journal entry that you submitted to Alpaca by passing into the query the journal_id. Will return a journal entry if a journal entry with journal_id exists, otherwise will throw an error.
      Parameters:
      journalId - (required)
      Returns:
      ApiResponse<Journal>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 OK -
    • getV1JournalsJournalIdAsync

      public okhttp3.Call getV1JournalsJournalIdAsync(@Nonnull UUID journalId, ApiCallback<Journal> _callback) throws ApiException
      Retrieve a Single Journal Entry (asynchronously) You can query a specific journal entry that you submitted to Alpaca by passing into the query the journal_id. Will return a journal entry if a journal entry with journal_id exists, otherwise will throw an error.
      Parameters:
      journalId - (required)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 OK -
    • postV1JournalsReverseBatchCall

      public okhttp3.Call postV1JournalsReverseBatchCall(@Nullable ReverseBatchJournalRequest reverseBatchJournalRequest, ApiCallback _callback) throws ApiException
      Build call for postV1JournalsReverseBatch
      Parameters:
      reverseBatchJournalRequest - (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 OK -
      400 Invalid Request Body -
      403 Insufficient Balance (JNLC) or Insufficient Assets (JNLS) -
      404 Account not found -
    • postV1JournalsReverseBatch

      public List<BatchJournalResponse> postV1JournalsReverseBatch(@Nullable ReverseBatchJournalRequest reverseBatchJournalRequest) throws ApiException
      Create a Reverse Batch Journal Transaction (Many-to-One) You can also create a batch journal request by using the following endpoint. This is enabled on JNLC for now only. Note that if there is an invalid account_id the whole batch operation will be canceled. Every single request must be valid for the entire batch operation to succeed. In the case of a successful request, the response will contain an array of journal objects with an extra attribute error_message in the case when a specific account fails to submit a journal.
      Parameters:
      reverseBatchJournalRequest - (optional)
      Returns:
      List<BatchJournalResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 OK -
      400 Invalid Request Body -
      403 Insufficient Balance (JNLC) or Insufficient Assets (JNLS) -
      404 Account not found -
    • postV1JournalsReverseBatchWithHttpInfo

      public ApiResponse<List<BatchJournalResponse>> postV1JournalsReverseBatchWithHttpInfo(@Nullable ReverseBatchJournalRequest reverseBatchJournalRequest) throws ApiException
      Create a Reverse Batch Journal Transaction (Many-to-One) You can also create a batch journal request by using the following endpoint. This is enabled on JNLC for now only. Note that if there is an invalid account_id the whole batch operation will be canceled. Every single request must be valid for the entire batch operation to succeed. In the case of a successful request, the response will contain an array of journal objects with an extra attribute error_message in the case when a specific account fails to submit a journal.
      Parameters:
      reverseBatchJournalRequest - (optional)
      Returns:
      ApiResponse<List<BatchJournalResponse>>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 OK -
      400 Invalid Request Body -
      403 Insufficient Balance (JNLC) or Insufficient Assets (JNLS) -
      404 Account not found -
    • postV1JournalsReverseBatchAsync

      public okhttp3.Call postV1JournalsReverseBatchAsync(@Nullable ReverseBatchJournalRequest reverseBatchJournalRequest, ApiCallback<List<BatchJournalResponse>> _callback) throws ApiException
      Create a Reverse Batch Journal Transaction (Many-to-One) (asynchronously) You can also create a batch journal request by using the following endpoint. This is enabled on JNLC for now only. Note that if there is an invalid account_id the whole batch operation will be canceled. Every single request must be valid for the entire batch operation to succeed. In the case of a successful request, the response will contain an array of journal objects with an extra attribute error_message in the case when a specific account fails to submit a journal.
      Parameters:
      reverseBatchJournalRequest - (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 OK -
      400 Invalid Request Body -
      403 Insufficient Balance (JNLC) or Insufficient Assets (JNLS) -
      404 Account not found -