curl --request PUT \
--url https://{base_url_domain}/api/global/v1/system/users/{type}/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "OrganizationUser",
"name": "Bernard Greensmith",
"email": "admin@example.com",
"username": "b.greensmith",
"is_active": true,
"roles": [
{
"id": 3
}
],
"login_via_badge": true,
"default_warehouse": {
"type": "Warehouse",
"id": 123
}
}
'import requests
url = "https://{base_url_domain}/api/global/v1/system/users/{type}/{id}"
payload = {
"type": "OrganizationUser",
"name": "Bernard Greensmith",
"email": "admin@example.com",
"username": "b.greensmith",
"is_active": True,
"roles": [{ "id": 3 }],
"login_via_badge": True,
"default_warehouse": {
"type": "Warehouse",
"id": 123
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'OrganizationUser',
name: 'Bernard Greensmith',
email: 'admin@example.com',
username: 'b.greensmith',
is_active: true,
roles: [{id: 3}],
login_via_badge: true,
default_warehouse: {type: 'Warehouse', id: 123}
})
};
fetch('https://{base_url_domain}/api/global/v1/system/users/{type}/{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://{base_url_domain}/api/global/v1/system/users/{type}/{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([
'type' => 'OrganizationUser',
'name' => 'Bernard Greensmith',
'email' => 'admin@example.com',
'username' => 'b.greensmith',
'is_active' => true,
'roles' => [
[
'id' => 3
]
],
'login_via_badge' => true,
'default_warehouse' => [
'type' => 'Warehouse',
'id' => 123
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://{base_url_domain}/api/global/v1/system/users/{type}/{id}"
payload := strings.NewReader("{\n \"type\": \"OrganizationUser\",\n \"name\": \"Bernard Greensmith\",\n \"email\": \"admin@example.com\",\n \"username\": \"b.greensmith\",\n \"is_active\": true,\n \"roles\": [\n {\n \"id\": 3\n }\n ],\n \"login_via_badge\": true,\n \"default_warehouse\": {\n \"type\": \"Warehouse\",\n \"id\": 123\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://{base_url_domain}/api/global/v1/system/users/{type}/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"OrganizationUser\",\n \"name\": \"Bernard Greensmith\",\n \"email\": \"admin@example.com\",\n \"username\": \"b.greensmith\",\n \"is_active\": true,\n \"roles\": [\n {\n \"id\": 3\n }\n ],\n \"login_via_badge\": true,\n \"default_warehouse\": {\n \"type\": \"Warehouse\",\n \"id\": 123\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{base_url_domain}/api/global/v1/system/users/{type}/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"OrganizationUser\",\n \"name\": \"Bernard Greensmith\",\n \"email\": \"admin@example.com\",\n \"username\": \"b.greensmith\",\n \"is_active\": true,\n \"roles\": [\n {\n \"id\": 3\n }\n ],\n \"login_via_badge\": true,\n \"default_warehouse\": {\n \"type\": \"Warehouse\",\n \"id\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"errors": [
{
"type": "parameters",
"message": "The supplied parameters are invalid.",
"details": [
{
"key": "hold_until_date",
"message": "The date must be in the future."
}
]
}
]
}{
"errors": [
{
"type": "not_found",
"message": "The server could not find the requested resource."
}
]
}{
"errors": [
{
"type": "unable_to_process",
"message": "The supplied parameters are invalid.",
"details": [
{
"key": "hold_until_date",
"message": "The date must be in the future."
}
]
}
]
}Update one User
Updates an existing User specified by its type and id path parameters and according to the request body.
curl --request PUT \
--url https://{base_url_domain}/api/global/v1/system/users/{type}/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "OrganizationUser",
"name": "Bernard Greensmith",
"email": "admin@example.com",
"username": "b.greensmith",
"is_active": true,
"roles": [
{
"id": 3
}
],
"login_via_badge": true,
"default_warehouse": {
"type": "Warehouse",
"id": 123
}
}
'import requests
url = "https://{base_url_domain}/api/global/v1/system/users/{type}/{id}"
payload = {
"type": "OrganizationUser",
"name": "Bernard Greensmith",
"email": "admin@example.com",
"username": "b.greensmith",
"is_active": True,
"roles": [{ "id": 3 }],
"login_via_badge": True,
"default_warehouse": {
"type": "Warehouse",
"id": 123
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'OrganizationUser',
name: 'Bernard Greensmith',
email: 'admin@example.com',
username: 'b.greensmith',
is_active: true,
roles: [{id: 3}],
login_via_badge: true,
default_warehouse: {type: 'Warehouse', id: 123}
})
};
fetch('https://{base_url_domain}/api/global/v1/system/users/{type}/{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://{base_url_domain}/api/global/v1/system/users/{type}/{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([
'type' => 'OrganizationUser',
'name' => 'Bernard Greensmith',
'email' => 'admin@example.com',
'username' => 'b.greensmith',
'is_active' => true,
'roles' => [
[
'id' => 3
]
],
'login_via_badge' => true,
'default_warehouse' => [
'type' => 'Warehouse',
'id' => 123
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://{base_url_domain}/api/global/v1/system/users/{type}/{id}"
payload := strings.NewReader("{\n \"type\": \"OrganizationUser\",\n \"name\": \"Bernard Greensmith\",\n \"email\": \"admin@example.com\",\n \"username\": \"b.greensmith\",\n \"is_active\": true,\n \"roles\": [\n {\n \"id\": 3\n }\n ],\n \"login_via_badge\": true,\n \"default_warehouse\": {\n \"type\": \"Warehouse\",\n \"id\": 123\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://{base_url_domain}/api/global/v1/system/users/{type}/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"OrganizationUser\",\n \"name\": \"Bernard Greensmith\",\n \"email\": \"admin@example.com\",\n \"username\": \"b.greensmith\",\n \"is_active\": true,\n \"roles\": [\n {\n \"id\": 3\n }\n ],\n \"login_via_badge\": true,\n \"default_warehouse\": {\n \"type\": \"Warehouse\",\n \"id\": 123\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{base_url_domain}/api/global/v1/system/users/{type}/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"OrganizationUser\",\n \"name\": \"Bernard Greensmith\",\n \"email\": \"admin@example.com\",\n \"username\": \"b.greensmith\",\n \"is_active\": true,\n \"roles\": [\n {\n \"id\": 3\n }\n ],\n \"login_via_badge\": true,\n \"default_warehouse\": {\n \"type\": \"Warehouse\",\n \"id\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"errors": [
{
"type": "parameters",
"message": "The supplied parameters are invalid.",
"details": [
{
"key": "hold_until_date",
"message": "The date must be in the future."
}
]
}
]
}{
"errors": [
{
"type": "not_found",
"message": "The server could not find the requested resource."
}
]
}{
"errors": [
{
"type": "unable_to_process",
"message": "The supplied parameters are invalid.",
"details": [
{
"key": "hold_until_date",
"message": "The date must be in the future."
}
]
}
]
}Authorizations
Generate a JWT access token through a Custom Global Integration and provide it with each request in the Authorization header prefixed with "Bearer" and then a single space.
Path Parameters
Specify the user type to which your operations will be restricted.
any, organization, client The id of the referenced User.
x >= 1Body
An object conforming to the User schema to be merged with the existing User.
- OrganizationUser
- ClientUser
A user with organization-wide access.
This property describes the type of object in the response body.
OrganizationUser The full name of the user.
65"Bernard Greensmith"
The user's email address.
128"admin@example.com"
User name for login.
40"b.greensmith"
Only active users may log in.
true
A list of user roles allowed for this user.
Optional Field
Show child attributes
Show child attributes
This flag must be true to allow login with badge capability.
Optional Field
true
The last Warehouse that was active for the user.
Optional Field
Show child attributes
Show child attributes
Response
OK - The operation completed successfully and there is no response body.
Was this page helpful?