Skip to main content
PUT
/
user
/
update
Update User
curl --request PUT \
  --url https://apigw.bienport.com/api/user/update \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --header 'OrganizationId: <organizationid>' \
  --data '
{
  "birthdayDay": 1,
  "birthdayMonth": 1,
  "birthdayYear": 1970,
  "emailAddress": "example@example.com",
  "firstName": "Mustafa",
  "languageId": "tr_TR",
  "lastName": "Atatürk",
  "male": true,
  "middleName": "Kemal",
  "nationalId": 11111111111,
  "newPassword1": "123qweasdzx",
  "newPassword2": "123qweasdzx",
  "oldPassword": "123qweasdzx",
  "roleIds": [
    20167
  ],
  "screenName": "90xxxxxxxxxx",
  "userId": 12343123
}
'
import requests

url = "https://apigw.bienport.com/api/user/update"

payload = {
"birthdayDay": 1,
"birthdayMonth": 1,
"birthdayYear": 1970,
"emailAddress": "example@example.com",
"firstName": "Mustafa",
"languageId": "tr_TR",
"lastName": "Atatürk",
"male": True,
"middleName": "Kemal",
"nationalId": 11111111111,
"newPassword1": "123qweasdzx",
"newPassword2": "123qweasdzx",
"oldPassword": "123qweasdzx",
"roleIds": [20167],
"screenName": "90xxxxxxxxxx",
"userId": 12343123
}
headers = {
"Authorization": "<authorization>",
"OrganizationId": "<organizationid>",
"Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PUT',
headers: {
Authorization: '<authorization>',
OrganizationId: '<organizationid>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
birthdayDay: 1,
birthdayMonth: 1,
birthdayYear: 1970,
emailAddress: 'example@example.com',
firstName: 'Mustafa',
languageId: 'tr_TR',
lastName: 'Atatürk',
male: true,
middleName: 'Kemal',
nationalId: 11111111111,
newPassword1: '123qweasdzx',
newPassword2: '123qweasdzx',
oldPassword: '123qweasdzx',
roleIds: [20167],
screenName: '90xxxxxxxxxx',
userId: 12343123
})
};

fetch('https://apigw.bienport.com/api/user/update', 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://apigw.bienport.com/api/user/update",
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([
'birthdayDay' => 1,
'birthdayMonth' => 1,
'birthdayYear' => 1970,
'emailAddress' => 'example@example.com',
'firstName' => 'Mustafa',
'languageId' => 'tr_TR',
'lastName' => 'Atatürk',
'male' => true,
'middleName' => 'Kemal',
'nationalId' => 11111111111,
'newPassword1' => '123qweasdzx',
'newPassword2' => '123qweasdzx',
'oldPassword' => '123qweasdzx',
'roleIds' => [
20167
],
'screenName' => '90xxxxxxxxxx',
'userId' => 12343123
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json",
"OrganizationId: <organizationid>"
],
]);

$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://apigw.bienport.com/api/user/update"

payload := strings.NewReader("{\n \"birthdayDay\": 1,\n \"birthdayMonth\": 1,\n \"birthdayYear\": 1970,\n \"emailAddress\": \"example@example.com\",\n \"firstName\": \"Mustafa\",\n \"languageId\": \"tr_TR\",\n \"lastName\": \"Atatürk\",\n \"male\": true,\n \"middleName\": \"Kemal\",\n \"nationalId\": 11111111111,\n \"newPassword1\": \"123qweasdzx\",\n \"newPassword2\": \"123qweasdzx\",\n \"oldPassword\": \"123qweasdzx\",\n \"roleIds\": [\n 20167\n ],\n \"screenName\": \"90xxxxxxxxxx\",\n \"userId\": 12343123\n}")

req, _ := http.NewRequest("PUT", url, payload)

req.Header.Add("Authorization", "<authorization>")
req.Header.Add("OrganizationId", "<organizationid>")
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://apigw.bienport.com/api/user/update")
.header("Authorization", "<authorization>")
.header("OrganizationId", "<organizationid>")
.header("Content-Type", "application/json")
.body("{\n \"birthdayDay\": 1,\n \"birthdayMonth\": 1,\n \"birthdayYear\": 1970,\n \"emailAddress\": \"example@example.com\",\n \"firstName\": \"Mustafa\",\n \"languageId\": \"tr_TR\",\n \"lastName\": \"Atatürk\",\n \"male\": true,\n \"middleName\": \"Kemal\",\n \"nationalId\": 11111111111,\n \"newPassword1\": \"123qweasdzx\",\n \"newPassword2\": \"123qweasdzx\",\n \"oldPassword\": \"123qweasdzx\",\n \"roleIds\": [\n 20167\n ],\n \"screenName\": \"90xxxxxxxxxx\",\n \"userId\": 12343123\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://apigw.bienport.com/api/user/update")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = '<authorization>'
request["OrganizationId"] = '<organizationid>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"birthdayDay\": 1,\n \"birthdayMonth\": 1,\n \"birthdayYear\": 1970,\n \"emailAddress\": \"example@example.com\",\n \"firstName\": \"Mustafa\",\n \"languageId\": \"tr_TR\",\n \"lastName\": \"Atatürk\",\n \"male\": true,\n \"middleName\": \"Kemal\",\n \"nationalId\": 11111111111,\n \"newPassword1\": \"123qweasdzx\",\n \"newPassword2\": \"123qweasdzx\",\n \"oldPassword\": \"123qweasdzx\",\n \"roleIds\": [\n 20167\n ],\n \"screenName\": \"90xxxxxxxxxx\",\n \"userId\": 12343123\n}"

response = http.request(request)
puts response.read_body
{
  "userId": 123,
  "firstName": "<string>",
  "middleName": "<string>",
  "lastName": "<string>",
  "screenName": "<string>",
  "nationalId": 123,
  "organizations": [
    {
      "name": "<string>",
      "id": 123
    }
  ],
  "organizationIds": [
    123
  ],
  "lockout": true,
  "graceLoginCount": 123,
  "emailAddress": "<string>",
  "modifiedDate": 123,
  "createDate": 123,
  "languageId": "<string>",
  "timeZoneId": "<string>",
  "failedLoginAttempts": 123,
  "roles": [
    {
      "roleId": 123,
      "roleName": "<string>",
      "type": 123,
      "inherited": true,
      "typePK": 123,
      "typeName": "<string>"
    }
  ],
  "resources": [
    {
      "resourceId": 123,
      "networkId": "<string>",
      "resourceName": "<string>",
      "enabled": true,
      "modelName": "<string>",
      "brandName": "<string>",
      "treePath": "<string>",
      "orgId": 123,
      "resourceSensors": [
        {
          "type": "<string>",
          "sensors": [
            {
              "id": 123,
              "resourceId": 123,
              "orderNo": 123,
              "trueValue": "<string>",
              "falseValue": "<string>",
              "partitions": [
                {
                  "name": "<string>",
                  "no": 123
                }
              ],
              "sensorId": 123,
              "description": "<string>",
              "hardwareSerialNumber": "<string>",
              "sensorName": "<string>"
            }
          ]
        }
      ],
      "resourceControllers": [
        {
          "hardwareSerialNumber": "<string>",
          "id": 123,
          "resourceId": 123,
          "orderNo": 123,
          "trueValue": "<string>",
          "falseValue": "<string>",
          "description": "<string>",
          "controllerName": "<string>",
          "controllerId": 123,
          "partitions": [
            {
              "name": "<string>",
              "no": 123
            }
          ]
        }
      ],
      "resourceSubscriptionId": 123,
      "subscriptionDocumentNo": "<string>",
      "deviceSubType": "<string>"
    }
  ]
}
This response has no body data.
{
"statusCode": 123,
"error": "***Exception",
"message": "Message about the error",
"path": "/api/example/path"
}
{
"statusCode": 123,
"error": "***Exception",
"message": "Message about the error",
"path": "/api/example/path"
}
This response has no body data.
{
"statusCode": 123,
"error": "***Exception",
"message": "Message about the error",
"path": "/api/example/path"
}
{
"statusCode": 123,
"error": "***Exception",
"message": "Message about the error",
"path": "/api/example/path"
}

Headers

Authorization
string
required

Access Token

OrganizationId
string
required

Organization ID

Body

application/json

updateMobileUserRequest

User Update Request Model

birthdayDay
integer<int32>

Birthday Day(Optional)

Example:

1

birthdayMonth
integer<int32>

Birthday Month(Optional)

Example:

1

birthdayYear
integer<int32>

Birthday Year(Optional)

Example:

1970

emailAddress
string

Email Address(Optional)

Example:

"example@example.com"

firstName
string

First Name

Example:

"Mustafa"

languageId
string

Locale

Example:

"tr_TR"

lastName
string

Last Name(Optional)

Example:

"Atatürk"

male
boolean

Gender(Optional)

Example:

true

middleName
string

Middle Name(Optional)

Example:

"Kemal"

nationalId
integer<int64>

User national ID

Example:

11111111111

newPassword1
string

New Password (If you want to change password its required)

Example:

"123qweasdzx"

newPassword2
string

Repeat New Password (If you want to change password its required)

Example:

"123qweasdzx"

oldPassword
string

Old Password (If you want to change password its required)

Example:

"123qweasdzx"

roleIds
integer<int64>[]

Role Ids(Optional)

Example:
[20167]
screenName
string

Screen Name

Example:

"90xxxxxxxxxx"

userId
integer<int64>

User Id

Example:

12343123

Response

Updated User.

Update User response model

userId
integer<int64>
firstName
string
middleName
string
lastName
string
screenName
string
nationalId
integer<int64>
organizations
Organization · object[]
organizationIds
integer<int64>[]
lockout
boolean
graceLoginCount
integer<int32>
emailAddress
string
modifiedDate
integer<int64>
createDate
integer<int64>
languageId
string
timeZoneId
string
failedLoginAttempts
integer<int32>
roles
RoleResponse · object[]
resources
GetResourceResponse · object[]