---
schema_version: "1"
id: 61c9cb6e28ba9a39219082017cf541c5ee3bf42ffd43b57de2f90a384830a016
title: |-
  getEthocaAPIRequest(disputeItems, disputeType,
        namedCredential)
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/financial_services_cloud_object_reference/apex_disputemanagement_DisputeMgmtHelper_getEthocaAPIRequest.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.financial_services_cloud_object_reference.meta/financial_services_cloud_object_reference/apex_disputemanagement_DisputeMgmtHelper_getEthocaAPIRequest.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: d9b29deb764d85c479e0c5a4ce6bb5ca2c023b3789557c790a793c8dd4e8e34f
description: Prepares the payload used in the dispute flow and sends it to the integration provider, retrying if necessary.
---
# getEthocaAPIRequest(disputeItems, disputeType, namedCredential)

Prepares the payload used in the dispute flow and sends it to the integration provider, retrying if necessary.

## Signature

public static HttpRequest getEthocaAPIRequest(List<DisputeItem> disputeItems, String disputeType, String namedCredential)

## Parameters

### disputeItems

Type: List<DisputeItem>

Disputed transaction data in the following JSON format:

\[
  {
    "transaction\_date": "2023-01-01",
    "transaction\_identifier": "1",
    "transaction\_amount": 213.1,
    "transaction\_description": "t1"
  },
  {
    "transaction\_date": "2023-01-01",
    "transaction\_identifier": "2",
    "transaction\_amount": 150.94,
    "transaction\_description": "t2"
  }
\]

The keys correspond to DisputeItem object fields.

### disputeType

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.264.0.apexref.meta/apexref/apex_methods_system_string.htm)

A value of the Dispute object’s DisputeType picklist field:

- Processing Error
- Consumer Dispute
- Fraud

### namedCredential

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.264.0.apexref.meta/apexref/apex_methods_system_string.htm)

The named credential for accessing the integration provider.

## Return Value

Type: [HttpRequest](https://developer.salesforce.com/docs/atlas.en-us.264.0.apexref.meta/apexref/apex_classes_restful_http_httprequest.htm)

Returns an HttpRequest that includes the disputed transaction data and sends it to the integration provider, retrying if necessary.