Update a member
Update a single member. Only non-empty fields are set. The member password will NOT be updated.
curl --request PUT \
--url https://{domain}/api/site/members/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'User-Agent: <api-key>' \
--data '
{
"name": "John Doe",
"email": "john@doe.com",
"password": "my-password",
"groups": [
123
],
"approved": true,
"billingAddress": {
"name": "<string>",
"phone": "<string>",
"companyName": "<string>",
"companyId": "<string>",
"country": "<string>",
"state": "<string>",
"city": "<string>",
"zipCode": "<string>",
"address": "<string>",
"address2": "<string>"
},
"shippingAddress": {
"name": "<string>",
"phone": "<string>",
"companyName": "<string>",
"companyId": "<string>",
"country": "<string>",
"state": "<string>",
"city": "<string>",
"zipCode": "<string>",
"address": "<string>",
"address2": "<string>"
}
}
'import requests
url = "https://{domain}/api/site/members/{id}"
payload = {
"name": "John Doe",
"email": "john@doe.com",
"password": "my-password",
"groups": [123],
"approved": True,
"billingAddress": {
"name": "<string>",
"phone": "<string>",
"companyName": "<string>",
"companyId": "<string>",
"country": "<string>",
"state": "<string>",
"city": "<string>",
"zipCode": "<string>",
"address": "<string>",
"address2": "<string>"
},
"shippingAddress": {
"name": "<string>",
"phone": "<string>",
"companyName": "<string>",
"companyId": "<string>",
"country": "<string>",
"state": "<string>",
"city": "<string>",
"zipCode": "<string>",
"address": "<string>",
"address2": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"User-Agent": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
Authorization: 'Bearer <token>',
'User-Agent': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'John Doe',
email: 'john@doe.com',
password: 'my-password',
groups: [123],
approved: true,
billingAddress: {
name: '<string>',
phone: '<string>',
companyName: '<string>',
companyId: '<string>',
country: '<string>',
state: '<string>',
city: '<string>',
zipCode: '<string>',
address: '<string>',
address2: '<string>'
},
shippingAddress: {
name: '<string>',
phone: '<string>',
companyName: '<string>',
companyId: '<string>',
country: '<string>',
state: '<string>',
city: '<string>',
zipCode: '<string>',
address: '<string>',
address2: '<string>'
}
})
};
fetch('https://{domain}/api/site/members/{id}', 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://{domain}/api/site/members/{id}",
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([
'name' => 'John Doe',
'email' => 'john@doe.com',
'password' => 'my-password',
'groups' => [
123
],
'approved' => true,
'billingAddress' => [
'name' => '<string>',
'phone' => '<string>',
'companyName' => '<string>',
'companyId' => '<string>',
'country' => '<string>',
'state' => '<string>',
'city' => '<string>',
'zipCode' => '<string>',
'address' => '<string>',
'address2' => '<string>'
],
'shippingAddress' => [
'name' => '<string>',
'phone' => '<string>',
'companyName' => '<string>',
'companyId' => '<string>',
'country' => '<string>',
'state' => '<string>',
'city' => '<string>',
'zipCode' => '<string>',
'address' => '<string>',
'address2' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"User-Agent: <api-key>"
],
]);
$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://{domain}/api/site/members/{id}"
payload := strings.NewReader("{\n \"name\": \"John Doe\",\n \"email\": \"john@doe.com\",\n \"password\": \"my-password\",\n \"groups\": [\n 123\n ],\n \"approved\": true,\n \"billingAddress\": {\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"companyName\": \"<string>\",\n \"companyId\": \"<string>\",\n \"country\": \"<string>\",\n \"state\": \"<string>\",\n \"city\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"address\": \"<string>\",\n \"address2\": \"<string>\"\n },\n \"shippingAddress\": {\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"companyName\": \"<string>\",\n \"companyId\": \"<string>\",\n \"country\": \"<string>\",\n \"state\": \"<string>\",\n \"city\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"address\": \"<string>\",\n \"address2\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("User-Agent", "<api-key>")
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://{domain}/api/site/members/{id}")
.header("Authorization", "Bearer <token>")
.header("User-Agent", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"John Doe\",\n \"email\": \"john@doe.com\",\n \"password\": \"my-password\",\n \"groups\": [\n 123\n ],\n \"approved\": true,\n \"billingAddress\": {\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"companyName\": \"<string>\",\n \"companyId\": \"<string>\",\n \"country\": \"<string>\",\n \"state\": \"<string>\",\n \"city\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"address\": \"<string>\",\n \"address2\": \"<string>\"\n },\n \"shippingAddress\": {\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"companyName\": \"<string>\",\n \"companyId\": \"<string>\",\n \"country\": \"<string>\",\n \"state\": \"<string>\",\n \"city\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"address\": \"<string>\",\n \"address2\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/api/site/members/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["User-Agent"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"John Doe\",\n \"email\": \"john@doe.com\",\n \"password\": \"my-password\",\n \"groups\": [\n 123\n ],\n \"approved\": true,\n \"billingAddress\": {\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"companyName\": \"<string>\",\n \"companyId\": \"<string>\",\n \"country\": \"<string>\",\n \"state\": \"<string>\",\n \"city\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"address\": \"<string>\",\n \"address2\": \"<string>\"\n },\n \"shippingAddress\": {\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"companyName\": \"<string>\",\n \"companyId\": \"<string>\",\n \"country\": \"<string>\",\n \"state\": \"<string>\",\n \"city\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"address\": \"<string>\",\n \"address2\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "John Doe",
"email": "john@doe.com",
"groups": [
59,
98
],
"registeredOn": 1587489771,
"approved": true,
"contactId": 147,
"billingAddress": {
"name": "<string>",
"phone": "<string>",
"companyName": "<string>",
"companyId": "<string>",
"country": "<string>",
"state": "<string>",
"city": "<string>",
"zipCode": "<string>",
"address": "<string>",
"address2": "<string>"
},
"shippingAddress": {
"name": "<string>",
"phone": "<string>",
"companyName": "<string>",
"companyId": "<string>",
"country": "<string>",
"state": "<string>",
"city": "<string>",
"zipCode": "<string>",
"address": "<string>",
"address2": "<string>"
}
}{
"success": false,
"message": "Resource not found"
}Authorizations
Pass your API key as: Authorization: Bearer <API KEY>.
Client identifier sent with requests from the documentation playground.
Path Parameters
The id of the member.
111
Body
"John Doe"
"john@doe.com"
Optional. If omitted, a random password is set and a reset email is sent. Ignored on update.
"my-password"
A billing or shipping address.
Show child attributes
Show child attributes
A billing or shipping address.
Show child attributes
Show child attributes
Response
The updated member.
Unique identifier.
123
Member name.
"John Doe"
Email of the member.
"john@doe.com"
Member group id(s) to which the member belongs.
[59, 98]
Timestamp in Unix seconds since epoch.
1587489771
Member approval status.
Contact ID of the member.
147
A billing or shipping address.
Show child attributes
Show child attributes
A billing or shipping address.
Show child attributes
Show child attributes
Was this page helpful?
curl --request PUT \
--url https://{domain}/api/site/members/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'User-Agent: <api-key>' \
--data '
{
"name": "John Doe",
"email": "john@doe.com",
"password": "my-password",
"groups": [
123
],
"approved": true,
"billingAddress": {
"name": "<string>",
"phone": "<string>",
"companyName": "<string>",
"companyId": "<string>",
"country": "<string>",
"state": "<string>",
"city": "<string>",
"zipCode": "<string>",
"address": "<string>",
"address2": "<string>"
},
"shippingAddress": {
"name": "<string>",
"phone": "<string>",
"companyName": "<string>",
"companyId": "<string>",
"country": "<string>",
"state": "<string>",
"city": "<string>",
"zipCode": "<string>",
"address": "<string>",
"address2": "<string>"
}
}
'import requests
url = "https://{domain}/api/site/members/{id}"
payload = {
"name": "John Doe",
"email": "john@doe.com",
"password": "my-password",
"groups": [123],
"approved": True,
"billingAddress": {
"name": "<string>",
"phone": "<string>",
"companyName": "<string>",
"companyId": "<string>",
"country": "<string>",
"state": "<string>",
"city": "<string>",
"zipCode": "<string>",
"address": "<string>",
"address2": "<string>"
},
"shippingAddress": {
"name": "<string>",
"phone": "<string>",
"companyName": "<string>",
"companyId": "<string>",
"country": "<string>",
"state": "<string>",
"city": "<string>",
"zipCode": "<string>",
"address": "<string>",
"address2": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"User-Agent": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
Authorization: 'Bearer <token>',
'User-Agent': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'John Doe',
email: 'john@doe.com',
password: 'my-password',
groups: [123],
approved: true,
billingAddress: {
name: '<string>',
phone: '<string>',
companyName: '<string>',
companyId: '<string>',
country: '<string>',
state: '<string>',
city: '<string>',
zipCode: '<string>',
address: '<string>',
address2: '<string>'
},
shippingAddress: {
name: '<string>',
phone: '<string>',
companyName: '<string>',
companyId: '<string>',
country: '<string>',
state: '<string>',
city: '<string>',
zipCode: '<string>',
address: '<string>',
address2: '<string>'
}
})
};
fetch('https://{domain}/api/site/members/{id}', 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://{domain}/api/site/members/{id}",
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([
'name' => 'John Doe',
'email' => 'john@doe.com',
'password' => 'my-password',
'groups' => [
123
],
'approved' => true,
'billingAddress' => [
'name' => '<string>',
'phone' => '<string>',
'companyName' => '<string>',
'companyId' => '<string>',
'country' => '<string>',
'state' => '<string>',
'city' => '<string>',
'zipCode' => '<string>',
'address' => '<string>',
'address2' => '<string>'
],
'shippingAddress' => [
'name' => '<string>',
'phone' => '<string>',
'companyName' => '<string>',
'companyId' => '<string>',
'country' => '<string>',
'state' => '<string>',
'city' => '<string>',
'zipCode' => '<string>',
'address' => '<string>',
'address2' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"User-Agent: <api-key>"
],
]);
$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://{domain}/api/site/members/{id}"
payload := strings.NewReader("{\n \"name\": \"John Doe\",\n \"email\": \"john@doe.com\",\n \"password\": \"my-password\",\n \"groups\": [\n 123\n ],\n \"approved\": true,\n \"billingAddress\": {\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"companyName\": \"<string>\",\n \"companyId\": \"<string>\",\n \"country\": \"<string>\",\n \"state\": \"<string>\",\n \"city\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"address\": \"<string>\",\n \"address2\": \"<string>\"\n },\n \"shippingAddress\": {\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"companyName\": \"<string>\",\n \"companyId\": \"<string>\",\n \"country\": \"<string>\",\n \"state\": \"<string>\",\n \"city\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"address\": \"<string>\",\n \"address2\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("User-Agent", "<api-key>")
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://{domain}/api/site/members/{id}")
.header("Authorization", "Bearer <token>")
.header("User-Agent", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"John Doe\",\n \"email\": \"john@doe.com\",\n \"password\": \"my-password\",\n \"groups\": [\n 123\n ],\n \"approved\": true,\n \"billingAddress\": {\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"companyName\": \"<string>\",\n \"companyId\": \"<string>\",\n \"country\": \"<string>\",\n \"state\": \"<string>\",\n \"city\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"address\": \"<string>\",\n \"address2\": \"<string>\"\n },\n \"shippingAddress\": {\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"companyName\": \"<string>\",\n \"companyId\": \"<string>\",\n \"country\": \"<string>\",\n \"state\": \"<string>\",\n \"city\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"address\": \"<string>\",\n \"address2\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/api/site/members/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["User-Agent"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"John Doe\",\n \"email\": \"john@doe.com\",\n \"password\": \"my-password\",\n \"groups\": [\n 123\n ],\n \"approved\": true,\n \"billingAddress\": {\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"companyName\": \"<string>\",\n \"companyId\": \"<string>\",\n \"country\": \"<string>\",\n \"state\": \"<string>\",\n \"city\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"address\": \"<string>\",\n \"address2\": \"<string>\"\n },\n \"shippingAddress\": {\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"companyName\": \"<string>\",\n \"companyId\": \"<string>\",\n \"country\": \"<string>\",\n \"state\": \"<string>\",\n \"city\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"address\": \"<string>\",\n \"address2\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "John Doe",
"email": "john@doe.com",
"groups": [
59,
98
],
"registeredOn": 1587489771,
"approved": true,
"contactId": 147,
"billingAddress": {
"name": "<string>",
"phone": "<string>",
"companyName": "<string>",
"companyId": "<string>",
"country": "<string>",
"state": "<string>",
"city": "<string>",
"zipCode": "<string>",
"address": "<string>",
"address2": "<string>"
},
"shippingAddress": {
"name": "<string>",
"phone": "<string>",
"companyName": "<string>",
"companyId": "<string>",
"country": "<string>",
"state": "<string>",
"city": "<string>",
"zipCode": "<string>",
"address": "<string>",
"address2": "<string>"
}
}{
"success": false,
"message": "Resource not found"
}
