Update an Incoming ACH
curl --request PATCH \
--url https://api.treasuryprime.com/incoming_ach/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "Returned as fraudulent",
"return_code": "R29",
"status": "return"
}
'import requests
url = "https://api.treasuryprime.com/incoming_ach/{id}"
payload = {
"description": "Returned as fraudulent",
"return_code": "R29",
"status": "return"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({description: 'Returned as fraudulent', return_code: 'R29', status: 'return'})
};
fetch('https://api.treasuryprime.com/incoming_ach/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.treasuryprime.com/incoming_ach/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'description' => 'Returned as fraudulent',
'return_code' => 'R29',
'status' => 'return'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.treasuryprime.com/incoming_ach/{id}"
payload := strings.NewReader("{\n \"description\": \"Returned as fraudulent\",\n \"return_code\": \"R29\",\n \"status\": \"return\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.treasuryprime.com/incoming_ach/{id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"Returned as fraudulent\",\n \"return_code\": \"R29\",\n \"status\": \"return\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.treasuryprime.com/incoming_ach/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"Returned as fraudulent\",\n \"return_code\": \"R29\",\n \"status\": \"return\"\n}"
response = http.request(request)
puts response.read_body{
"account_id": "acct_11jbx6ve3c8an",
"account_number": "1371971315",
"account_type": "checking",
"amount": "100.00",
"bank_id": "bank_treasuryprime",
"company_desc": null,
"company_id": "000000000",
"company_name": "Prime of Treasury Inc.",
"created_at": "2023-08-15T14:47:35Z",
"description": "Returned as fraudulent",
"direction": "credit",
"effective_date": "2023-08-15",
"id": "inach_11jdq4073ea9k",
"nacha_body": {
"batches": [
{
"_mac": "",
"batch_number": 1,
"company": {
"id": "823419438",
"name": "Example Corp"
},
"description": "LOREM IPSUM",
"descriptive_date": "",
"discretionary_data": "",
"effective_date": "2021-04-14T00:00:00Z",
"entries": [
{
"addenda": [],
"amount": 25,
"direction": "credit",
"discretionary_data": "",
"id_number": "11gap2hytfy17a",
"receiver": {
"account_number": "123456798",
"account_type": "checking",
"name": "George Washington",
"routing_number": "017014038"
},
"trace_number": "24015053925610",
"transaction_type": "payment"
}
],
"odfi_id": "02806504",
"originator_status_code": "dfi",
"sec_code": "ppd",
"settlement_date": "167"
}
],
"created_at": "2021-04-12T11:25:00.000Z",
"destination": {
"id": " 074000022",
"name": "EXAMPLE BANK NON CO"
},
"file_id": "K",
"origin": {
"id": " 075000051",
"name": "M&I"
},
"reference_code": ""
},
"name": null,
"org_id": "org_1h648t6pkmg",
"original_transaction_id": null,
"related_transaction_ids": [],
"return_code": "R29",
"sec_code": "ccd",
"status": "return",
"trace_number": "1692110855251",
"transaction_code": null,
"updated_at": "2023-08-15T14:47:35Z"
}Incoming ACH
Update an Incoming ACH
PATCH
/
incoming_ach
/
{id}
Update an Incoming ACH
curl --request PATCH \
--url https://api.treasuryprime.com/incoming_ach/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "Returned as fraudulent",
"return_code": "R29",
"status": "return"
}
'import requests
url = "https://api.treasuryprime.com/incoming_ach/{id}"
payload = {
"description": "Returned as fraudulent",
"return_code": "R29",
"status": "return"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({description: 'Returned as fraudulent', return_code: 'R29', status: 'return'})
};
fetch('https://api.treasuryprime.com/incoming_ach/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.treasuryprime.com/incoming_ach/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'description' => 'Returned as fraudulent',
'return_code' => 'R29',
'status' => 'return'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.treasuryprime.com/incoming_ach/{id}"
payload := strings.NewReader("{\n \"description\": \"Returned as fraudulent\",\n \"return_code\": \"R29\",\n \"status\": \"return\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.treasuryprime.com/incoming_ach/{id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"Returned as fraudulent\",\n \"return_code\": \"R29\",\n \"status\": \"return\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.treasuryprime.com/incoming_ach/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"Returned as fraudulent\",\n \"return_code\": \"R29\",\n \"status\": \"return\"\n}"
response = http.request(request)
puts response.read_body{
"account_id": "acct_11jbx6ve3c8an",
"account_number": "1371971315",
"account_type": "checking",
"amount": "100.00",
"bank_id": "bank_treasuryprime",
"company_desc": null,
"company_id": "000000000",
"company_name": "Prime of Treasury Inc.",
"created_at": "2023-08-15T14:47:35Z",
"description": "Returned as fraudulent",
"direction": "credit",
"effective_date": "2023-08-15",
"id": "inach_11jdq4073ea9k",
"nacha_body": {
"batches": [
{
"_mac": "",
"batch_number": 1,
"company": {
"id": "823419438",
"name": "Example Corp"
},
"description": "LOREM IPSUM",
"descriptive_date": "",
"discretionary_data": "",
"effective_date": "2021-04-14T00:00:00Z",
"entries": [
{
"addenda": [],
"amount": 25,
"direction": "credit",
"discretionary_data": "",
"id_number": "11gap2hytfy17a",
"receiver": {
"account_number": "123456798",
"account_type": "checking",
"name": "George Washington",
"routing_number": "017014038"
},
"trace_number": "24015053925610",
"transaction_type": "payment"
}
],
"odfi_id": "02806504",
"originator_status_code": "dfi",
"sec_code": "ppd",
"settlement_date": "167"
}
],
"created_at": "2021-04-12T11:25:00.000Z",
"destination": {
"id": " 074000022",
"name": "EXAMPLE BANK NON CO"
},
"file_id": "K",
"origin": {
"id": " 075000051",
"name": "M&I"
},
"reference_code": ""
},
"name": null,
"org_id": "org_1h648t6pkmg",
"original_transaction_id": null,
"related_transaction_ids": [],
"return_code": "R29",
"sec_code": "ccd",
"status": "return",
"trace_number": "1692110855251",
"transaction_code": null,
"updated_at": "2023-08-15T14:47:35Z"
}Authorizations
basicAuthapiKey
Body
application/json
The incoming_ach to update
Response
200 - application/json
The incoming_ach updated
Was this page helpful?