All URIs are relative to https://secure.ultracart.com/rest/v2
| Method | HTTP request | Description |
|---|---|---|
| declineEmail | POST /fraud/decline_email | Decline email during checkout fraud review |
| deleteFraudRule | DELETE /fraud/rules/{fraud_rule_oid} | Delete a fraud rule |
| establishFraudRulesFromOrder | POST /fraud/rules/from_order | Establish fraud rules from an order |
| getFraudLookupValues | GET /fraud/lookup_values | Retrieve fraud rule lookup values |
| insertFraudRule | POST /fraud/rules | Insert a fraud rule |
| searchFraudRules | POST /fraud/rules/search | Search fraud rules |
declineEmail(fraud_decline_emails_request)
Decline email during checkout fraud review
Adds one email address to the fraud decline list for this merchant account.
var ucApi = require('ultra_cart_rest_api_v2');
const { apiClient } = require('../api.js'); // https://github.com/UltraCart/sdk_samples/blob/master/javascript/api.js
let apiInstance = new ucApi.FraudApi(apiClient);
// This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
// As such, this might not be the best way to use this object.
// Please see https://github.com/UltraCart/sdk_samples for working examples.
let fraud_decline_emails_request = new UltraCartRestApiV2.FraudDeclineEmailRequest(); // FraudDeclineEmailRequest | Fraud decline emails request
apiInstance.declineEmail(fraud_decline_emails_request, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| fraud_decline_emails_request | FraudDeclineEmailRequest | Fraud decline emails request |
null (empty response body)
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
deleteFraudRule(fraud_rule_oid)
Delete a fraud rule
Deletes a fraud rule for this merchant account.
var ucApi = require('ultra_cart_rest_api_v2');
const { apiClient } = require('../api.js'); // https://github.com/UltraCart/sdk_samples/blob/master/javascript/api.js
let apiInstance = new ucApi.FraudApi(apiClient);
// This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
// As such, this might not be the best way to use this object.
// Please see https://github.com/UltraCart/sdk_samples for working examples.
let fraud_rule_oid = 56; // Number |
apiInstance.deleteFraudRule(fraud_rule_oid, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| fraud_rule_oid | Number |
null (empty response body)
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: Not defined
- Accept: application/json
FraudRulesResponse establishFraudRulesFromOrder(fraud_rule_from_order_request)
Establish fraud rules from an order
Creates one or more fraud rules for this merchant account derived from an existing order, mirroring the 'establish fraud filter' action in the order processing screen. Select which filters to establish; all values are taken from the order. The IP rule is created against the order's /24 subnet (last octet masked). The credit card filter duplicates the order's stored card vault token, so no card number is sent through the API. Filters whose order data is missing (no stored card, no email, no usable IP, or no numeric street) are skipped and reported in the warning slot rather than failing the request.
var ucApi = require('ultra_cart_rest_api_v2');
const { apiClient } = require('../api.js'); // https://github.com/UltraCart/sdk_samples/blob/master/javascript/api.js
let apiInstance = new ucApi.FraudApi(apiClient);
// This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
// As such, this might not be the best way to use this object.
// Please see https://github.com/UltraCart/sdk_samples for working examples.
let fraud_rule_from_order_request = new UltraCartRestApiV2.FraudRuleFromOrderRequest(); // FraudRuleFromOrderRequest | Fraud rule from order request
apiInstance.establishFraudRulesFromOrder(fraud_rule_from_order_request, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| fraud_rule_from_order_request | FraudRuleFromOrderRequest | Fraud rule from order request |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
FraudLookupValuesResponse getFraudLookupValues()
Retrieve fraud rule lookup values
Returns the dropdown values required to build valid fraud rule insert and search requests. Includes rule types, failure actions, user actions, IP range types, AVS match types, the merchant's rotating transaction gateways, screen branding themes, countries, and affiliates.
var ucApi = require('ultra_cart_rest_api_v2');
const { apiClient } = require('../api.js'); // https://github.com/UltraCart/sdk_samples/blob/master/javascript/api.js
let apiInstance = new ucApi.FraudApi(apiClient);
// This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
// As such, this might not be the best way to use this object.
// Please see https://github.com/UltraCart/sdk_samples for working examples.
apiInstance.getFraudLookupValues((error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});This endpoint does not need any parameter.
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: Not defined
- Accept: application/json
FraudRuleResponse insertFraudRule(fraud_rule_insert_request)
Insert a fraud rule
Creates a fraud rule for this merchant account. Field names in the request body are semantic (eg amount_threshold, email, ip_address). Call GET /v2/fraud/lookup_values for the list of valid rule_type, failure_action, and related dropdown values. The 'credit card matches' rule type is not supported via REST.
var ucApi = require('ultra_cart_rest_api_v2');
const { apiClient } = require('../api.js'); // https://github.com/UltraCart/sdk_samples/blob/master/javascript/api.js
let apiInstance = new ucApi.FraudApi(apiClient);
// This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
// As such, this might not be the best way to use this object.
// Please see https://github.com/UltraCart/sdk_samples for working examples.
let fraud_rule_insert_request = new UltraCartRestApiV2.FraudRuleInsertRequest(); // FraudRuleInsertRequest | Fraud rule insert request
apiInstance.insertFraudRule(fraud_rule_insert_request, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| fraud_rule_insert_request | FraudRuleInsertRequest | Fraud rule insert request |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
FraudRulesResponse searchFraudRules(fraud_rule_search_request, opts)
Search fraud rules
Searches fraud rules for this merchant account using semantic filter fields. Pagination and sort are passed as query parameters (_limit, _offset, _sort). You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination. Results are capped at 10,000 records by ElasticSearch and the warning slot indicates when that cap was hit. Use more selective filters in that case.
var ucApi = require('ultra_cart_rest_api_v2');
const { apiClient } = require('../api.js'); // https://github.com/UltraCart/sdk_samples/blob/master/javascript/api.js
let apiInstance = new ucApi.FraudApi(apiClient);
// This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
// As such, this might not be the best way to use this object.
// Please see https://github.com/UltraCart/sdk_samples for working examples.
let fraud_rule_search_request = new UltraCartRestApiV2.FraudRuleSearchRequest(); // FraudRuleSearchRequest | Fraud rule search request
let opts = {
'_limit': 100, // Number | The maximum number of records to return on this one API call. (Maximum 200)
'_offset': 0, // Number | Pagination of the record set. Offset is a zero based index.
'_sort': "_sort_example" // String | The sort order of the fraud rules. See Sorting documentation for examples of using multiple values and sorting by ascending and descending.
};
apiInstance.searchFraudRules(fraud_rule_search_request, opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| fraud_rule_search_request | FraudRuleSearchRequest | Fraud rule search request | |
| _limit | Number | The maximum number of records to return on this one API call. (Maximum 200) | [optional] [default to 100] |
| _offset | Number | Pagination of the record set. Offset is a zero based index. | [optional] [default to 0] |
| _sort | String | The sort order of the fraud rules. See Sorting documentation for examples of using multiple values and sorting by ascending and descending. | [optional] |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json