<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><title> </title><link rel="stylesheet" type="text/css" href="/Content/docs.css" /><link href="/Content/syntaxhighlighter_3.0.83/styles/shCore.css" rel="stylesheet" type="text/css" /><link href="/Content/syntaxhighlighter_3.0.83/styles/shThemeDefault.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="/content/syntaxhighlighter_3.0.83/scripts/shCore.js"></script> <script type="text/javascript" src="/content/syntaxhighlighter_3.0.83/scripts/shAutoloader.js"></script> <script type="text/javascript" src="/content/jquery-1.6.1.min.js"></script> </head> <body style="background-color: #F2F2F2"> <div> <div style="background-color: #78256D; margin-left: auto; margin-right: auto; width: 900px; height: 30px; padding: 10px 0px 10px 0px;"> <div style="padding: 5px 10px 10px 25px; color: White; font-weight: bolder; font-size: 18px;">JustGiving API Documentation</div> </div> <div style="background-color: #FFFFFF; margin-left: auto; margin-right: auto; width: 900px; padding: 10px 0px 0px 0px; height: 100%; min-height: 1000px;"> <div style="padding: 10px 0px 0px 25px; float: left; width: 130px;"> <h2>Getting Started</h2> <h1><a href="/docs">First Steps</a></h1> <h2>Resources</h2> <a href="/docs/resources/v1/CustomCodes">CustomCodes</a><br /> <a href="/docs/resources/v1/Donations">Donations</a><br /> <a href="/docs/resources/v1/PagesCreated">PagesCreated</a><br /> <a href="/docs/resources/v1/PagesModified">PagesModified</a><br /> <a href="/docs/resources/v1/Payment">Payment</a><br /> <h2>Using the API</h2> <a href="/docs/usage">Usage</a><br /> <a href="/docs/usage#gettingAccess">Getting Access</a><br /> <a href="/docs/usage#terminology">Terminology</a><br /> <a href="/docs/usage#api-keys">API Keys</a><br /> <a href="/docs/usage#contentTypes">Content Types</a><br /> <a href="/docs/usage#httpVerbs">HTTP Verbs</a><br /> <a href="/docs/usage#statusCodes">Status Codes</a><br /> <a href="/docs/usage#errors">Errors</a><br /> <a href="/docs/usage#protectedResources">Security</a><br /> <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer">What is REST?</a><br /> <h2>API Keys</h2> <a href="https://developer.justgiving.com">API Key Portal</a><br /> </div> <div style="padding: 10px 25px 0px 0px; float: right; width: 700px;"> <div> <h1>setCustomCodesForEvent</h1> <div id="documentation-wrap"> <div class="section"> <div style="padding: 5px; height: 60px; border: 1px solid #78256D; background-color: #DCBEE0; margin-bottom: 15px;"> <div> <div> <span style="margin-right: 45px; font-weight: bolder;">Uri</span><span>/{apiKey}/v1/charity/{charityId}/events/{eventId}/customcodes</span> </div> <div style="padding-top: 5px;"> <span style="margin-right: 25px; font-weight: bolder;">Verb</span> <span>PUT </span> </div> <div style="padding-top: 5px;"> <span style="margin-right: 30px; font-weight: bolder;">Auth</span><span>Yes</span> </div> </div> </div> <div> <p> Applies one or more custom code values to a fundraising event. </p> </div> </div> <div class="section"> <h3>Url Parameters</h3> <ul> <li style="padding-bottom: 5px;"> <span class="name">eventId</span> (<span class="type">Integer (32bit)</span>) </li> </ul> </div> <div class="section"> <h3>Request Contents</h3> <div> <span style="margin-right: 10px;">View as:</span> <span style="margin-right: 10px;"><a href="#" onclick="$('.xml-example').hide(); $('.js-example').show(); return false;">Json</a></span> <span><a href="#" onclick=" $('.js-example').hide(); $('.xml-example').show(); return false;">Xml</a></span> </div> <div class="js-example"> <pre class="brush: js">{ &quot;CustomCode1&quot;: &quot;Freebie&quot;, &quot;CustomCode2&quot;: &quot;AX9234GB&quot;, &quot;CustomCode3&quot;: &quot;Janet&quot; }</pre> </div> <div class="xml-example" style="display: none;"> <pre class="brush: xml"> &lt;EventCustomCodes xmlns:i=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&gt; &lt;CustomCode1&gt;Freebie&lt;/CustomCode1&gt; &lt;CustomCode2&gt;AX9234GB&lt;/CustomCode2&gt; &lt;CustomCode3&gt;Janet&lt;/CustomCode3&gt; &lt;/EventCustomCodes&gt;</pre> </div> </div> <div class="section"> <h3>Parameters</h3> <ul> <li style="padding-bottom: 5px;"> <span class="name">CustomCode1</span> (<span class="type">String</span>) <br/><span class="description"> Value of the first custom code. Max 20 alphanumeric characters. </span><br /> </li> <li style="padding-bottom: 5px;"> <span class="name">CustomCode2</span> (<span class="type">String</span>) <br/><span class="description"> Value of the second custom code. Max 20 alphanumeric characters. </span><br /> </li> <li style="padding-bottom: 5px;"> <span class="name">CustomCode3</span> (<span class="type">String</span>) <br/><span class="description"> Value of the third custom code. Max 20 alphanumeric characters. </span><br /> </li> </ul> </div> <div class="section"> <h3>HTTP Status Codes</h3> <ul> <li>200 (OK) - The custom codes were applied</li> <li>400 (BadRequest) - The request was invalid (for instance, the value of a custom code exceeded 20 characters)</li> <li>403 (Forbidden) - The event does not belong to your charity</li> <li>404 (NotFound) - The event does not exist</li> </ul> </div> </div> </div> <div> </div> </div> <div style="clear: both;"></div> </div> </div> <script type="text/javascript"> SyntaxHighlighter.autoloader( 'js jscript javascript /content/syntaxhighlighter_3.0.83/scripts/shBrushJScript.js', 'xml /content/syntaxhighlighter_3.0.83/scripts/shBrushXml.js'); SyntaxHighlighter.all(); </script> </body> </html>