Set metadata
curl --request PUT \
--url https://api.enterprise.sandbox.uphold.com/on-off-ramp/{entity}/{entityId}/metadata \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"externalId": 123
}
'import requests
url = "https://api.enterprise.sandbox.uphold.com/on-off-ramp/{entity}/{entityId}/metadata"
payload = { "externalId": 123 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({externalId: 123})
};
fetch('https://api.enterprise.sandbox.uphold.com/on-off-ramp/{entity}/{entityId}/metadata', 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.enterprise.sandbox.uphold.com/on-off-ramp/{entity}/{entityId}/metadata",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'externalId' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.enterprise.sandbox.uphold.com/on-off-ramp/{entity}/{entityId}/metadata"
payload := strings.NewReader("{\n \"externalId\": 123\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://api.enterprise.sandbox.uphold.com/on-off-ramp/{entity}/{entityId}/metadata")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"externalId\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enterprise.sandbox.uphold.com/on-off-ramp/{entity}/{entityId}/metadata")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"externalId\": 123\n}"
response = http.request(request)
puts response.read_body{
"metadata": {
"externalId": 123
}
}Metadata
Set metadata
Create or update metadata for a given entity.
PUT
/
on-off-ramp
/
{entity}
/
{entityId}
/
metadata
Set metadata
curl --request PUT \
--url https://api.enterprise.sandbox.uphold.com/on-off-ramp/{entity}/{entityId}/metadata \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"externalId": 123
}
'import requests
url = "https://api.enterprise.sandbox.uphold.com/on-off-ramp/{entity}/{entityId}/metadata"
payload = { "externalId": 123 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({externalId: 123})
};
fetch('https://api.enterprise.sandbox.uphold.com/on-off-ramp/{entity}/{entityId}/metadata', 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.enterprise.sandbox.uphold.com/on-off-ramp/{entity}/{entityId}/metadata",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'externalId' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.enterprise.sandbox.uphold.com/on-off-ramp/{entity}/{entityId}/metadata"
payload := strings.NewReader("{\n \"externalId\": 123\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://api.enterprise.sandbox.uphold.com/on-off-ramp/{entity}/{entityId}/metadata")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"externalId\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enterprise.sandbox.uphold.com/on-off-ramp/{entity}/{entityId}/metadata")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"externalId\": 123\n}"
response = http.request(request)
puts response.read_body{
"metadata": {
"externalId": 123
}
}
Set metadata creates or updates custom metadata for a given entity. This endpoint follows idempotent PUT semantics:
- Create: Returns
201 Createdif metadata doesn’t exist - Replace: Returns
200 OKif metadata already exists
ETag header representing the version of the metadata, which can be used with If-Match or If-None-Match headers for conditional requests to prevent concurrent update conflicts.
Each PUT request replaces the entire metadata object. Make sure to include all properties you want to retain.
Headers
Path Parameters
Body
application/json
The body is of type object.
Was this page helpful?