Developer-friendly & type-safe Java SDK specifically catered to leverage openapi API.
Apideck: The Apideck OpenAPI Spec: SDK Optimized
For more information about the API: Apideck Developer Docs
JDK 11 or later is required.
The samples below show how a published SDK artifact is used:
Gradle:
implementation 'com.apideck:unify:0.13.2'
Maven:
<dependency>
<groupId>com.apideck</groupId>
<artifactId>unify</artifactId>
<version>0.13.2</version>
</dependency>
After cloning the git repository to your file system you can build the SDK artifact from source to the build
directory by running ./gradlew build
on *nix systems or gradlew.bat
on Windows systems.
If you wish to build from source and publish the SDK artifact to your local Maven repository (on your filesystem) then use the following command (after cloning the git repo locally):
On *nix:
./gradlew publishToMavenLocal -Pskip.signing
On Windows:
gradlew.bat publishToMavenLocal -Pskip.signing
A logging framework/facade has not yet been adopted but is under consideration.
For request and response logging (especially json bodies) use:
SpeakeasyHTTPClient.setDebugLogging(true); // experimental API only (may change without warning)
Example output:
Sending request: http://localhost:35123/bearer#global GET
Request headers: {Accept=[application/json], Authorization=[******], Client-Level-Header=[added by client], Idempotency-Key=[some-key], x-speakeasy-user-agent=[speakeasy-sdk/java 0.0.1 internal 0.1.0 org.openapis.openapi]}
Received response: (GET http://localhost:35123/bearer#global) 200
Response headers: {access-control-allow-credentials=[true], access-control-allow-origin=[*], connection=[keep-alive], content-length=[50], content-type=[application/json], date=[Wed, 09 Apr 2025 01:43:29 GMT], server=[gunicorn/19.9.0]}
Response body:
{
"authenticated": true,
"token": "global"
}
WARNING: This should only used for temporary debugging purposes. Leaving this option on in a production system could expose credentials/secrets in logs. Authorization headers are redacted by default and there is the ability to specify redacted header names via SpeakeasyHTTPClient.setRedactedHeaders
.
Another option is to set the System property -Djdk.httpclient.HttpClient.log=all
. However, this second option does not log bodies.
package hello.world;
import com.apideck.unify.Apideck;
import com.apideck.unify.models.components.TaxRatesFilter;
import com.apideck.unify.models.errors.*;
import com.apideck.unify.models.operations.AccountingTaxRatesAllRequest;
import java.lang.Exception;
import java.util.Map;
public class Application {
public static void main(String[] args) throws BadRequestResponse, UnauthorizedResponse, PaymentRequiredResponse, NotFoundResponse, UnprocessableResponse, Exception {
Apideck sdk = Apideck.builder()
.apiKey("<YOUR_BEARER_TOKEN_HERE>")
.consumerId("test-consumer")
.appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
.build();
AccountingTaxRatesAllRequest req = AccountingTaxRatesAllRequest.builder()
.serviceId("salesforce")
.filter(TaxRatesFilter.builder()
.assets(true)
.equity(true)
.expenses(true)
.liabilities(true)
.revenue(true)
.build())
.passThrough(Map.ofEntries(
Map.entry("search", "San Francisco")))
.fields("id,updated_at")
.build();
sdk.accounting().taxRates().list()
.request(req)
.callAsStream()
.forEach(item -> {
// handle item
});
}
}
Available methods
- get - Get Aged Creditors
- get - Get Aged Debtors
- list - List Attachments
- upload - Upload attachment
- get - Get Attachment
- delete - Delete Attachment
- download - Download Attachment
- get - Get BalanceSheet
- list - List Bank Feed Accounts
- create - Create Bank Feed Account
- get - Get Bank Feed Account
- update - Update Bank Feed Account
- delete - Delete Bank Feed Account
- list - List Bank Feed Statements
- create - Create Bank Feed Statement
- get - Get Bank Feed Statement
- update - Update Bank Feed Statement
- delete - Delete Bank Feed Statement
- list - List Bill Payments
- create - Create Bill Payment
- get - Get Bill Payment
- update - Update Bill Payment
- delete - Delete Bill Payment
- get - Get company info
- list - List Credit Notes
- create - Create Credit Note
- get - Get Credit Note
- update - Update Credit Note
- delete - Delete Credit Note
- list - List Customers
- create - Create Customer
- get - Get Customer
- update - Update Customer
- delete - Delete Customer
- list - List Departments
- create - Create Department
- get - Get Department
- update - Update Department
- delete - Delete Department
- list - List Expenses
- create - Create Expense
- get - Get Expense
- update - Update Expense
- delete - Delete Expense
- list - List Invoice Items
- create - Create Invoice Item
- get - Get Invoice Item
- update - Update Invoice Item
- delete - Delete Invoice Item
- list - List Invoices
- create - Create Invoice
- get - Get Invoice
- update - Update Invoice
- delete - Delete Invoice
- list - List Journal Entries
- create - Create Journal Entry
- get - Get Journal Entry
- update - Update Journal Entry
- delete - Delete Journal Entry
- list - List Ledger Accounts
- create - Create Ledger Account
- get - Get Ledger Account
- update - Update Ledger Account
- delete - Delete Ledger Account
- list - List Locations
- create - Create Location
- get - Get Location
- update - Update Location
- delete - Delete Location
- list - List Payments
- create - Create Payment
- get - Get Payment
- update - Update Payment
- delete - Delete Payment
- get - Get Profit and Loss
- list - List Purchase Orders
- create - Create Purchase Order
- get - Get Purchase Order
- update - Update Purchase Order
- delete - Delete Purchase Order
- list - List Subsidiaries
- create - Create Subsidiary
- get - Get Subsidiary
- update - Update Subsidiary
- delete - Delete Subsidiary
- list - List Suppliers
- create - Create Supplier
- get - Get Supplier
- update - Update Supplier
- delete - Delete Supplier
- list - List Tax Rates
- create - Create Tax Rate
- get - Get Tax Rate
- update - Update Tax Rate
- delete - Delete Tax Rate
- list - List Tracking Categories
- create - Create Tracking Category
- get - Get Tracking Category
- update - Update Tracking Category
- delete - Delete Tracking Category
- list - List Applicants
- create - Create Applicant
- get - Get Applicant
- update - Update Applicant
- delete - Delete Applicant
- list - List Applications
- create - Create Application
- get - Get Application
- update - Update Application
- delete - Delete Application
- get - Get API Resource Coverage
- get - Get API Resource
- get - Get Connector Doc content
- get - Get Connector Resource
- list - List activities
- create - Create activity
- get - Get activity
- update - Update activity
- delete - Delete activity
- list - List companies
- create - Create company
- get - Get company
- update - Update company
- delete - Delete company
- list - List contacts
- create - Create contact
- get - Get contact
- update - Update contact
- delete - Delete contact
- list - List opportunities
- create - Create opportunity
- get - Get opportunity
- update - Update opportunity
- delete - Delete opportunity
- list - List pipelines
- create - Create pipeline
- get - Get pipeline
- update - Update pipeline
- delete - Delete pipeline
- get - Get Store
- list - List DriveGroups
- create - Create DriveGroup
- get - Get DriveGroup
- update - Update DriveGroup
- delete - Delete DriveGroup
- list - List Drives
- create - Create Drive
- get - Get Drive
- update - Update Drive
- delete - Delete Drive
- list - List Files
- search - Search Files
- get - Get File
- update - Rename or move File
- delete - Delete File
- download - Download File
- export - Export File
- create - Create Folder
- get - Get Folder
- update - Rename or move Folder
- delete - Delete Folder
- copy - Copy Folder
- list - List SharedLinks
- create - Create Shared Link
- get - Get Shared Link
- update - Update Shared Link
- delete - Delete Shared Link
- create - Start Upload Session
- get - Get Upload Session
- upload - Upload part of File to Upload Session
- delete - Abort Upload Session
- finish - Finish Upload Session
- list - List Companies
- create - Create Company
- get - Get Company
- update - Update Company
- delete - Delete Company
- list - List Departments
- create - Create Department
- get - Get Department
- update - Update Department
- delete - Delete Department
- list - List Employees
- create - Create Employee
- get - Get Employee
- update - Update Employee
- delete - Delete Employee