...
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 RA specific “amountsAreConsistent” should be filtered out. |
Code Block | ||
---|---|---|
| ||
//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 | ||
---|---|---|
| ||
{ "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 below 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 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 | ||
---|---|---|
| ||
{ "candidates": { }, "extractions": { "amountToPay": { "box": { "height": 8.0, "left": 545.0, "page": 1, "top": 586.0, "width": 17.0 }, "candidates": "amounts", "entity": "amount", ""value": "545.6044:EUR" }, "iban": { "box": { "height": 7.0, "left": 447.0, "page": 1, "top": 746.0, ""width": 100.0 }, "candidates": "ibans", "entity": "iban", "value": "DE68130300000017850360DE14200800000816170700" }, "paymentReference": { "entity": "reference", "value": "ReNr 123, KdNr 32" }, }, "compoundExtractions"discount-addon": { "lineItemsentity": ["amount", "value": "-2.51:EUR" {}, "amountsAreConsistent": { "artNumberentity": {"text", "value": "true" } }, "valuecompoundExtractions": { "10101lineItems",: [ { "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", { "value": "10103", "entity": "numerictext" }, } "quantity": { }"value": "3", "entity": "numeric" { }, "artNumberdescription": { "value": "10103Faltenstopp f. Wäscheständer", "entity": "text" }, }, "sumGross": { "quantityvalue": { "value": "3" "29.97:EUR", "entity": "numericamount" } } ] } } |
The user adds 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 is as follows
Then the resulting transfer summary request to submit is as follows:
Code Block | |||||
---|---|---|---|---|---|
| {
"extractions": {
"amountToPay": {
"value": "5.60:EUR"
},
"iban": {
"value": "DE68130300000017850360"
},
| ||||
{ "extractions": { "paymentReferenceamountToPay": { "value": "ReNr 1735, KdNr 37" 45.44:EUR" }, "paymentRecipientiban": { "value": "Zalando SE" DE14200800000816170700" }, }, "compoundExtractionsbic": { "value": "lineItemsBYLADEM1001": [ }, "paymentPurpose": { { "value": "RE-20170512-02" }, "artNumberpaymentRecipient": { "value": "Tchibo GmbH" }, "valueamountsAreConsistent": "10101"{ "entity": "text", }, "value": "true" }, "quantitydiscount-addon": { "entity": "amount", "value": "0-2.51:EUR" } }, "compoundExtractions": { }, "lineItems": [ { "returnReason": { "artNumber": { "value": "r310101" }, } "quantity": { }, "value": "0" }, { "description": { "artNumber": { "value": "Trocknerbälle, Wolle, 2er", "valueentity": "10103" text" }, "sumGross": { "quantity": { "value": "17.98:EUR", "valueentity": "3amount" }, } "returnReason": { } "value": "r3" ] } } } |
Then the resulting transfer summary request is as follows:
Code Block | ||
---|---|---|
| ||
{ }, "feedback": { "amountToPayartNumber": { "value": "950.00:EUR10103" }, "ibanquantity": { "value": "DE681303000000178503603" },, "description": { "bicvalue": "Faltenstopp {f. Wäscheständer", "valueentity": "BYLADEM1001text" }, "paymentPurposesumGross": { "value": "RE-20170512-02" 29.97:EUR", }, "paymentRecipiententity": {"amount" "value": "Fahrrad Rückenwind"} } } ] } } |
Submit transfer summary on invalid extractions
...