Update transfer metadata | Moov Documentation
Update transfer metadata
Update the metadata contained on a transfer.
Read our transfers overview guide to learn more.
To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/transfers.write scope.
PATCH
Request
/accounts/{accountID}/transfers/{transferID}
Example cURL request
curl -X PATCH "https://api.moov.io/accounts/{accountID}/transfers/{transferID}" \
-H "Authorization: Bearer {token}" \
-H "X-Moov-Version: v2026.07.00"
JavaScript Example
import { Moov } from "@moovio/sdk";
const moov = new Moov({
security: {
username: "",
password: "",
},
});
async function run() {
const result = await moov.transfers.update({
transferID: "de30c075-4245-4d62-bfb3-f76d4d7d3b9c",
accountID: "18a7907d-2f89-493a-b15a-3aad91c24496",
patchTransfer: {
metadata: {
"optional": "metadata",
},
},
});
console.log(result);
}
run();
PHP Example
declare(strict_types=1);
require 'vendor/autoload.php';
use Moov\MoovPhp;
use Moov\MoovPhp\Models\Components;
$sdk = MoovPhp\Moov::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$patchTransfer = new Components\PatchTransfer(
metadata: [\
'optional' => 'metadata',\
],
);
$response = $sdk->transfers->update(
transferID: 'de30c075-4245-4d62-bfb3-f76d4d7d3b9c',
accountID: '18a7907d-2f89-493a-b15a-3aad91c24496',
patchTransfer: $patchTransfer
);
if ($response->transfer !== null) {
// handle response
}
Java Example
package hello.world;
import io.moov.sdk.Moov;
import io.moov.sdk.models.components.PatchTransfer;
import io.moov.sdk.models.components.Security;
import io.moov.sdk.models.errors.PatchTransferValidationError;
import io.moov.sdk.models.operations.UpdateTransferResponse;
import java.lang.Exception;
import java.util.Map;
public class Application {
public static void main(String[] args) throws PatchTransferValidationError, Exception {
Moov sdk = Moov.builder()
.security(Security.builder()
.username("")
.password("")
.build())
.build();
UpdateTransferResponse res = sdk.transfers().update()
.transferID("de30c075-4245-4d62-bfb3-f76d4d7d3b9c")
.accountID("18a7907d-2f89-493a-b15a-3aad91c24496")
.patchTransfer(PatchTransfer.builder()
.metadata(Map.ofEntries(
Map.entry("optional", "metadata")))
.build())
.call();
if (res.transfer().isPresent()) {
System.out.println(res.transfer().get());
}
}
}
Python Example
from moovio_sdk import Moov
from moovio_sdk.models import components
with Moov(
security=components.Security(
username="",
password="",
),
) as moov:
res = moov.transfers.update(transfer_id="de30c075-4245-4d62-bfb3-f76d4d7d3b9c", account_id="18a7907d-2f89-493a-b15a-3aad91c24496", metadata={
"optional": "metadata",
})
# Handle response
print(res)
Ruby Example
require 'moov_ruby'
Models = ::Moov::Models
s = ::Moov::Client.new(
security: Models::Components::Security.new(
username: '',
password: ''
)
)
res = s.transfers.update(transfer_id: 'de30c075-4245-4d62-bfb3-f76d4d7d3b9c', account_id: '18a7907d-2f89-493a-b15a-3aad91c24496', patch_transfer: Models::Components::PatchTransfer.new(
metadata: {
'optional' => 'metadata',
}
))
unless res.transfer.nil?
# handle response
end
C# Example
using Moov.Sdk;
using Moov.Sdk.Models.Components;
using System.Collections.Generic;
var sdk = new MoovClient(security: new Security() {
Username = "",
Password = "",
});
var res = await sdk.Transfers.UpdateAsync(
transferID: "de30c075-4245-4d62-bfb3-f76d4d7d3b9c",
accountID: "18a7907d-2f89-493a-b15a-3aad91c24496",
body: new PatchTransfer() {
Metadata = new Dictionary<string, string>() {
{ "optional", "metadata" },
},
}
);
// handle response
Example response
{
"metadata": "string",
"foreignID": "string"
}
Response headers
- A unique identifier used to trace requests.
- The request contained missing or expired authentication.
- The user is not authorized to make the request.
- The requested resource was not found.
- The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields.
- Request was refused due to rate limiting.
- The request failed due to an unexpected error.
- The request failed because a downstream service failed to respond.