Skip to main content
Version: v2023.18.0

GET differences

This API allows you to request a textual comparison and retrieve a DocumentCompareResult.

API technical description

Endpoint:

GET /difference

Query param:

AttributeTypeRequiredDescription
leftDocumentIdStringyesId of the first document to compare.
rightDocumentIdStringyesId of the second document to compare.

Response:

AttributeTypeDescription
documentCompareResultDocumentCompareResultDocumentCompareResult contains the result of the comparison.

Examples

Retrieve a difference

The call below generates a build request from two documents with IDs:

  • left document id= 123e4567-e89b-12d3-a456-426614174000
  • right document id= b64_bm9yZS92SDMtMS0xMTh1735080237
curl -X 'GET' \
'http://localhost:8761/difference?leftDocumentId=123e4567-e89b-12d3-a456-426614174000&rightDocumentId=b64_bm9yZS92SDMtMS0xMTh1735080237' \
-H 'accept: */*'

Response sample:

{
"leftDocumentId": "string",
"rightDocumentId": "string",
"textChanges": [
{
"changeType": "DELETE",
"fragments": [
{
"endOfLine": true,
"pageNumber": 0,
"text": "string",
"type": "DELETE"
}
],
"left": {
"clickableDestination": {
"action": "string",
"destination": "string",
"position": {
"h": 0,
"w": 0,
"x": 0,
"y": 0
}
},
"font": "string",
"fontSize": 0,
"individualWidths": [
0
],
"pageNumber": 0,
"paragraphId": 0,
"position": {
"h": 0,
"w": 0,
"x": 0,
"y": 0
},
"rightToLeftText": true,
"startTime": 0,
"text": "string"
},
"right": {
"clickableDestination": {
"action": "string",
"destination": "string",
"position": {
"h": 0,
"w": 0,
"x": 0,
"y": 0
}
},
"font": "string",
"fontSize": 0,
"individualWidths": [
0
],
"pageNumber": 0,
"paragraphId": 0,
"position": {
"h": 0,
"w": 0,
"x": 0,
"y": 0
},
"rightToLeftText": true,
"startTime": 0,
"text": "string"
}
}
]
}