Versions Compared

Key

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

Status

status
Status
colourGreen
titleapproved

Approver

colourYellow
titlein review
Status
colourRed
titlecontent missing

Approver

In order to process your first document with the Gini Pay API, you will have to perform the following easy steps:

  1. Register your application

  2. Obtain an access token

  3. Upload a document

  4. Check the document status information

  5. Retrieve the extractions

  6. Send feedback

Info

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

Register Your Application

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

Note

Your client secret must be kept confidential. Do not share the client secret with anyone (e.g. keeping it in a public repository).

Obtain an Access Token

The access token is only needed if you want to create a token from a trusted device (backend) and use it from a 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 (don't forget to replace random@example.org with your username and geheim with your password as well as client-id with your client ID and client-secret with your client secret).

Upload a Document

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

If the file was accepted by the Gini Pay API (i.e. 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.

Check the Document Status Information

The document processing takes a bit of time and in order to get the extractions, you need to 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.

Retrieve the 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) as well as candidates (a list of values for some semantic property).

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

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 know in realtime whether the extraction system is delivering the best possible quality for your application.

...

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

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