ipInfo

KeyFormatConditionDescription
ipAddressstringMIP address.
countryobjectMCountry of IP origin.
statestringCStates and provinces (that is, the first-level administrative division) in all countries where they exist.
citystringMCity, localized spelling.
longitudestringMThe longitude of the identified location, expressed as a floating point number with range of -180 to 180, with positive numbers representing East and negative numbers representing West.
latitudestringMThe latitude of the identified location, expressed as a floating point number with range of -90 to 90, with positive numbers representing North and negative numbers representing South. Latitude and longitude are derived from the city or postal code.

Schema

{

    “$schema”: “http://json-schema.org/draft-07/schema#”,

    “$id”: “https://www.computop-paygate.com/schemas/ipInfo.json”,

    “title”: “ipInfo”,

    “description”: “IP Information”,

    “type”: “object”,

    “properties”: {

        “ipAddress”: {

            “type”: “string”,

            “oneOf”: [{“format”: “ipv4”},{“format”: “ipv6”}]

        },

        “country”: {

            “type”: “object”,

            “properties”: {

                “countryName”: {

                    “type”: “string”

                },

                “countryA2”: {

                    “type”: “string”,

                    “minLength”: 2,

                    “maxLength”: 2

                },

                “countryA3”: {

                    “type”: “string”,

                    “minLength”: 3,

                    “maxLength”: 3

                },

                “countryNumber”: {

                    “type”: “string”,

                    “minLength”: 3,

                    “maxLength”: 3

                }

            },

            “required”: [“countryName”, “countryA2”, “countryA3”, “countryNumber”],

            “additionalproperties”: false

        },

        “state”: {

            “type”: “string”

        },

        “city”: {

            “type”: “string”

        },

        “longitude”: {

            “type”: “string”

        },

        “latitude”: {

            “type”: “string”

        }

    },

    “required”: [“ipAddress”, “country”, “city”, “longitude”, “latitude”],

    “additionalproperties”: false

}

Sample

{

    “ipAddress”: “178.37.173.82”,

    “country”: {

        “countryName”: “poland”,

        “countryA2”: “pl”,

        “countryA3”: “pol”,

        “countryNumber”: “616”

    },

    “state”: “wielkopolskie”,

    “city”: “poznan”,

    “longitude”: “16.83739”,

    “latitude”: “52.4136”

}