Versions Compared

Key

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

...

The second (rarely used) way is where the final approval signal (button click) is not possible. In such case, send the summary on one label per request.

Types of

...

transfer summaries

  • positive summary (preferred): the extraction was correct and confirmed by the user without modification.

    Anchor
    positive
    positive

  • complementary summary: the extraction system extracted nothing, for example, the response doesn't contain the requested label. The user manually entered the correct value.

    Anchor
    complementary
    complementary

  • negative summary: the extraction was incomplete or erroneous. The user manually corrected the extraction.

    Anchor
    negative
    negative

  • informative summary: the extraction was changed for another reason, for example, if a line item is returned, the quantity extraction gets summary "0" and a return reason.

...

Info

Send transfer summary only on those labels that are physically seen by the user. Unseen labels except Return Assistant (RA) specific “amountsAreConsistent” should be filtered out.

Code Block
languagejson
//submitting transfer summary on extractions

    PUT /documents/{id}/extractions/feedback

...

  • Sending the test document to the Gini Pay API. See Submit Files.

  • Requesting the results. See Retrieve Extractions.

  • You should get a JSON like in the example.

  • Correcting the document with the following JSON. Here we change the amountToPay from "995.00:EUR" to "950.00:EUR" and confirm the other field values (iban, bic, paymentRecipient, paymentReference).

Code Block
languagejson
{
   "feedback": {
       "amountToPay": {
    
      "value": "950.00:EUR"
       },

      "iban": {
           "value": "DE68130300000017850360"
       },
  
    "bic": {

          "value": "BYLADEM1001"
       },
  
    "paymentPurpose": {

          "value": "RE-20170512-02"
       },
  
    "paymentRecipient": {
    
      "value": "Fahrrad Rückenwind"
       }

  }
}

Below we show a more elaborated example here including the Return Assistant compound extractions (if RA is enabled) in order to explain different types of the transfer summary. The example scenario is as In our current API, we started to support alternative JSON keys for it. For example, instead of "feedback" key when submitting the summary, you can use "extractions" and "compoundExtractions" as you will see in the examples below.

The next example scenario is as follows: the user uploads a document where the labels amountToPay, paymentReference, iban, discount-addon are extracted. Unfortunately, the label paymentRecipient could not be extracted. The Such response to the extractions request is as follows:

Info

The boxes are optional. Boxes should only be sent if your use case visualizes the document with the locations of the extractions. Thus, the user can confirm the correct location of an extraction.

Code Block
languagejson
{
    "candidates": {
    },
    "extractions": {
   
    "amountToPay": {
            "box": {
       "box": {
        "height": 8.0,
   
            "left": 545.0,
                "page": 1,
  
             "top": 586.0,
                "width": 17.0
    
       },
            "candidates"candidates": "amounts",
            "entity": "amount",
     
      "value": "545.6044:EUR"
        },
        "iban": {
     
      "box": {
                "height": 7.0,
                "left": 447.0,
        "page": 1,
      "page": 1,
                "top": 746.0,
                "width": 100.0
            },

           "candidates": "ibans",
            "entity": "iban",
     
      "value": "DE68130300000017850360DE14200800000816170700"
    },
   },
         "paymentReference": {
     
      "entity": "reference",
    
       "value": "ReNr 123, KdNr 32"
    },
   }   "discount-addon": {
 },     "compoundExtractionsentity": {"amount",
        "lineItemsvalue": ["-2.51:EUR"
    },
      "amountsAreConsistent": {
      "entity": "text",
      "artNumbervalue": {"true"
    }
  },
  "compoundExtractions": {
    "valuelineItems": "10101",[
       {
        "entityartNumber": "text"{
,                 "box"value": {"10101",
            "entity": "text"
       "height": 7.0 },
        "quantity": {
          "leftvalue": 55.0"2",
          "entity": "numeric"
        "page": 1},
        "description": {
          "topvalue": 546.0"Trocknerbälle, Wolle, 2er",
          "entity": "text"
      "width": 100.0 },
        "sumGross": {
     }     "value": "17.98:EUR",
          },
"entity": "amount"
        }
    "quantity": { },
      {
        "valueartNumber": "12",
    {
            "entityvalue": "numeric10103",
          "entity": "text"
  }      },
      },  "quantity": {
         { "value": "3",
          "entity":  "artNumbernumeric":
{        },
        "valuedescription": "10103",{
                "entity""value": "text"Faltenstopp f. Wäscheständer",
          "entity": "text"
  },      },
        "quantitysumGross": {
                "value": "329.97:EUR",
                "entity": "numericamount"
        }
      }
    ]
   }
   }
        ]
    }
}

...

The iban, amountToPay, discount-addon and the lineItems are correct (positive summary). amountsAreConsistent should be always delivered if it exists in the extractions response. The user adds the missing paymentRecipient value (complementary summary) and corrects the paymentReference to "ReNr 1735, KdNr 37" (negative summary). Sets the quantity of one line item to 0 “0” and adds a reason for returning the articles. The iban, amountToPay and the remaining part of lineItems are correct (positive summary). The document is not shown, so we can leave out the boxes. Then the resulting summary request

Then the resulting transfer summary request to submit is as follows:

Code Block
languagejson
{
   "extractions": {
  
    "amountToPay": {
  
        "value": "545.6044:EUR"
       },
 
     "iban": {
    
      "value": "DE68130300000017850360DE14200800000816170700"
       },
       "paymentReferencebic": {
 
         "value": "ReNr 1735, KdNr 37"
  BYLADEM1001"
    },
       "paymentRecipientpaymentPurpose": {
           "value": "Zalando SE"
RE-20170512-02"
      },
   },
 "compoundExtractionspaymentRecipient": {
        "lineItemsvalue": ["Tchibo GmbH"
    },
     "amountsAreConsistent": {
      "entity": "text",
      "artNumbervalue": {"true"
    },
    "discount-addon": {
      "valueentity": "10101amount",
      "value": "-2.51:EUR"
    }
  },
  "compoundExtractions": {
    "lineItems": [
    "quantity":  {
        "artNumber": {
          "value": "010101"
        },
     },   "quantity": {
          "returnReasonvalue": {"0"
        },
        "valuedescription": "r3"{
          "value": "Trocknerbälle, Wolle, 2er",
}             },"entity": "text"
            {
     },
        "artNumbersumGross": {
 
              "value": "1010317.98:EUR",
          "entity": "amount"
  },      },
        "quantityreturnReason": {
     
          "value": "3r3"
        }
      },
      {
     }   "artNumber": {
    ]     }
}

Then the resulting transfer summary request is as follows:

Code Block
languagejson
{ "value": "10103"
        "feedback": {},
        "amountToPayquantity": {

          "value": "950.00:EUR3"
        },
        "ibandescription": {
           "value": "DE68130300000017850360"Faltenstopp f. Wäscheständer",
     },
       "bicentity": {
           "value": "BYLADEM1001""text"
        },
        "paymentPurposesumGross": {
           "value": "RE-20170512-02"
   29.97:EUR",
   },        "paymentRecipiententity": {"amount"
        }
  "value": "Fahrrad Rückenwind"  }
    ]
}
   }
}
Info

Notice, that "feedback" key is not present in the above transfer summary. However, you can still keep it when submitting non-compound extractions summary, our API is compatible.

Submit transfer summary on invalid extractions

...