<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.offerit.com/index.php?action=history&amp;feed=atom&amp;title=Offerit_REST_API_Unlock_Customer</id>
		<title>Offerit REST API Unlock Customer - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.offerit.com/index.php?action=history&amp;feed=atom&amp;title=Offerit_REST_API_Unlock_Customer"/>
		<link rel="alternate" type="text/html" href="https://wiki.offerit.com/index.php?title=Offerit_REST_API_Unlock_Customer&amp;action=history"/>
		<updated>2026-04-30T00:01:48Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.27.5</generator>

	<entry>
		<id>https://wiki.offerit.com/index.php?title=Offerit_REST_API_Unlock_Customer&amp;diff=3924&amp;oldid=prev</id>
		<title>OfferitDave: Created page with &quot;{{Offerit Manual | show_rest_api_section = true }} == '''PATCH /customer/unlock''' == '''Description'''  *The  api/customer/unlock action is a feature in Offerit that allows y...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.offerit.com/index.php?title=Offerit_REST_API_Unlock_Customer&amp;diff=3924&amp;oldid=prev"/>
				<updated>2018-08-31T18:45:26Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Offerit Manual | show_rest_api_section = true }} == &amp;#039;&amp;#039;&amp;#039;PATCH /customer/unlock&amp;#039;&amp;#039;&amp;#039; == &amp;#039;&amp;#039;&amp;#039;Description&amp;#039;&amp;#039;&amp;#039;  *The  api/customer/unlock action is a feature in Offerit that allows y...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Offerit Manual&lt;br /&gt;
| show_rest_api_section = true&lt;br /&gt;
}}&lt;br /&gt;
== '''PATCH /customer/unlock''' ==&lt;br /&gt;
'''Description''' &lt;br /&gt;
*The  api/customer/unlock action is a feature in Offerit that allows you to unlock a locked  customer so it can be edited by Offerit&lt;br /&gt;
&lt;br /&gt;
'''Resource URL'''&lt;br /&gt;
*&amp;lt;nowiki&amp;gt;http://domain/api/customer/unlock&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*Replace domain with the offerit domain&lt;br /&gt;
&lt;br /&gt;
'''[[Offerit_REST_API_Overview#Allowed_HTTP_Request_Methods|Request Method''']]&lt;br /&gt;
*PATCH&lt;br /&gt;
&lt;br /&gt;
'''Response Format'''&lt;br /&gt;
*JSON&lt;br /&gt;
&lt;br /&gt;
'''[[Offerit_REST_API_Overview#Authentication|Authentication]]'''&lt;br /&gt;
*HTTP headers&lt;br /&gt;
&lt;br /&gt;
== '''Parameters''' ==&lt;br /&gt;
'''Paremeters must be sent with the request body. The examples below show the parameters sent as x-www-form-urlencoded'''&lt;br /&gt;
&lt;br /&gt;
'''You need to pass either customer_id or subscription_id or orderid for customer lookup otherwise the call will fail'''&lt;br /&gt;
&lt;br /&gt;
*customer_id is used to pass in the customer_id of the customer to modify&lt;br /&gt;
**'''''type: string'''''&lt;br /&gt;
**'''optional'''&lt;br /&gt;
*subscription_id is used to pass in the subscription of the customer to modify&lt;br /&gt;
**'''''type: string'''''&lt;br /&gt;
**'''optional'''&lt;br /&gt;
*orderid is used to pass in the event id of one of the transactions associated with the customer to modify&lt;br /&gt;
**'''''type: string'''''&lt;br /&gt;
**'''optional'''&lt;br /&gt;
&lt;br /&gt;
== '''Example Request''' ==&lt;br /&gt;
&lt;br /&gt;
'''PATCH'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;http://domain/api/customer/unlock&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Response: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Example Code''' ==&lt;br /&gt;
&lt;br /&gt;
'''PHP'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
$curl = curl_init();&lt;br /&gt;
&lt;br /&gt;
$data = array(&lt;br /&gt;
    'customer_id' =&amp;gt; 191,&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
$url = 'http://domain/api/customer/unlock';&lt;br /&gt;
&lt;br /&gt;
$headers = array(&lt;br /&gt;
    'api-key: 44b5498dbcb481a0d00b404c0169af62',&lt;br /&gt;
    'api-username: offerit_admin'&lt;br /&gt;
);&lt;br /&gt;
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, &amp;quot;PATCH&amp;quot;);&lt;br /&gt;
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);&lt;br /&gt;
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);&lt;br /&gt;
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));&lt;br /&gt;
curl_setopt($curl, CURLOPT_URL, $url);&lt;br /&gt;
&lt;br /&gt;
$resp = curl_exec($curl);&lt;br /&gt;
//dumps an associative array representation of the json&lt;br /&gt;
var_dump(json_decode($resp, true));&lt;br /&gt;
// Close request to clear up some resources&lt;br /&gt;
curl_close($curl);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Python'''&lt;br /&gt;
*This example requires pip and the request library which can be installed via pip by: 'pip install requests'&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import requests&lt;br /&gt;
import json&lt;br /&gt;
&lt;br /&gt;
url = 'http://domain/api/customer/unlock'&lt;br /&gt;
&lt;br /&gt;
payload = {&lt;br /&gt;
    'customer_id': 191,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
headers = {&lt;br /&gt;
        'api-key': '44b5498dbcb481a0d00b404c0169af62',&lt;br /&gt;
        'api-username': 'offerit_admin'&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
res = requests.patch(url, data=payload, headers=headers)&lt;br /&gt;
print res.json()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''node.js'''&lt;br /&gt;
*This example requires npm and the request module which can be installed via npm by: 'npm install request'&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var request = require('request');&lt;br /&gt;
&lt;br /&gt;
data = {&lt;br /&gt;
    'customer_id': 191,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
var options = {&lt;br /&gt;
    url: 'http://domain/api/customer/unlock',&lt;br /&gt;
    method: 'PATCH',&lt;br /&gt;
    form: data,&lt;br /&gt;
    json: true,&lt;br /&gt;
    headers: {&lt;br /&gt;
        'api-key': '44b5498dbcb481a0d00b404c0169af62',&lt;br /&gt;
        'api-username': 'offerit_admin'&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
function callback(error, response, body) {&lt;br /&gt;
    if (!error &amp;amp;&amp;amp; response.statusCode == 200) {&lt;br /&gt;
        console.log(body);&lt;br /&gt;
    }&lt;br /&gt;
    else{&lt;br /&gt;
        console.log(body);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
request(options, callback);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Curl'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
curl -X PATCH 'http://domain/api/customer/unlock' -H &amp;quot;api-key: 44b5498dbcb481a0d00b404c0169af62&amp;quot; -H &amp;quot;api-username: offerit_admin&amp;quot; -H &amp;quot;Content-Type: application/x-www-form-urlencoded&amp;quot; -d 'customer_id=191'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Offerit API Articles]]&lt;/div&gt;</summary>
		<author><name>OfferitDave</name></author>	</entry>

	</feed>