# .FraudPreventionV2Client

All URIs are relative to *https://api.sandbox.expediagroup.com/fraud-prevention/v2*

Method | HTTP request | Description
------------- | ------------- | -------------
[**notifyWithAccountUpdate**](FraudPreventionV2Client.md#notifyWithAccountUpdate) | **POST** /fraud-prevention/v2/account/update | Send an update as a result of an account screen transaction
[**notifyWithOrderUpdate**](FraudPreventionV2Client.md#notifyWithOrderUpdate) | **POST** /fraud-prevention/v2/order/purchase/update | Send an update for a transaction
[**screenAccount**](FraudPreventionV2Client.md#screenAccount) | **POST** /fraud-prevention/v2/account/screen | Run fraud screening for one transaction
[**screenOrder**](FraudPreventionV2Client.md#screenOrder) | **POST** /fraud-prevention/v2/order/purchase/screen | Run fraud screening for one transaction


# **notifyWithAccountUpdate**
> AccountUpdateResponse notifyWithAccountUpdate(accountUpdateRequest)

The Account Update API is called when there is an account lifecycle transition such as a challenge outcome, account restoration, or remediation action completion. For example, if a user\'s account is disabled, deleted, or restored, the Account Update API is called to notify Expedia Group about the change. The Account Update API is also called when a user responds to a login Multi-Factor Authentication based on a Fraud recommendation.

### Example


```typescript
import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .FraudPreventionV2Client(configuration);

let body:.FraudPreventionV2ClientNotifyWithAccountUpdateRequest = {
  // AccountUpdateRequest | An AccountUpdate request may be of one of the following types `MULTI_FACTOR_AUTHENTICATION_UPDATE`, `REMEDIATION_UPDATE`.
  accountUpdateRequest: {},
};

apiInstance.notifyWithAccountUpdate(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
```


### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **accountUpdateRequest** | **AccountUpdateRequest**| An AccountUpdate request may be of one of the following types &#x60;MULTI_FACTOR_AUTHENTICATION_UPDATE&#x60;, &#x60;REMEDIATION_UPDATE&#x60;. |


### Return type

**AccountUpdateResponse**

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | The AccountUpdateResponse was successful. |  -  |
**400** | Bad request |  -  |
**401** | Unauthorized |  -  |
**403** | Forbidden |  -  |
**404** | Account Update Not Found |  -  |
**429** | Too many requests |  -  |
**500** | Internal server error |  -  |
**502** | Bad gateway |  -  |
**503** | Service unavailable |  -  |
**504** | Gateway timeout |  -  |

[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)

# **notifyWithOrderUpdate**
> OrderPurchaseUpdateResponse notifyWithOrderUpdate(orderPurchaseUpdateRequest)

The Order Purchase Update API is called when the status of the order has changed.  For example, if the customer cancels the reservation, changes reservation in any way, or adds additional products or travelers to the reservation, the Order Purchase Update API is called to notify Expedia Group about the change.  The Order Purchase Update API is also called when the merchant cancels or changes an order based on a Fraud recommendation. 

### Example


```typescript
import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .FraudPreventionV2Client(configuration);

let body:.FraudPreventionV2ClientNotifyWithOrderUpdateRequest = {
  // OrderPurchaseUpdateRequest | An OrderPurchaseUpdate request may be of one of the following types `ORDER_UPDATE`, `CHARGEBACK_FEEDBACK`, `INSULT_FEEDBACK`, `REFUND_UPDATE`, `PAYMENT_UPDATE`. 
  orderPurchaseUpdateRequest: {},
};

apiInstance.notifyWithOrderUpdate(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
```


### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **orderPurchaseUpdateRequest** | **OrderPurchaseUpdateRequest**| An OrderPurchaseUpdate request may be of one of the following types &#x60;ORDER_UPDATE&#x60;, &#x60;CHARGEBACK_FEEDBACK&#x60;, &#x60;INSULT_FEEDBACK&#x60;, &#x60;REFUND_UPDATE&#x60;, &#x60;PAYMENT_UPDATE&#x60;.  |


### Return type

**OrderPurchaseUpdateResponse**

### Authorization

[orderPurchaseUpdateAuth](README.md#orderPurchaseUpdateAuth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | The OrderUpdateRequest was successful. |  -  |
**400** | Bad request |  -  |
**401** | Unauthorized |  -  |
**403** | Forbidden |  -  |
**404** | Order Purchase Update Not Found |  -  |
**429** | Too many requests |  -  |
**500** | Internal server error |  -  |
**502** | Bad gateway |  -  |
**503** | Retryable Order Purchase Update Failure |  -  |
**504** | Gateway timeout |  -  |

[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)

# **screenAccount**
> AccountScreenResponse screenAccount(accountScreenRequest)

The Account Screen API gives a Fraud recommendation for an account transaction. A recommendation can be ACCEPT, CHALLENGE, or REJECT. A transaction is marked as CHALLENGE whenever there are insufficient signals to recommend ACCEPT or REJECT. These CHALLENGE incidents are manually reviewed, and a corrected recommendation is made asynchronously.

### Example


```typescript
import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .FraudPreventionV2Client(configuration);

let body:.FraudPreventionV2ClientScreenAccountRequest = {
  // AccountScreenRequest
  accountScreenRequest: {
    transaction: {
      siteInfo: {
        locale: "en-US",
        name: "expedia.com",
        brandName: "brandName_example",
        placementName: "LOGIN",
      },
      deviceDetails: {
        source: "source_example",
        deviceBox: "deviceBox_example",
        ipAddress: "192.168.32.48",
        userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36",
        type: "WEBSITE",
      },
      customerAccount: {
        userId: "userId_example",
        accountType: "INDIVIDUAL",
        accountRole: "USER",
        name: {
          lastName: "lastName_example",
          firstName: "firstName_example",
          middleName: "middleName_example",
          title: "title_example",
          suffix: "suffix_example",
        },
        username: "username_example",
        emailAddress: "emailAddress_example",
        telephones: [
          {
            type: "HOME",
            platformType: "MOBILE",
            countryAccessCode: "1",
            areaCode: "1",
            phoneNumber: "1234567",
            extensionNumber: "89",
            preferenceRank: 3.14,
            lastVerifiedDateTime: new Date('1970-01-01T00:00:00.00Z'),
            verifiedFlag: true,
          },
        ],
        address: null,
        registeredTime: new Date('1970-01-01T00:00:00.00Z'),
        activeFlag: true,
        loyaltyMemberId: "loyaltyMemberId_example",
      },
      transactionDetails: {},
    },
  },
};

apiInstance.screenAccount(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
```


### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **accountScreenRequest** | **AccountScreenRequest**|  |


### Return type

**AccountScreenResponse**

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | The AccountScreenRequest was successfully received and the account screening is complete. |  -  |
**400** | Bad request |  -  |
**401** | Unauthorized |  -  |
**403** | Forbidden |  -  |
**404** | Not Found |  -  |
**429** | Too many requests |  -  |
**500** | Internal server error |  -  |
**502** | Bad gateway |  -  |
**503** | Service unavailable |  -  |
**504** | Gateway timeout |  -  |

[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)

# **screenOrder**
> OrderPurchaseScreenResponse screenOrder(orderPurchaseScreenRequest)

The Order Purchase API gives a Fraud recommendation for a transaction. A recommendation can be Accept, Reject, or Review. A transaction is marked as Review whenever there are insufficient signals to recommend Accept or Reject. These incidents are manually reviewed, and a corrected recommendation is made asynchronously. 

### Example


```typescript
import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .FraudPreventionV2Client(configuration);

let body:.FraudPreventionV2ClientScreenOrderRequest = {
  // OrderPurchaseScreenRequest
  orderPurchaseScreenRequest: {
    transaction: {
      siteInfo: {
        countryCode: "USA",
        agentAssisted: true,
      },
      deviceDetails: {
        source: "source_example",
        deviceBox: "deviceBox_example",
        ipAddress: "192.168.32.48",
      },
      customerAccount: {
        userId: "userId_example",
        accountType: "STANDARD",
        name: {
          lastName: "lastName_example",
          firstName: "firstName_example",
          middleName: "middleName_example",
          title: "title_example",
          suffix: "suffix_example",
        },
        emailAddress: "emailAddress_example",
        telephones: [
          {
            type: "HOME",
            platformType: "MOBILE",
            countryAccessCode: "1",
            areaCode: "1",
            phoneNumber: "1234567",
            extensionNumber: "89",
            preferenceRank: 3.14,
            lastVerifiedDateTime: new Date('1970-01-01T00:00:00.00Z'),
            verifiedFlag: true,
          },
        ],
        address: null,
        registeredTime: new Date('1970-01-01T00:00:00.00Z'),
      },
      transactionDetails: {
        orderId: "1000000234",
        currentOrderStatus: "IN_PROGRESS",
        orderType: "CREATE",
        travelProducts: [
          {},
        ],
        travelers: [
          {
            travelerName: {
              lastName: "lastName_example",
              firstName: "firstName_example",
              middleName: "middleName_example",
              title: "title_example",
              suffix: "suffix_example",
            },
            emailAddress: "emailAddress_example",
            telephones: [
              {
                type: "HOME",
                platformType: "MOBILE",
                countryAccessCode: "1",
                areaCode: "1",
                phoneNumber: "1234567",
                extensionNumber: "89",
                preferenceRank: 3.14,
                lastVerifiedDateTime: new Date('1970-01-01T00:00:00.00Z'),
                verifiedFlag: true,
              },
            ],
            primary: true,
            age: 3.14,
            birthDate: new Date('1970-01-01T00:00:00.00Z'),
            citizenshipCountryCode: "AEI",
            travelerId: "travelerId_example",
          },
        ],
        payments: [
          {},
        ],
      },
    },
  },
};

apiInstance.screenOrder(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
```


### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **orderPurchaseScreenRequest** | **OrderPurchaseScreenRequest**|  |


### Return type

**OrderPurchaseScreenResponse**

### Authorization

[orderPurchaseScreenAuth](README.md#orderPurchaseScreenAuth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | The OrderPurchaseScreenRequest was successfully received and the order screening is complete. |  -  |
**400** | Bad request |  -  |
**401** | Unauthorized |  -  |
**403** | Forbidden |  -  |
**404** | Not Found |  -  |
**429** | Too many requests |  -  |
**500** | Internal server error |  -  |
**502** | Bad gateway |  -  |
**503** | Retryable Order Purchase Screen Failure |  -  |
**504** | Gateway timeout |  -  |

[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)


