{"id":43009852,"url":"https://github.com/merge-api/merge-java-client","last_synced_at":"2026-01-31T05:08:38.361Z","repository":{"id":166868027,"uuid":"639019976","full_name":"merge-api/merge-java-client","owner":"merge-api","description":"The JVM SDK for accessing various Merge Unified APIs","archived":false,"fork":false,"pushed_at":"2026-01-16T21:34:41.000Z","size":64799,"stargazers_count":7,"open_issues_count":11,"forks_count":4,"subscribers_count":8,"default_branch":"main","last_synced_at":"2026-01-17T06:38:53.485Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/merge-api.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-05-10T15:29:38.000Z","updated_at":"2025-10-27T21:09:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"ae21b1fb-92e5-4fee-a141-4aca1a76d513","html_url":"https://github.com/merge-api/merge-java-client","commit_stats":null,"previous_names":["merge-api/merge-java-client"],"tags_count":34,"template":false,"template_full_name":null,"purl":"pkg:github/merge-api/merge-java-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/merge-api%2Fmerge-java-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/merge-api%2Fmerge-java-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/merge-api%2Fmerge-java-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/merge-api%2Fmerge-java-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/merge-api","download_url":"https://codeload.github.com/merge-api/merge-java-client/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/merge-api%2Fmerge-java-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28929865,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T04:05:25.756Z","status":"ssl_error","status_checked_at":"2026-01-31T04:02:35.005Z","response_time":128,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-31T05:08:37.777Z","updated_at":"2026-01-31T05:08:38.351Z","avatar_url":"https://github.com/merge-api.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Merge Java Library\n\n[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github\u0026utm_medium=github\u0026utm_campaign=readme\u0026utm_source=https%3A%2F%2Fgithub.com%2Fmerge-api%2Fmerge-java-client)\n[![Maven Central](https://img.shields.io/maven-central/v/dev.merge/merge-java-client)](https://central.sonatype.com/artifact/dev.merge/merge-java-client)\n\nThe Merge Java library provides convenient access to the Merge APIs from Java.\n\n## Documentation\n\nAPI documentation is available at [here](https://docs.merge.dev/basics/authentication/).\n\n## Installation\n\n### Gradle\n\nAdd the dependency in your `build.gradle` file:\n\n```groovy\ndependencies {\n  implementation 'dev.merge:merge-java-client'\n}\n```\n\n### Maven\n\nAdd the dependency in your `pom.xml` file:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003edev.merge\u003c/groupId\u003e\n  \u003cartifactId\u003emerge-java-client\u003c/artifactId\u003e\n  \u003cversion\u003e5.0.1\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Instantiation\n\n```java\nMergeApiClient mergeClient = MergeApiClient.builder()\n    .accountToken(\"ACCOUNT_TOKEN\")\n    .apiKey(\"API_KEY\")\n    .build();\n```\n\n## Request Options\nEvery endpoint has an overloaded equivalent which takes [RequestOptions](./src/main/java/com/merge/api/core/RequestOptions.java)\nthat allow you to override the account token and api key.\n\n```java\nimport com.merge.api.MergeApiClient;\nimport com.merge.api.resources.ats.types.Candidate;\nimport com.merge.api.resources.ats.candidates.requests.CandidatesRetrieveRequest;\nimport com.merge.api.core.RequestOptions;\n\nMergeApiClient mergeClient = MergeApiClient.builder()\n    .accountToken(\"ACCOUNT_TOKEN\")\n    .apiKey(\"API_KEY\")\n    .build();\n\nCandidate candidate = mergeClient.ats().candidates().retrieve(\n    \"\u003cCANDIDATE_UUID\u003e\", \n    CandidatesRetrieveRequest.builder()\n            .includeRemoteData(true)\n            .build(), \n    RequestOptions.builder()\n        .accountToken(\"OVERRIDE_ACCOUNT_TOKEN\")\n        .build());\n```\n\n## Usage\n\nInstantiate and use the client with the following:\n\n```java\npackage com.example.usage;\n\nimport com.merge.api.MergeApiClient;\n\nMergeApiClient client = MergeApiClient\n    .builder()\n    .build();\n\nclient.ats().accountDetails().retrieve(...);\n```\n\n## Environments\n\nThis SDK allows you to configure different environments for API requests.\n\n```java\nimport com.merge.api.MergeApiClient;\nimport com.merge.api.core.Environment;\n\nMergeApiClient client = MergeApiClient\n    .builder()\n    .environment(Environment.Production)\n    .build();\n```\n\n## Base Url\n\nYou can set a custom base URL when constructing the client.\n\n```java\nimport com.merge.api.MergeApiClient;\n\nMergeApiClient client = MergeApiClient\n    .builder()\n    .url(\"https://example.com\")\n    .build();\n```\n\n## Exception Handling\n\nWhen the API returns a non-success status code (4xx or 5xx response), an API exception will be thrown.\n\n```java\nimport com.merge.api.core.ApiError;\n\ntry {\n    client.ats().accountDetails().retrieve(...);\n} catch (ApiError e) {\n    // Do something with the API exception...\n}\n```\n\n## Advanced\n\n### Custom Client\n\nThis SDK is built to work with any instance of `OkHttpClient`. By default, if no client is provided, the SDK will construct one. \nHowever, you can pass your own client like so:\n\n```java\nimport com.merge.api.MergeApiClient;\nimport okhttp3.OkHttpClient;\n\nOkHttpClient customClient = ...;\n\nMergeApiClient client = MergeApiClient\n    .builder()\n    .httpClient(customClient)\n    .build();\n```\n\n### Retries\n\nThe SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long\nas the request is deemed retryable and the number of retry attempts has not grown larger than the configured\nretry limit (default: 2).\n\nA request is deemed retryable when any of the following HTTP status codes is returned:\n\n- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)\n- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)\n- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors)\n\nUse the `maxRetries` client option to configure this behavior.\n\n```java\nimport com.merge.api.MergeApiClient;\n\nMergeApiClient client = MergeApiClient\n    .builder()\n    .maxRetries(1)\n    .build();\n```\n\n### Timeouts\n\nThe SDK defaults to a 60 second timeout. You can configure this with a timeout option at the client or request level.\n\n```java\nimport com.merge.api.MergeApiClient;\nimport com.merge.api.core.RequestOptions;\n\n// Client level\nMergeApiClient client = MergeApiClient\n    .builder()\n    .timeout(10)\n    .build();\n\n// Request level\nclient.ats().accountDetails().retrieve(\n    ...,\n    RequestOptions\n        .builder()\n        .timeout(10)\n        .build()\n);\n```\n\n### Custom Headers\n\nThe SDK allows you to add custom headers to requests. You can configure headers at the client level or at the request level.\n\n```java\nimport com.merge.api.MergeApiClient;\nimport com.merge.api.core.RequestOptions;\n\n// Client level\nMergeApiClient client = MergeApiClient\n    .builder()\n    .addHeader(\"X-Custom-Header\", \"custom-value\")\n    .addHeader(\"X-Request-Id\", \"abc-123\")\n    .build();\n;\n\n// Request level\nclient.ats().accountDetails().retrieve(\n    ...,\n    RequestOptions\n        .builder()\n        .addHeader(\"X-Request-Header\", \"request-value\")\n        .build()\n);\n```\n\n## Contributing\n\nWhile we value open-source contributions to this SDK, this library is generated programmatically.\nAdditions made directly to this library would have to be moved over to our generation code,\notherwise they would be overwritten upon the next generated release. Feel free to open a PR as\na proof of concept, but know that we will not be able to merge it as-is. We suggest opening\nan issue first to discuss with us!\n\nOn the other hand, contributions to the README are always very welcome!\n## Reference\n\nA full reference for this library is available [here](https://github.com/merge-api/merge-java-client/blob/HEAD/./reference.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmerge-api%2Fmerge-java-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmerge-api%2Fmerge-java-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmerge-api%2Fmerge-java-client/lists"}