Process JSON/XML data by entity schema and the overlays for the view.

POST https://api.consentgrid.io/v1/pgdf/entities/{entity}/{view}?labelsOnly=false
Authorization: Bearer apiKey
Content-Type: application/json | text/xml

The request body contains an XML or JSON document. This API first validates the document using the schema defined for the entity, and if the validation is successful, applies all the overlays defined for view. The overlays can add annotations, to the document, mask fields, etc. If there are labeling overlays in the view, the labels are not inserted directly into the document. Instead, labels are attached as annotations, and can be retrieved using labelsOnly=true query parameter.

Response

200 Ok

The response depends on the value of labelsOnly flag. If it is omitted or false, the output is the input document processed by the view. It may contain additional fields added by the overlays, or fields removed/modified by them.

If labelsOnly=true, then the output document contains only the annotations added to the fields of the document:

[
  {
    "field": "address.city",
    "annotations": {
      "labels": [
        "location"
      ]
    }
  },
  ...
]
404 Not Found

Entity or view not found.

50x Server Error

Validation or processing error.