@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Greip API
@base https://greipapi.com
@version 1.2.0
@auth Bearer bearer | ApiKey key in query
@endpoints 14
@toc geoip(1), lookup(7), scoring(4), ip(1), account(1)

@group geoip
@endpoint GET /geoip
@desc Retrieve detailed geolocation information for a visitor’s or user’s IP address
@optional {params: str # The `params` command can be used to specify the required modules you want to get in the response.  Expected values: `security`, `currency`, `timezone`, `location`, and/or `device`.  Sample value: `security,timezone,currency`., lang: str # The `lang` command is used to get a response in a specific language., format: str # The `format` command is used to get a response in a specific format., userID: str # The `userID` command can be used to identify requests sent by specific users to monitor in the [Events Page](https://docs.greip.io/dashboard-guides/monitoring-capabilities/real-time-threat-monitoring)., mode: str # The mode command is used to in the development stage to simulate the integration process before releasing it to the production environment.  Expected values: `live`, or `test`., callback: str # The `callback` command can help you make the response as a JSONP format.  Expected values: any name that can be used as a function name in Javascript, e.g: `myFunctionName`.}
@returns(200) OK
@errors {400: Bad Request, 500: Internal Server Error}

@endgroup

@group lookup
@endpoint GET /lookup/ip
@desc Get the full information of a given IP address
@required {ip: str # The `ip` command is used to specify the IP address you want to lookup.}
@optional {params: str # The `params` command can be used to specify the required modules you want to get in the response.  Expected values: `security`, `currency`, `timezone`, `location`, and/or `device`.  Sample value: `security,timezone,currency`., lang: str # The `lang` command is used to get a response in a specific language., format: str # The `format` command is used to get a response in a specific format., userID: str # The `userID` command can be used to identify requests sent by specific users to monitor in the [Events Page](https://docs.greip.io/dashboard-guides/monitoring-capabilities/real-time-threat-monitoring)., mode: str # The mode command is used to in the development stage to simulate the integration process before releasing it to the production environment.  Expected values: `live`, or `test`., callback: str # The `callback` command can help you make the response as a JSONP format.  Expected values: any name that can be used as a function name in Javascript, e.g: `myFunctionName`.}
@returns(200) OK
@errors {400: Bad Request, 500: Internal Server Error}

@endpoint GET /lookup/ip/threats
@desc Retrieve threat intelligence information for a given IP address
@required {ip: str # The `ip` parameter is used to specify the IP address you want to retrieve it’s threat intelligence information.}
@optional {format: str # The `format` command is used to get a response in a specific format., userID: str # The `userID` command can be used to identify requests sent by specific users to monitor in the [Events Page](https://docs.greip.io/dashboard-guides/monitoring-capabilities/real-time-threat-monitoring)., mode: str # The mode command is used to in the development stage to simulate the integration process before releasing it to the production environment.  Expected values: `live`, or `test`., callback: str # The `callback` command can help you make the response as a JSONP format.  Expected values: any name that can be used as a function name in Javascript, e.g: `myFunctionName`.}
@returns(200) OK
@errors {400: Bad Request, 500: Internal Server Error}

@endpoint GET /lookup/ip/bulk
@desc Get the full information of multiple IP Addresses
@required {ips: str # The `ips` command is used to specify the IP address you want to lookup}
@optional {params: str # The `params` command can be used to specify the required modules you want to get in the response.  Expected values: `security`, `currency`, `timezone`, `location`, and/or `device`.  Sample value: `security,timezone,currency`., lang: str # The `lang` command is used to get a response in a specific language., format: str # The `format` command is used to get a response in a specific format., mode: str # The mode command is used to in the development stage to simulate the integration process before releasing it to the production environment.  Expected values: `live`, or `test`., callback: str # The `callback` command can help you make the response as a JSONP format.  Expected values: any name that can be used as a function name in Javascript, e.g: `myFunctionName`.}
@returns(200) OK
@errors {400: Bad Request, 500: Internal Server Error}

@endpoint GET /lookup/asn
@desc Lookup any AS Number and receive it's details
@optional {asn: str # The `asn` command is used to specify the AS Number you want to lookup.  Sample value: `AS6167` or `6167`, isList: str # Set this to `yes` if you want to list all routes of both IPv4 and IPv6., format: str # The `format` command is used to get a response in a specific format.  Expected values: `JSON`, `XML`, `CSV`, or `Newline`.  For more information please refer to [Response Format](https://docs.greip.io/options/response-format)., callback: str # The `callback` command can help you make the response as a JSONP format.  Expected values: any name that can be used as a function name in Javascript, e.g: `myFunctionName`., mode: str # The mode command is used to in the development stage to simulate the integration process before releasing it to the production environment.  Expected values: `live`, or `test`.}
@returns(200) OK
@errors {400: Bad Request, 500: Internal Server Error}

@endpoint GET /lookup/bin
@desc Get the complete data associated with a debit/credit card
@required {bin: str # The BIN/IIN of the card (min: 6 digits).}
@optional {format: str # The `format` command is used to get a response in a specific format., userID: str # The `userID` command can be used to identify requests sent by specific users to monitor in the [Events Page](https://docs.greip.io/dashboard-guides/monitoring-capabilities/real-time-threat-monitoring)., mode: str # The mode command is used to in the development stage to simulate the integration process before releasing it to the production environment.  Expected values: `live`, or `test`., callback: str # The `callback` command can help you make the response as a JSONP format.  Expected values: any name that can be used as a function name in Javascript, e.g: `myFunctionName`.}
@returns(200) OK
@errors {400: Bad Request, 500: Internal Server Error}

@endgroup

@group scoring
@endpoint POST /scoring/payment
@desc Prevent financial losses by deploying AI-Powered modules
@optional {data: map, format: str, mode: str, userID: str, callback: str}
@returns(200) OK
@errors {400: Bad Request, 500: Internal Server Error}

@endgroup

@group lookup
@endpoint GET /lookup/iban
@desc Validate International IBANs and obtain essential information
@required {iban: str # The International Bank Account Number (IBAN) you want to validate.}
@optional {format: str # The `format` command is used to get a response in a specific format., userID: str # The `userID` command can be used to identify requests sent by specific users to monitor in the [Events Page](https://docs.greip.io/dashboard-guides/monitoring-capabilities/real-time-threat-monitoring)., mode: str # The mode command is used to in the development stage to simulate the integration process before releasing it to the production environment.  Expected values: `live`, or `test`., callback: str # The `callback` command can help you make the response as a JSONP format.  Expected values: any name that can be used as a function name in Javascript, e.g: `myFunctionName`.}
@returns(200) OK
@errors {400: Bad Request, 500: Internal Server Error}

@endgroup

@group scoring
@endpoint GET /scoring/email
@desc Validate email addresses and retrieve additional information
@required {email: str # The `email` command is used to specify the email you want to validate.}
@optional {format: str # The `format` command is used to get a response in a specific format., userID: str # The `userID` command can be used to identify requests sent by specific users to monitor in the [Events Page](https://docs.greip.io/dashboard-guides/monitoring-capabilities/real-time-threat-monitoring)., mode: str # The mode command is used to in the development stage to simulate the integration process before releasing it to the production environment.  Expected values: `live`, or `test`., callback: str # The `callback` command can help you make the response as a JSONP format.  Expected values: any name that can be used as a function name in Javascript, e.g: `myFunctionName`.}
@returns(200) OK
@errors {400: Bad Request, 500: Internal Server Error}

@endpoint GET /scoring/phone
@desc Validate phone numbers and retrieve additional information
@required {phone: str # The `phone` command is used to specify the phone number you want to validate., countryCode: str # The `ISO 3166-1 alpha-2` format of the country code of the phone number.}
@optional {format: str # The `format` command is used to get a response in a specific format., userID: str # The `userID` command can be used to identify requests sent by specific users to monitor in the [Events Page](https://docs.greip.io/dashboard-guides/monitoring-capabilities/real-time-threat-monitoring)., mode: str # The mode command is used to in the development stage to simulate the integration process before releasing it to the production environment.  Expected values: `live`, or `test`., callback: str # The `callback` command can help you make the response as a JSONP format.  Expected values: any name that can be used as a function name in Javascript, e.g: `myFunctionName`.}
@returns(200) OK
@errors {400: Bad Request, 500: Internal Server Error}

@endgroup

@group lookup
@endpoint GET /lookup/country
@desc Get the full information of a country
@required {CountryCode: str # The `ISO 3166-1 alpha-2` format of the country code.}
@optional {params: str # The `params` command is used to determine the data you need in the response., format: str # The `format` command is used to get a response in a specific format., mode: str # The mode command is used to in the development stage to simulate the integration process before releasing it to the production environment.  Expected values: `live`, or `test`., callback: str # The `callback` command can help you make the response as a JSONP format.  Expected values: any name that can be used as a function name in Javascript, e.g: `myFunctionName`.}
@returns(200) OK
@errors {400: Bad Request, 500: Internal Server Error}

@endgroup

@group scoring
@endpoint GET /scoring/profanity
@desc Detect profanity in a given text
@required {text: str # The text you want to filter.}
@optional {listBadWords: str # Set to `yes` to list the bad-words as an Array., scoreOnly: str # Set to `yes` to return only the score of the text and whether it's safe or not., format: str # The `format` command is used to get a response in a specific format., userID: str # The `userID` command can be used to identify requests sent by specific users to monitor in the [Events Page](https://docs.greip.io/dashboard-guides/monitoring-capabilities/real-time-threat-monitoring)., mode: str # The mode command is used to in the development stage to simulate the integration process before releasing it to the production environment.  Expected values: `live`, or `test`., callback: str # The `callback` command can help you make the response as a JSONP format.  Expected values: any name that can be used as a function name in Javascript, e.g: `myFunctionName`.}
@returns(200) OK
@errors {400: Bad Request, 500: Internal Server Error}

@endgroup

@group ip
@endpoint GET /ip
@desc Retrieve the IP address of your visitors or users without the need for an account or API key in Greip
@returns(200) OK
@errors {400: Bad Request, 500: Internal Server Error}

@endgroup

@group account
@endpoint DELETE /account/users/delete
@desc Request to delete your user data from Greip
@optional {value: str}
@returns(200) OK
@errors {400: Bad Request, 500: Internal Server Error}

@endgroup

@end
