curl --request GET \
--url https://prod-api.raisedonors.com/api/MotivationCode/{id} \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://prod-api.raisedonors.com/api/MotivationCode/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://prod-api.raisedonors.com/api/MotivationCode/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://prod-api.raisedonors.com/api/MotivationCode/{id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://prod-api.raisedonors.com/api/MotivationCode/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://prod-api.raisedonors.com/api/MotivationCode/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod-api.raisedonors.com/api/MotivationCode/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_bodyconst url = 'https://prod-api.raisedonors.com/api/MotivationCode/{id}';
const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"id": 6120,
"name": "Year-End Email Appeal",
"code": "YE25-EMAIL",
"siteUrl": "https://riversidehope.example.org/give/year-end-appeal",
"description": "Email appeal for the 2025 year-end campaign.",
"zipCodes": null,
"price": 0,
"cost": 480,
"sortOrder": 1,
"pin": true,
"groups": [
{
"id": 720,
"name": "Year-End 2025 Appeals"
}
]
}{
"type": "https://tools.ietf.org/html/rfc7235#section-3.1",
"title": "Unauthorized",
"status": 401,
"detail": "The Authorization header is missing, malformed, or carries a token that is expired or revoked.",
"instance": "/api/MotivationCode/{id}"
}{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.4",
"title": "Not Found",
"status": 404,
"detail": "Motivation code 6120 was not found.",
"instance": "/api/MotivationCode/6120"
}Get a Motivation Code
Returns a single motivation code by ID.
curl --request GET \
--url https://prod-api.raisedonors.com/api/MotivationCode/{id} \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://prod-api.raisedonors.com/api/MotivationCode/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://prod-api.raisedonors.com/api/MotivationCode/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://prod-api.raisedonors.com/api/MotivationCode/{id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://prod-api.raisedonors.com/api/MotivationCode/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://prod-api.raisedonors.com/api/MotivationCode/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod-api.raisedonors.com/api/MotivationCode/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_bodyconst url = 'https://prod-api.raisedonors.com/api/MotivationCode/{id}';
const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"id": 6120,
"name": "Year-End Email Appeal",
"code": "YE25-EMAIL",
"siteUrl": "https://riversidehope.example.org/give/year-end-appeal",
"description": "Email appeal for the 2025 year-end campaign.",
"zipCodes": null,
"price": 0,
"cost": 480,
"sortOrder": 1,
"pin": true,
"groups": [
{
"id": 720,
"name": "Year-End 2025 Appeals"
}
]
}{
"type": "https://tools.ietf.org/html/rfc7235#section-3.1",
"title": "Unauthorized",
"status": 401,
"detail": "The Authorization header is missing, malformed, or carries a token that is expired or revoked.",
"instance": "/api/MotivationCode/{id}"
}{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.4",
"title": "Not Found",
"status": 404,
"detail": "Motivation code 6120 was not found.",
"instance": "/api/MotivationCode/6120"
}code, mediaType, siteUrl, zipCodes, price and cost, and the groups it belongs to.Authorizations
JWT Authorization header using the Bearer scheme. Example: "Authorization: Bearer {token}"
Path Parameters
The ID of the motivation code.
Response
OK
The unique identifier of the motivation code.
The name of the motivation code.
The code itself, as it appears on gifts.
The kind of media the code is used for, such as Email or Direct Mail.
0, 1, 2, 3, 4, 5, 6, 7 The URL of the site or ad the code is used on.
The description of the motivation code.
The postal codes the code was used in, separated by commas.
The revenue attributed to the code, used for reporting on its return.
What running the code cost, used for reporting on its return.
The position of the code in the order it is displayed in.
Whether the code is pinned to the top of the list.
The groups the code belongs to.
Show child attributes
Show child attributes
Was this page helpful?