ESG

ESG Document

Get an ESG document thanks to its id

GET
https://api.textreveal.com/v3/esg/documents/{document_id}

Request

Parameters

  • document_id*uuid

    Unique identifier of the document.

    Example: "09210f4c-7283-45c9-9b7a-ce5cd6ec7ea6"
  • fields(string (enum))[]

    Fields to include in the response

    Default: ["id", "categories", "case_id", "country", "cluster_size", "datamarts_document_id", "entity_keywords", "entity_id", "event_id", "url", "extract_date", "dashboard_url", "language", "main_story", "negative", "neutral", "novelty", "polarity", "positive", "score", "site", "site_type", "sub_categories", "taxonomy_keywords", "title", "is_high_authority_source", "translated_title", "translated_main_story"]Values: "id", "categories", "case_id", "country", "cluster_size", "datamarts_document_id", "entity_keywords", "entity_id", "event_id", "url", "extract_date", "dashboard_url", "language", "main_story", "negative", "neutral", "novelty", "pola... 
  • translatelanguage-code (enum)

    In which language to translate the results.

    Default translated fields are: title, main_story.

    If empty, translated_ fields won't be returned.

    Example: french

    Values: "af", "afr", "afrikaans", "albanian", "am", "amh", "amharic", "ar", "ara", "arabic", "armenian", "az", "aze", "azerbaijani", "ben", "bengali", "bg", "bn", "bos", "bosnian", "bs", "bul", "bulgarian", "ca", "cat", "catalan", "chinese"... 

Response

Response - 200

Properties of the document.

  • iduuid

    Unique identifier of the document.

    Example: "09210f4c-7283-45c9-9b7a-ce5cd6ec7ea6"
  • categories(string (enum))[]

    List of categories assigned to the document.

    Values: "E", "S", "G"
  • case_iduuid | null

    ID of the case associated with the document.

    Example: "5eb7182b-9b55-4f7a-b3e1-49062ee7cef9"
  • countryiso3166-2 | null (enum)

    Country of origin of the document. The country code is in ISO3166 alpha-2 standard (2 letters).

    Values: "ad", "ae", "af", "ag", "ai", "al", "am", "ao", "aq", "ar", "as", "at", "au", "aw", "ax", "az", "ba", "bb", "bd", "be", "bf", "bg", "bh", "bi", "bj", "bl", "bm", "bn", "bo", "bq", "br", "bs", "bt", "bv", "bw", "by", "bz", "ca", "cc"... 
  • cluster_sizeinteger

    Number of documents in the cluster associated with this document.

    A cluster groups documents that are considered identical or highly similar on a daily level.

    The value includes the current document (e.g. a value of 200 means 199 other similar documents).

  • datamarts_document_idstring

    ID of the raw document with no ESG metadata.

  • entity_keywordsstring[]

    Keywords associated with the entity matched in the document.

  • entity_iduuid

    Permanent ID of the related entity.

  • event_iduuid | null

    ID of the event associated with the document.

    Example: "e7c2464e-0dc8-441a-970b-0d23eeabe3d1"
  • urluri | null

    Original URL of the document.

    Example: "https://domain.com/article#anchor"
  • extract_datestring

    Date of extraction of the document.

  • dashboard_urluri

    Link to the document in SESAMm's Dashboard.

    Example: "https://dashboards.textreveal.com/controversy/09210f4c-7283-45c9-9b7a-ce5cd6ec7ea6"
  • languageiso639-2

    Language of the document. 3-letter ISO639-2 code.

    Example: "fre"
  • main_storystring | null

    Summary of the main story referenced in the document.

  • negativenumber

    Level of negative sentiment towards the entity of interest in the whole document.

    Range: [0, 1]
  • neutralnumber

    Level of neutral sentiment towards the entity of interest in the whole document.

    Range: [0, 1]
  • noveltystring | null

    Summary of the new developments to the main story described in the document.

  • polaritynumber

    Overall polarity score of the document.

    Range: [-1, 1]
  • positivenumber

    Level of positive sentiment towards the entity of interest in the whole document.

    Range: [0, 1]
  • scoreinteger

    Intensity score of the controversy described in the document.

    Range: [1, 5]
  • sitestring

    Website where the document was published.

    Example: "domain.com"
  • site_typestring (enum)

    Type of website.

    Values: "news", "blogs", "discussions"
  • sub_categoriesstring[]

    List of sub-categories assigned to the document.

    Example: ["Climate Change"]
  • taxonomy_keywordsstring[]

    Keywords associated with the categories matched in the document.

  • titlestring | null

    Title of the document.

  • is_high_authority_sourceboolean

    Whether the source is high authority.

    Example: true
  • translated_titlestring | null

    Translated version of title field. See translate query parameter.

    Example: "string"
  • translated_main_storystring | null

    Translated version of main_story field. See translate query parameter.

    Example: "string"
Response
{
  "id": "09210f4c-7283-45c9-9b7a-ce5cd6ec7ea6",
  "categories": [
    "E"
  ],
  "case_id": "5eb7182b-9b55-4f7a-b3e1-49062ee7cef9",
  "country": "fr",
  "cluster_size": 0,
  "datamarts_document_id": "string",
  "entity_keywords": [
    "string"
  ],
  "entity_id": "00000000-0000-0000-0000-000000000000",
  "event_id": "e7c2464e-0dc8-441a-970b-0d23eeabe3d1",
  "url": "https://domain.com/article#anchor",
  "extract_date": "string",
  "dashboard_url": "https://dashboards.textreveal.com/controversy/09210f4c-7283-45c9-9b7a-ce5cd6ec7ea6",
  "language": "fre",
  "main_story": "string",
  "negative": 0.01,
  "neutral": 0.2,
  "novelty": "string",
  "polarity": 0.78765434,
  "positive": 0.8,
  "score": 2,
  "site": "domain.com",
  "site_type": "news",
  "sub_categories": [
    "Climate Change",
    "Water Pollution"
  ],
  "taxonomy_keywords": [
    "string"
  ],
  "title": "string",
  "is_high_authority_source": true,
  "translated_title": "string",
  "translated_main_story": "string"
}

Error

Error - 400

Bad request

  • message*string

    Error message.

    Example: "The server returned an unexpected response"
  • code*integer

    Error code.

    Example: 400
  • reason*string (enum)

    Error reason.

    Values: "invalid", "timeout", "offline", "unknown", "not_found", "unauthorized", "forbidden", "internal", "too_many_requests"
  • errorsobject[]

    Possible error causes, like query params, headers or body.

Response
{
  "message": "The server returned an unexpected response",
  "code": 400,
  "reason": "invalid",
  "errors": [
    {
      "message": "Expected number, received string",
      "field": "size",
      "reason": "invalid_type"
    }
  ]
}

Error - 403

Not authorized

  • message*string
    Example: "Not authorized to access this resource"
  • code*number (enum)

    Error code.

    Values: 403
  • reason*string (enum)
    Values: "forbidden"
Response
{
  "message": "Not authorized to access this resource",
  "code": 403,
  "reason": "forbidden"
}

Error - 404

Not found

  • message*string
    Example: "[record] not found."
  • code*number (enum)

    Error code.

    Values: 404
  • reason*string (enum)
    Values: "not_found"
Response
{
  "message": "[record] not found.",
  "code": 404,
  "reason": "not_found"
}

Error - 429

Too many requests

  • message*string
    Example: "You have too many exports in progress."
  • code*number (enum)
    Values: 429
  • reason*string (enum)
    Values: "too_many_requests"
Response
{
  "message": "You have too many exports in progress.",
  "code": 429,
  "reason": "too_many_requests"
}