Updating a dispute

How to update an existing dispute of a transaction.

To update a dispute, use the PATCH /disputes/{dispute_id} operation and provide the body parameter as shown in the table below.

Parameter

Type

Description

dispute_status
required

string

The status that the dispute must be updated to. Currently only cancelled is supported.

The following is an example of a request to update the status of a dispute.

curl --request PATCH \
     --url https://sandbox.bond.tech/api/v0.1/disputes/06c33e31-0811-46ad-9588-9c5d09537372 \
     --header 'Accept: application/json' \
     --header 'Authorization: YOUR-AUTHENTICATION' \
     --header 'Content-Type: application/json' \
     --header 'Identity: YOUR-IDENTITY' \
     --data '
{
     "dispute_status": "cancelled"
}
'
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://sandbox.bond.tech/api/v0.1/disputes/06c33e31-0811-46ad-9588-9c5d09537372")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Accept"] = 'application/json'
request["Content-Type"] = 'application/json'
request["Identity"] = 'YOUR-IDENTITY'
request["Authorization"] = 'YOUR-AUTHENTICATION'
request.body = "{\"dispute_status\":\"cancelled\"}"

response = http.request(request)
puts response.read_body
const options = {
  method: 'PATCH',
  headers: {
    Accept: 'application/json',
    'Content-Type': 'application/json',
    Identity: 'YOUR-IDENTITY',
    Authorization: 'YOUR-AUTHENTICATION'
  },
  body: JSON.stringify({dispute_status: 'cancelled'})
};

fetch('https://sandbox.bond.tech/api/v0.1/disputes/06c33e31-0811-46ad-9588-9c5d09537372', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
import requests

url = "https://sandbox.bond.tech/api/v0.1/disputes/06c33e31-0811-46ad-9588-9c5d09537372"

payload = {"dispute_status": "cancelled"}
headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
    "Identity": "YOUR-IDENTITY",
    "Authorization": "YOUR-AUTHENTICATION"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
var client = new RestClient("https://sandbox.bond.tech/api/v0.1/disputes/06c33e31-0811-46ad-9588-9c5d09537372");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Accept", "application/json");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Identity", "YOUR-IDENTITY");
request.AddHeader("Authorization", "YOUR-AUTHENTICATION");
request.AddParameter("application/json", "{\"dispute_status\":\"cancelled\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"dispute_status\":\"cancelled\"}");
Request request = new Request.Builder()
  .url("https://sandbox.bond.tech/api/v0.1/disputes/06c33e31-0811-46ad-9588-9c5d09537372")
  .patch(body)
  .addHeader("Accept", "application/json")
  .addHeader("Content-Type", "application/json")
  .addHeader("Identity", "YOUR-IDENTITY")
  .addHeader("Authorization", "YOUR-AUTHENTICATION")
  .build();

Response response = client.newCall(request).execute();

The following is an example of a response to a successful request to update a dispute.

{
  "dispute_id": "06c33e31-0811-46ad-9588-9c5d09537372",
  "dispute_status": "cancelled"
}

For a complete specification and interactive examples, see Updating a dispute in the Bond API Reference.


Did this page help you?