https://github.com/veryfi/veryfi-kotlin
Kotlin Library for communicating with the Veryfi OCR API
https://github.com/veryfi/veryfi-kotlin
api api-rest invoice kotlin kotlin-library kotlin-sdk ocr ocr-recognition receipt sdk veryfi veryfi-api
Last synced: 5 months ago
JSON representation
Kotlin Library for communicating with the Veryfi OCR API
- Host: GitHub
- URL: https://github.com/veryfi/veryfi-kotlin
- Owner: veryfi
- License: mit
- Created: 2021-12-21T15:20:35.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-12-20T01:38:16.000Z (10 months ago)
- Last Synced: 2025-04-08T04:33:47.823Z (6 months ago)
- Topics: api, api-rest, invoice, kotlin, kotlin-library, kotlin-sdk, ocr, ocr-recognition, receipt, sdk, veryfi, veryfi-api
- Language: Kotlin
- Homepage:
- Size: 5.39 MB
- Stars: 5
- Watchers: 6
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
[](https://openjdk.java.net/projects/jdk/11/)
**veryfi** is a Kotlin module for communicating with the [Veryfi OCR API](https://veryfi.com/api/)
## Installation
Install from [Maven](https://mvnrepository.com/) using gradle, a package manager for Kotlin.
Install the package from Maven using gradle:
Gradle using Groovy:
```groovy
dependencies {
implementation 'com.veryfi:veryfi-kotlin:1.0.8'
}
```Gradle using Koltin:
```groovy
dependencies {
implementation("com.veryfi:veryfi-kotlin:1.0.8")
}
```## Getting Started
### Obtaining Client ID and user keys
If you don't have an account with Veryfi, please go ahead and register here: [https://hub.veryfi.com/signup/api/](https://hub.veryfi.com/signup/api/)### Kotlin API Client Library
The **veryfi** library can be used to communicate with Veryfi API. All available functionality is described here https://veryfi.github.io/veryfi-kotlin/veryfi/Client.htmlBelow is the sample script using **veryfi** to OCR and extract data from a document:
```java
object Main {
@JvmStatic
fun main(args: Array) {
val clientId = "your_client_id"
val clientSecret = "your_client_secret"
val username = "your_username"
val apiKey = "your_password"
val client = createClient(clientId, clientSecret, username, apiKey)
val categories = listOf("Advertising & Marketing", "Automotive")
val jsonResponse = client.processDocument("example1.jpg", categories, false, null)
}
}
```Update a document
```java
object Main {
@JvmStatic
fun main(args: Array) {
val clientId = "your_client_id"
val clientSecret = "your_client_secret"
val username = "your_username"
val apiKey = "your_password"
val client = createClient(clientId, clientSecret, username, apiKey)
val documentId = "your_document_id"
val parameters = JSONObject()
parameters.put("category", "Meals & Entertainment")
parameters.put("total", 11.23)
val jsonResponse = client.updateDocument(documentId, parameters)
}
}
```## Need help?
Visit https://docs.veryfi.com/ to access integration guides and usage notes in the Veryfi API Documentation PortalIf you run into any issue or need help installing or using the library, please contact support@veryfi.com.
If you found a bug in this library or would like new features added, then open an issue or pull requests against this repo!
To learn more about Veryfi visit https://www.veryfi.com/
## Tutorial
Below is an introduction to the Kotlin SDK.
[Link to blog post →](https://www.veryfi.com/kotlin/)