<!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>setCustomCodesForEvents</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/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 custom code values to multiple fundraising events in a single batch operation. </p> </div> </div> <div class="section"> <ul> </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;Euro&quot;, &quot;CustomCode2&quot;: &quot;Frac&quot;, &quot;CustomCode3&quot;: &quot;5U&quot;, &quot;EventId&quot;: 3243245 }, { &quot;CustomCode1&quot;: &quot;Euro&quot;, &quot;CustomCode2&quot;: &quot;Frac&quot;, &quot;CustomCode3&quot;: &quot;5U&quot;, &quot;EventId&quot;: 3243245 } ]</pre> </div> <div class="xml-example" style="display: none;"> <pre class="brush: xml"> &lt;ArrayOfEventCustomCodes xmlns:i=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&gt; &lt;EventCustomCodes&gt; &lt;CustomCode1&gt;Euro&lt;/CustomCode1&gt; &lt;CustomCode2&gt;Frac&lt;/CustomCode2&gt; &lt;CustomCode3&gt;5U&lt;/CustomCode3&gt; &lt;EventId&gt;3243245&lt;/EventId&gt; &lt;/EventCustomCodes&gt; &lt;EventCustomCodes&gt; &lt;CustomCode1&gt;Euro&lt;/CustomCode1&gt; &lt;CustomCode2&gt;Frac&lt;/CustomCode2&gt; &lt;CustomCode3&gt;5U&lt;/CustomCode3&gt; &lt;EventId&gt;3243245&lt;/EventId&gt; &lt;/EventCustomCodes&gt; &lt;/ArrayOfEventCustomCodes&gt;</pre> </div> </div> <div class="section"> <h3>Parameters</h3> <ul> <li style="padding-bottom: 5px;"> <span class="name">EventId</span> (<span class="type">Integer (32bit)</span>) <br/><span class="description"> Numeric id of the fundraising event. </span><br /> </li> <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>207 (207) - WebDAV multi-status</li> </ul> <div class="section"> <h3>Response Examples</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;href&quot;: &quot;https:\/\/dataapi.justgiving.com\/a02m92\/v1\/events\/3243245&quot;, &quot;status&quot;: 200 }, { &quot;href&quot;: &quot;https:\/\/dataapi.justgiving.com\/a02m92\/v1\/pages\/53452&quot;, &quot;status&quot;: 403 } ]</pre> </div> <div class="xml-example" style="display: none;"> <pre class="brush: xml"> &lt;multistatus xmlns=&quot;DAV:&quot; xmlns:i=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&gt; &lt;response&gt; &lt;href&gt;https://dataapi.justgiving.com/a02m92/v1/events/3243245&lt;/href&gt; &lt;status&gt;200&lt;/status&gt; &lt;/response&gt; &lt;response&gt; &lt;href&gt;https://dataapi.justgiving.com/a02m92/v1/pages/53452&lt;/href&gt; &lt;status&gt;403&lt;/status&gt; &lt;/response&gt; &lt;/multistatus&gt;</pre> </div> <ul> <li style="padding-bottom: 5px;"> <span class="name">Item.href</span> (<span class="type">String</span>) <br/><span class="description"> The location of a resource which was addressed in the request </span><br /> </li> <li style="padding-bottom: 5px;"> <span class="name">Item.status</span> (<span class="type">Integer (32bit)</span>) <br/><span class="description"> The result of the action performed on the resource </span><br /> </li> </ul> </div> </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>