When enrichment data has been uploaded and fits to a certain prediction it is added to the results from the GET /document/jobs/{id
} endpoint.
Enrichment data is refreshed automatically every 4 hours. It might take up to 4 hours until the enrichment data prediction is available in the response. If the enrichment data prediction is NOT available in the response in your first try, perform again (some hours later) steps 4 and 5. Do not perform steps 7 and 8 before you see the enrichment data prediction in the response in step 5.
-
Expand the GET /document/jobs/{id
} endpoint.
-
Click Try it out.
-
Set returnNullValues
and extractedValues
to true
.
-
Enter the id
received in the POST /document/jobs endpoint as the id
.
-
Click Execute.
The endpoint request and response look as follows:

What just happened?
In this example, in the response, one of the extracted fields is the receiver contact Linda Owens. This information is enriched with the employee ID enrichment data created in step 2. The prediction suggests the employee ID from Linda Owens (E0001) with 100% probability. The employee ID from Lin Owens (E0002) is not even considered by the machine leaning model.
This is an example of a full prediction including the enrichment data part:
{
"status": "DONE",
"id": "47dc278a-f329-4925-9344-48ac7ffda67a",
"fileName": "sample-invoice-2.pdf",
"documentType": "invoice",
"created": "2020-11-13T09:22:46.069362+00:00",
"finished": "2020-11-13T09:22:55.708792+00:00",
"country": "XX",
"extraction": {
"headerFields": [
{
"name": "taxAmount",
"category": "amounts",
"value": null,
"type": "number",
"page": null,
"confidence": null,
"coordinates": {
"x": 0,
"y": 0,
"w": 0,
"h": 0
},
"group": 1
},
{
"name": "taxRate",
"category": "amounts",
"value": null,
"type": "number",
"page": null,
"confidence": null,
"coordinates": {
"x": 0,
"y": 0,
"w": 0,
"h": 0
},
"group": 1
},
{
"name": "documentDate",
"category": "document",
"value": "2020-02-20",
"type": "date",
"page": 1,
"confidence": 0.654179429306703,
"coordinates": {
"x": 0.863306451612903,
"y": 0.286121402108863,
"w": 0.0681451612903226,
"h": 0.0088344257623254
}
},
{
"name": "senderAddress",
"category": "sender",
"value": "Cupertino,CA 95014",
"type": "string",
"page": 1,
"confidence": 0.595586925575679,
"coordinates": {
"x": 0.067741935483871,
"y": 0.0929039612425192,
"w": 0.138306451612903,
"h": 0.0102593331433457
}
},
{
"name": "senderName",
"category": "sender",
"value": "Apple Store One Infinite Loop",
"type": "string",
"page": 1,
"confidence": 0.597478873833562,
"coordinates": {
"x": 0.0665322580645161,
"y": 0.0544314619549729,
"w": 0.127016129032258,
"h": 0.030777999430037
}
},
{
"name": "grossAmount",
"category": "amounts",
"value": 1998,
"type": "number",
"page": 1,
"confidence": 0.549836874008179,
"coordinates": {
"x": 0.793548387096774,
"y": 0.447420917640353,
"w": 0.0681451612903226,
"h": 0.00997435166714167
}
},
{
"name": "documentNumber",
"category": "document",
"value": "9001321",
"type": "string",
"page": 1,
"confidence": 0.654770247993015,
"coordinates": {
"x": 0.863306451612903,
"y": 0.268167569108008,
"w": 0.0584677419354839,
"h": 0.00854944428612142
}
},
{
"name": "receiverContact",
"category": "receiver",
"value": "Linda Owens",
"type": "string",
"page": 1,
"confidence": 0.622583129314276,
"coordinates": {
"x": 0.150403225806452,
"y": 0.320604160729553,
"w": 0.0943548387096774,
"h": 0.00797948133371335
}
},
{
"name": "receiverAddress",
"category": "receiver",
"value": "5584 Nickel Road KINTA, Oklahoma 74552",
"type": "string",
"page": 1,
"confidence": 0.587670087023011,
"coordinates": {
"x": 0.14758064516129,
"y": 0.275577087489313,
"w": 0.170564516129032,
"h": 0.0287831290966087
}
},
{
"name": "receiverName",
"category": "receiver",
"value": "Future Inc.",
"type": "string",
"page": 1,
"confidence": 0.605180115394649,
"coordinates": {
"x": 0.148387096774194,
"y": 0.257623254488458,
"w": 0.0770161290322581,
"h": 0.00883442576232546
}
},
{
"name": "taxId",
"category": "amounts",
"value": null,
"type": "string",
"page": null,
"confidence": null,
"coordinates": {
"x": 0,
"y": 0,
"w": 0,
"h": 0
},
"group": 1
},
{
"name": "shippingAmount",
"category": "amounts",
"value": null,
"type": "number",
"page": null,
"confidence": null,
"coordinates": {
"x": 0,
"y": 0,
"w": 0,
"h": 0
}
},
{
"name": "currencyCode",
"category": "amounts",
"value": "USD",
"type": "string",
"page": 1,
"confidence": 0.962176322937012,
"coordinates": {
"x": 0,
"y": 0,
"w": 0,
"h": 0
}
},
{
"name": "purchaseOrderNumber",
"category": "details",
"value": null,
"type": "string",
"page": null,
"confidence": null,
"coordinates": {
"x": 0,
"y": 0,
"w": 0,
"h": 0
}
},
{
"name": "netAmount",
"category": "amounts",
"value": 1998,
"type": "number",
"page": 1,
"confidence": 0.227824148204592,
"coordinates": {
"x": 0.793548387096774,
"y": 0.447420917640353,
"w": 0.067741935483871,
"h": 0.00968937019093763
}
}
],
"lineItems": [
[
{
"name": "description",
"category": "details",
"value": "Phone 11 Pro 256GB Gold",
"type": "string",
"page": 1,
"confidence": 0.618215461879066,
"coordinates": {
"x": 0.0758064516129032,
"y": 0.376460530065546,
"w": 0.181451612903226,
"h": 0.00854944428612137
}
},
{
"name": "quantity",
"category": "details",
"value": 1,
"type": "number",
"page": 1,
"confidence": 0.623341202735901,
"coordinates": {
"x": 0.631048387096774,
"y": 0.37674551154175,
"w": 0.0108870967741935,
"h": 0.00797948133371329
}
},
{
"name": "netAmount",
"category": "amounts",
"value": 1149,
"type": "number",
"page": 1,
"confidence": 0.634690215774611,
"coordinates": {
"x": 0.794758064516129,
"y": 0.376460530065546,
"w": 0.0681451612903226,
"h": 0.00997435166714161
}
},
{
"name": "unitPrice",
"category": "details",
"value": 1149,
"type": "number",
"page": 1,
"confidence": 0.619598222275575,
"coordinates": {
"x": 0.709677419354839,
"y": 0.376460530065546,
"w": 0.0681451612903226,
"h": 0.00997435166714161
}
},
{
"name": "materialNumber",
"category": "details",
"value": null,
"type": "string",
"page": 1,
"confidence": null,
"coordinates": {
"x": 0,
"y": 0,
"w": 0,
"h": 0
}
}
],
[
{
"name": "description",
"category": "details",
"value": "Apple Watch Edition GPS + Cellular, 44mm Space Black Titanium Case with Anchor Gray Sport Loop",
"type": "string",
"page": 1,
"confidence": 0.615273810685171,
"coordinates": {
"x": 0.0737903225806452,
"y": 0.402678825876318,
"w": 0.524193548387097,
"h": 0.0290681105728128
}
},
{
"name": "quantity",
"category": "details",
"value": 1,
"type": "number",
"page": 1,
"confidence": 0.624722316861153,
"coordinates": {
"x": 0.631048387096774,
"y": 0.403248788828726,
"w": 0.0108870967741935,
"h": 0.00826446280991738
}
},
{
"name": "netAmount",
"category": "amounts",
"value": 849,
"type": "number",
"page": 1,
"confidence": 0.613978360380445,
"coordinates": {
"x": 0.794758064516129,
"y": 0.402678825876318,
"w": 0.0552419354838709,
"h": 0.00968937019093757
}
},
{
"name": "unitPrice",
"category": "details",
"value": 849,
"type": "number",
"page": 1,
"confidence": 0.591678272073086,
"coordinates": {
"x": 0.71008064516129,
"y": 0.402678825876318,
"w": 0.0548387096774193,
"h": 0.00968937019093757
}
},
{
"name": "materialNumber",
"category": "details",
"value": null,
"type": "string",
"page": 1,
"confidence": null,
"coordinates": {
"x": 0,
"y": 0,
"w": 0,
"h": 0
}
}
]
]
},
"fileType": "pdf",
"enrichment": {
"employee": [
{
"id": "E0001",
"confidence": 1
}
]
}
}
You have now successfully used the employee entity to get enrichment data predictions for the document you uploaded to Document Information Extraction.