SDG
Entities

Entities SDG Documents Statistics

Get the maximum intensity score per SDG goal for one entity.

GET
https://api.textreveal.com/v3/entities/{entity_id}/sdg/documents/stats

Request

Parameters

  • entity_id*uuid

    Permanent ID of the entity

    Example: "753c48d6-23c8-5fb0-9230-b099898452b5"
  • extract_datedate (operator)

    Extraction date of the documents

    You can input a date or use the following operators: lt (<), lte (≤), gt (>), gte (≥), neq (≠), between

    Example: "between:2022-01-01;2022-01-02"

Response

Response - 200

Maximum intensity score for each of the 17 SDG goals.

  • data*object[]

    Statistics about the sdg documents of the entity.

    Array length: [1, 1]
Response
{
  "data": [
    {
      "count": 67,
      "category": {
        "SDG:1": {
          "score": {
            "max": 3
          }
        },
        "SDG:2": {
          "score": {
            "max": 3
          }
        },
        "SDG:3": {
          "score": {
            "max": 3
          }
        },
        "SDG:4": {
          "score": {
            "max": 3
          }
        },
        "SDG:5": {
          "score": {
            "max": 3
          }
        },
        "SDG:6": {
          "score": {
            "max": 3
          }
        },
        "SDG:7": {
          "score": {
            "max": 3
          }
        },
        "SDG:8": {
          "score": {
            "max": 3
          }
        },
        "SDG:9": {
          "score": {
            "max": 3
          }
        },
        "SDG:10": {
          "score": {
            "max": 3
          }
        },
        "SDG:11": {
          "score": {
            "max": 3
          }
        },
        "SDG:12": {
          "score": {
            "max": 3
          }
        },
        "SDG:13": {
          "score": {
            "max": 3
          }
        },
        "SDG:14": {
          "score": {
            "max": 3
          }
        },
        "SDG:15": {
          "score": {
            "max": 3
          }
        },
        "SDG:16": {
          "score": {
            "max": 3
          }
        },
        "SDG:17": {
          "score": {
            "max": 3
          }
        }
      }
    }
  ]
}

Error

Error - 400

Bad request

  • message*string

    Error message.

    Example: "Check the errors field for more details"
  • code*number (enum)

    Error code.

    Values: 400
  • reason*string (enum)

    Error reason.

    Values: "invalid"
  • errorsobject[]

    Possible error causes.

Response
{
  "message": "Check the errors field for more details",
  "code": 400,
  "reason": "invalid",
  "errors": [
    {
      "message": "string",
      "field": "extract_date",
      "reason": "invalid_type"
    }
  ]
}

Error - 401

Unauthorized

  • message*string

    Error message.

    Example: "Authorization header is expected"
  • code*number (enum)

    Error code.

    Values: 401
  • reason*string (enum)

    Error reason.

    Values: "unauthorized"
  • errors*object[]
    Array length: [1, 1]
Response
{
  "message": "Authorization header is expected",
  "code": 401,
  "reason": "unauthorized",
  "errors": [
    {
      "message": "Required",
      "field": "headers.authorization",
      "reason": "invalid_type"
    }
  ]
}

Error - 404

Not found

  • message*string

    Error message.

    Example: "The requested entity does not exist or is not visible to your company."
  • code*number (enum)

    Error code.

    Values: 404
  • reason*string (enum)

    Error reason.

    Values: "not_found"
Response
{
  "message": "The requested entity does not exist or is not visible to your company.",
  "code": 404,
  "reason": "not_found"
}

Generic errors are not shown, see Errors for more details.