Search Response Schema

Search Response Schema for Combined E-mail Lookup

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",

  "required": [
    "id",
    "isSuccess",
    "criteria",
    "type",
    "status",
    "percentage",
    "sources",
    "usage",
    "createdTime",
    "requestCaption",
    "isDeleted",
    "isFree",
    "apiDataEntities"
  ],

  "properties": {
    "id": { "type": "integer" },
    "isSuccess": { "type": "boolean" },
    "criteria": { "type": "string" },
    "type": { "type": "string" },
    "status": { "type": "string" },
    "percentage": { "type": "string" },
    "usage": { "type": "string" },
    "createdTime": { "type": "string", "format": "date-time" },

    "sources": {
      "type": "array",
      "items": { "$ref": "#/$defs/source" }
    },

    "requestId": { "type": ["string", "null"] },
    "requestIdFB": { "type": ["string", "null"] },
    "requestIdTW": { "type": ["string", "null"] },
    "requestIdOK": { "type": ["string", "null"] },
    "requestIdINSTA": { "type": ["string", "null"] },

    "requestCaption": { "type": "string" },
    "responsesCounter": { "type": ["integer", "null"] },

    "isDeleted": { "type": "boolean" },
    "isFree": { "type": "boolean" },

    "apiDataEntities": {
      "type": "array",
      "items": { "$ref": "#/$defs/apiDataEntity" }
    }
  },

  "additionalProperties": false,

  "$defs": {

    "source": {
      "type": "object",
      "required": ["name", "percentage"],
      "properties": {
        "name": { "type": "string" },
        "percentage": { "type": ["number", "null"] }
      },
      "additionalProperties": false
    },

    "apiDataEntity": {
      "type": "object",
      "required": [
        "id",
        "userId",
        "requestMonitorId",
        "data"
      ],
      "properties": {
        "id": { "type": "integer" },
        "userId": { "type": "integer" },
        "requestMonitorId": { "type": "integer" },

        "data": { "$ref": "#/$defs/apiDataEntityData" }
      },
      "additionalProperties": false
    },

    "apiDataEntityData": {
      "type": "object",
      "required": ["request", "from", "status"],
      "properties": {
        "request": { "type": "string" },
        "from": { "type": "string" },
        "status": { "type": "string" },

        "emailSearchResultGlook": {
          "$ref": "#/$defs/glookResult"
        }
      }
    },

    "glookResult": {
      "type": "object",
      "properties": {
        "email_info": {
          "$ref": "#/$defs/emailInfo"
        },
        "calendar": {
          "$ref": "#/$defs/calendar"
        }
      }
    },

    "emailInfo": {
      "type": "object",
      "properties": {
        "PROFILE_CONTAINER": {
          "type": "object",
          "properties": {
            "profile": { "type": "object" }
          }
        }
      }
    },

    "calendar": {
      "type": "object",
      "properties": {
        "details": { "type": "object" },

        "events": {
          "type": "object",
          "properties": {
            "summary": { "type": "string" },
            "updated": { "type": "string" },

            "items": {
              "type": "array",
              "items": { "$ref": "#/$defs/calendarEvent" }
            }
          }
        }
      }
    },

    "calendarEvent": {
      "type": "object",
      "required": ["id", "status", "summary"],
      "properties": {
        "id": { "type": "string" },
        "status": { "type": "string" },
        "summary": { "type": "string" },

        "description": { "type": ["string", "null"] },
        "location": { "type": ["string", "null"] },

        "start": { "$ref": "#/$defs/timeObject" },
        "end": { "$ref": "#/$defs/timeObject" }
      }
    },

    "timeObject": {
      "type": "object",
      "properties": {
        "date_time": { "type": "string" },
        "time_zone": { "type": "string" }
      }
    }

  }
}

Last updated