Retresco re-enrich

Re-enrich documents with Retresco

Required scope: retresco

Description

Re-enriches documents with Retresco. This endpoint is only available for customers with a Retresco integration enabled. The endpoint will return a 200 status code when the request is valid, then the Livingdocs Server will start the re-enrichment process in the background. The re-enrichment process can take up to 1s per document to re-enrich. If the provided document ids are not found, the re-enrich job will not be executed for that document.

Follow the guide to configure the re-enrich webhook in Retresco’s website.

Use Cases:

  • Re-enrich documents after modifications in the Retresco entities, to update the document metadata. This endpoint should be called by Retresco when the user modifies entities that apply to one or multiple documents.
Curl Example
ACCESS_TOKEN=ey1234
curl -k -X POST "https://server.livingdocs.io/api/v1/retresco/re-enrich" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json; charset=utf-8" \
  --data-binary @- << EOF
  {
    "doc_ids": ["1", "2", "3"]
  }
EOF

Endpoint

GET /api/v1/retresco/re-enrich

Parameters

NameTypeNotes
doc_idsarray<string|number>A list of the desired document ids to re-enrich.

Response

200
OK
api/v1/retresco/re-enrich
{
}
400
Bad Request
api/v1/retresco/re-enrich
{
  "status":400,
  "error":"Bad Request",
  "error_details":
  {
    "message":"The Retresco API has not been enabled (projectId=5)",
    "name":"ConfigurationError"
  }
}