For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inBook a demo
Logo
  • SDKs
    • Javascript (Node/Browser)
    • Python
    • Go
    • Java
Sign inBook a demo
On this page
  • Installation
  • Gradle users
  • Maven users
  • Usage
SDKs

Java

Was this page helpful?
Previous
Built with

If you’re working with Java, the official mercoa package is the easiest way to interact with the Mercoa API.

Installation

Gradle users

Add this dependency to your project’s build file:

1implementation 'com.mercoa:mercoa:0.6.4'

Maven users

Add this dependency to your project’s POM:

1<dependency>
2 <groupId>com.mercoa</groupId>
3 <artifactId>mercoa</artifactId>
4 <version>0.6.4</version>
5</dependency>

Usage

1Mercoa client = Mercoa.builder()
2 .token("MERCOA_API_KEY")
3 .build();
4
5var response = client.entity().get("YOUR_ENTITY_ID");
6
7System.out.println(response.getId());