Skip to content

Latest commit

 

History

History
455 lines (335 loc) · 15.4 KB

AntifraudApi.md

File metadata and controls

455 lines (335 loc) · 15.4 KB

AntifraudApi

All URIs are relative to https://api.conekta.io

Method HTTP request Description
createRuleBlacklist POST /antifraud/blacklists Create blacklisted rule
createRuleWhitelist POST /antifraud/whitelists Create whitelisted rule
deleteRuleBlacklist DELETE /antifraud/blacklists/{id} Delete blacklisted rule
deleteRuleWhitelist DELETE /antifraud/whitelists/{id} Delete whitelisted rule
getRuleBlacklist GET /antifraud/blacklists Get list of blacklisted rules
getRuleWhitelist GET /antifraud/whitelists Get a list of whitelisted rules

createRuleBlacklist

BlacklistRuleResponse createRuleBlacklist(createRiskRulesData, acceptLanguage)

Create blacklisted rule

Example

// Import classes:
import com.conekta.ApiClient;
import com.conekta.ApiException;
import com.conekta.Configuration;
import com.conekta.auth.*;
import com.conekta.model.*;
import com.conekta.AntifraudApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("https://api.conekta.io");
        
        // Configure HTTP bearer authorization: bearerAuth
        HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
        bearerAuth.setBearerToken("BEARER TOKEN");

        AntifraudApi apiInstance = new AntifraudApi(defaultClient);
        CreateRiskRulesData createRiskRulesData = new CreateRiskRulesData(); // CreateRiskRulesData | requested field for blacklist rule
        String acceptLanguage = "es"; // String | Use for knowing which language to use
        try {
            BlacklistRuleResponse result = apiInstance.createRuleBlacklist(createRiskRulesData, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AntifraudApi#createRuleBlacklist");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Parameters

Name Type Description Notes
createRiskRulesData CreateRiskRulesData requested field for blacklist rule
acceptLanguage String Use for knowing which language to use [optional] [default to es] [enum: es, en]

Return type

BlacklistRuleResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.conekta-v2.1.0+json

HTTP response details

Status code Description Response headers
200 successfully registered rule -
401 authentication error -
500 internal server error -

createRuleWhitelist

WhitelistlistRuleResponse createRuleWhitelist(acceptLanguage, createRiskRulesData)

Create whitelisted rule

Example

// Import classes:
import com.conekta.ApiClient;
import com.conekta.ApiException;
import com.conekta.Configuration;
import com.conekta.auth.*;
import com.conekta.model.*;
import com.conekta.AntifraudApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("https://api.conekta.io");
        
        // Configure HTTP bearer authorization: bearerAuth
        HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
        bearerAuth.setBearerToken("BEARER TOKEN");

        AntifraudApi apiInstance = new AntifraudApi(defaultClient);
        String acceptLanguage = "es"; // String | Use for knowing which language to use
        CreateRiskRulesData createRiskRulesData = new CreateRiskRulesData(); // CreateRiskRulesData | 
        try {
            WhitelistlistRuleResponse result = apiInstance.createRuleWhitelist(acceptLanguage, createRiskRulesData);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AntifraudApi#createRuleWhitelist");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Parameters

Name Type Description Notes
acceptLanguage String Use for knowing which language to use [optional] [default to es] [enum: es, en]
createRiskRulesData CreateRiskRulesData [optional]

Return type

WhitelistlistRuleResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.conekta-v2.1.0+json

HTTP response details

Status code Description Response headers
200 successfully registered rule -
401 authentication error -
403 forbidden error -
500 internal server error -

deleteRuleBlacklist

DeletedBlacklistRuleResponse deleteRuleBlacklist(id, acceptLanguage, xChildCompanyId)

Delete blacklisted rule

Example

// Import classes:
import com.conekta.ApiClient;
import com.conekta.ApiException;
import com.conekta.Configuration;
import com.conekta.auth.*;
import com.conekta.model.*;
import com.conekta.AntifraudApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("https://api.conekta.io");
        
        // Configure HTTP bearer authorization: bearerAuth
        HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
        bearerAuth.setBearerToken("BEARER TOKEN");

        AntifraudApi apiInstance = new AntifraudApi(defaultClient);
        String id = "6307a60c41de27127515a575"; // String | Identifier of the resource
        String acceptLanguage = "es"; // String | Use for knowing which language to use
        String xChildCompanyId = "6441b6376b60c3a638da80af"; // String | In the case of a holding company, the company id of the child company to which will process the request.
        try {
            DeletedBlacklistRuleResponse result = apiInstance.deleteRuleBlacklist(id, acceptLanguage, xChildCompanyId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AntifraudApi#deleteRuleBlacklist");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Parameters

Name Type Description Notes
id String Identifier of the resource
acceptLanguage String Use for knowing which language to use [optional] [default to es] [enum: es, en]
xChildCompanyId String In the case of a holding company, the company id of the child company to which will process the request. [optional]

Return type

DeletedBlacklistRuleResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.conekta-v2.1.0+json

HTTP response details

Status code Description Response headers
200 successfully deleted rule -
401 authentication error -
404 not found entity -
500 internal server error -

deleteRuleWhitelist

DeletedWhitelistRuleResponse deleteRuleWhitelist(id, acceptLanguage, xChildCompanyId)

Delete whitelisted rule

Example

// Import classes:
import com.conekta.ApiClient;
import com.conekta.ApiException;
import com.conekta.Configuration;
import com.conekta.auth.*;
import com.conekta.model.*;
import com.conekta.AntifraudApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("https://api.conekta.io");
        
        // Configure HTTP bearer authorization: bearerAuth
        HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
        bearerAuth.setBearerToken("BEARER TOKEN");

        AntifraudApi apiInstance = new AntifraudApi(defaultClient);
        String id = "6307a60c41de27127515a575"; // String | Identifier of the resource
        String acceptLanguage = "es"; // String | Use for knowing which language to use
        String xChildCompanyId = "6441b6376b60c3a638da80af"; // String | In the case of a holding company, the company id of the child company to which will process the request.
        try {
            DeletedWhitelistRuleResponse result = apiInstance.deleteRuleWhitelist(id, acceptLanguage, xChildCompanyId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AntifraudApi#deleteRuleWhitelist");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Parameters

Name Type Description Notes
id String Identifier of the resource
acceptLanguage String Use for knowing which language to use [optional] [default to es] [enum: es, en]
xChildCompanyId String In the case of a holding company, the company id of the child company to which will process the request. [optional]

Return type

DeletedWhitelistRuleResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.conekta-v2.1.0+json

HTTP response details

Status code Description Response headers
200 successfully deleted rule -
401 authentication error -
403 forbidden error -
404 not found entity -
500 internal server error -

getRuleBlacklist

RiskRulesList getRuleBlacklist(acceptLanguage)

Get list of blacklisted rules

Return all rules

Example

// Import classes:
import com.conekta.ApiClient;
import com.conekta.ApiException;
import com.conekta.Configuration;
import com.conekta.auth.*;
import com.conekta.model.*;
import com.conekta.AntifraudApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("https://api.conekta.io");
        
        // Configure HTTP bearer authorization: bearerAuth
        HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
        bearerAuth.setBearerToken("BEARER TOKEN");

        AntifraudApi apiInstance = new AntifraudApi(defaultClient);
        String acceptLanguage = "es"; // String | Use for knowing which language to use
        try {
            RiskRulesList result = apiInstance.getRuleBlacklist(acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AntifraudApi#getRuleBlacklist");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Parameters

Name Type Description Notes
acceptLanguage String Use for knowing which language to use [optional] [default to es] [enum: es, en]

Return type

RiskRulesList

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.conekta-v2.1.0+json

HTTP response details

Status code Description Response headers
200 All the rules -
401 authentication error -
500 internal server error -

getRuleWhitelist

RiskRulesList getRuleWhitelist(acceptLanguage)

Get a list of whitelisted rules

Return all rules

Example

// Import classes:
import com.conekta.ApiClient;
import com.conekta.ApiException;
import com.conekta.Configuration;
import com.conekta.auth.*;
import com.conekta.model.*;
import com.conekta.AntifraudApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("https://api.conekta.io");
        
        // Configure HTTP bearer authorization: bearerAuth
        HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
        bearerAuth.setBearerToken("BEARER TOKEN");

        AntifraudApi apiInstance = new AntifraudApi(defaultClient);
        String acceptLanguage = "es"; // String | Use for knowing which language to use
        try {
            RiskRulesList result = apiInstance.getRuleWhitelist(acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AntifraudApi#getRuleWhitelist");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Parameters

Name Type Description Notes
acceptLanguage String Use for knowing which language to use [optional] [default to es] [enum: es, en]

Return type

RiskRulesList

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.conekta-v2.1.0+json

HTTP response details

Status code Description Response headers
200 All the rules -
401 authentication error -
403 forbidden error -
500 internal server error -