Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Submit documents by sending a POST request to the /documents resource path. After successful submission, the location of the new document is returned in the Location header.

Info

Please note that we reject and don’t process files with wrong format or bad quality. In this case we return 400 error in the response message.

The Gini Pay API currently supports two different variants of uploads, one optimized for web applications running in a web browser and the other for all other types of clients. The first variant optimized for web applications expects the documents to be uploaded using a multipart/form-data encoding method. The second variant for all other clients simply uses the request body (independent of the request Content-Type) as the document.

...

Supported file formats

Gini supports the following file formats:

  • PDF files,

  • GIF files (non-animated),

  • PNG files,

  • JPEG files,

  • TIFF files as well as plain text formats (including parsed QR codes).

You can use native documents (PDF only) and scanned documents (all other supported formats).

...

Status Code

Description

400 (Bad Request)

Returned when a file is sent in an invalid format or has a bad quality which we are unable to process.

401 (Unauthorized)

Authorization credentials are either missing, wrong or outdated.or outdated.

413 (Request Entity Too Large)

Returned when the size of the uploaded file was exceeded. Please check here maximum allowed file size: https://gini.atlassian.net/wiki/spaces/PA1/pages/edit-v2/36733064#Supported-file-formats

415

Content type is not supported.

503

Service unavailable. Try again later.

...

Pages that are part of the document are referred to as partial documents. If you want to upload a page (or a page picture) that belongs to the document, your request header should additionally include Content-Type field with application/vnd.gini.v1.partial+png value or application/vnd.gini.v1.partial+pdf in case of PDF page. See the examples below.

In case you want to submit a parsed QR code, please use application/vnd.gini.v1.partial+qr+json. The parsing of the QR fields is optional. The paymentdata needs to contain at least the iban and the paymentRecipient keys. Hence, the minimal valid QR code body could be the following:

...

See the complete QR request example below.

Request

In order to upload a page picture or a partial document, specify a different content type:

...

Status Code

Description

400 (Bad Request)

Returned when the sent file has invalid format or has a bad quality which we are unable to process.

401 (Unauthorized)

Authorization credentials are either missing, wrong or outdated.

413 (Request Entity Too Large)

Returned when the size of the uploaded file was exceeded. Please check here maximum allowed file size: https://gini.atlassian.net/wiki/spaces/PA1/pages/edit-v2/36733064#Supported-file-formats

415

Content type is not supported.

503

Service unavailable. Try again later.

...