Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Page Properties
hiddentrue

Status

Status
colourPurpleGreen
titlestartedapproved

Approver

...

Welcome! Follow along these pages to configure your application and start using the Gini Pay API, perform the following steps.

Info

The usage examples on the right are executed with cURL, a command-line tool to perform HTTP requests.

1. Register your application

Before you can use the Gini Pay API in your application, make sure you have a valid client ID and a client secret. If you don't have the client ID and the client secret already, contact your sales representative.

Note

Keep confidential your client secret. Don't share it with anyone and don’t keep it in a public repository.

...

2. Obtain access token

The access token is only needed if you want to create a token from a trusted device (backend) and use it from an untrusted device (smartphone). The anonymous user is created automatically for each user identified by the X-User-Identifier header.

In order to get an access token for the Gini account, run the example command on the right. Make sure to replace:
random@example.org with your username,
geheim with your password,
client-id with your client ID,
client-secret with your client secret.

3. Upload document

Now that you have the access token, you can upload your first document by sending an API request. The request must contain the corresponding Gini API version number. For example, for our first document, we use the Gini Pay API version v1. The command on the right sends a request against the corresponding version of the API.

If the file is accepted by the Gini Pay API (that is its file format is supported), the extraction system automatically starts to process the document and responses with the HTTP status code 201 as well as the document location URL.

4. Check document status information

The document processing takes a bit of time and, in order to get the extractions, check the status of the processed document periodically. The status can have the value PENDING, which means that the document is being analyzed, and COMPLETED, which means that the document analysis is complete and the extractions are ready for retrieval. Check the current document status by sending a GET request to the URL that you received when the document was uploaded. Once the status changes to COMPLETED, the extractions are ready and you can retrieve them.

5. Retrieve extractions

The document extractions represent various document contents that the extraction system was able to understand and retrieve. In order to get all the extractions, send a request to the right (notice the API version v1).

The returned object contains specific extractions (a value with some specific semantic property), compound extractions (a group of values with some specific semantic property), and candidates (a list of values for some semantic property).

The example response (shortened, on the right) is an invoice issued by Deutsche Post AG. The receiver of the invoice has to pay 12€ (see amountToPay). It contains one line item with article number 10101, a tax rate 19%, and an amount 12€.

6. Send feedback and get even better extractions next time

Feedback is an API request containing the correct extractions that you can send us in order to improve the future extraction accuracy of the system. In fact, your application should always send at least some feedback. The more complete and qualitative the feedback is, the sooner the extraction system learns what is correct and what's not. Feedback is critical to us and important to you because there is no other way for us to know in realtime whether the extraction system is delivering the best possible quality for your application.

In order to inform the system whether the extraction was correct or incorrect, send back the correct value in the feedback request. It is important that it should be the value exactly as it appears on the actual document (not calculated or inferred). Once the feedback is received it gets compared to the extracted value and the result is used further in reports and is included into a self-learning mechanism of the Gini extraction system..

Rw ui steps macro
Rw step

Start with authentication and security topics

Rw step

then find out how to send your documents for processing

Rw step

retrieve results

Rw step

and send back the transfer summary

Rw step

Learn how to manage user accounts and why it is important

Rw step

If you’re migrating from the old API, make sure you check out the migration page as well.

...

Once you read and complete the steps below, our API will be ready to work with your application:

Cfm card
externalUrlhttps://gini.atlassian.net/wiki/spaces/PA1/pages/45154479/Accessing+the+API
color#FFFFFF
filterSpacefalse
destinationexternalUrl
textColorPaletteDefault
titleAccess Gini Pay API
bodyWho can access and use Gini Pay API?
textColor#000000
targettrue
layoutSimple
selectedUrlhttps://gini.atlassian.net/wiki/spaces/PA1/pages/45154479/Accessing+the+API
an.spaceKeyPA1
id1nbcu5ysv4i
backgroundColorPaletteDefault
Cfm card
externalUrlhttps://gini.atlassian.net/wiki/spaces/PA1/pages/36896828/How+to+Process+Documents
color#FFFFFF
filterSpacefalse
destinationexternalUrl
textColorPaletteDefault
titleProcess documents
bodyHow to process documents?
textColor#000000
targettrue
layoutSimple
selectedUrlhttps://gini.atlassian.net/wiki/spaces/PA1/pages/36896828/How+to+Process+Documents
an.spaceKeyPA1
id8f84e82nimo
backgroundColorPaletteDefault
Cfm card
externalUrlhttps://gini.atlassian.net/wiki/spaces/PA1/pages/31686793/How+to+Manage+Gini+Accounts
color#FFFFFF
filterSpacefalse
destinationexternalUrl
textColorPaletteDefault
titleUser accounts
bodyHow to Manage user accounts?
textColor#000000
targettrue
layoutSimple
selectedUrlhttps://gini.atlassian.net/wiki/spaces/PA1/pages/31686793/How+to+Manage+Gini+Accounts
an.spaceKeyPA1
idh1blw8d2m1
backgroundColorPaletteDefault
Cfm card
externalUrlhttps://gini.atlassian.net/wiki/spaces/PA1/pages/30934365/Migrating+from+api.gini.net
color#FFFFFF
filterSpacefalse
destinationexternalUrl
textColorPaletteDefault
titleMigrating from deprecated API
bodyMigrating from api.gini.net
textColor#000000
targettrue
layoutSimple
selectedUrlhttps://gini.atlassian.net/wiki/spaces/PA1/pages/30934365/Migrating+from+api.gini.net
an.spaceKeyPA1
idcyh8tb1ni8
backgroundColorPaletteDefault