Zaktualizuj użytkownika
PUT
/api/v3/Users/{userId}
const url = 'https://twoja-instancja-smerp-api.enterprise.sellrocket.pl/api/v3/Users/1';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"fullName":"example","username":"example","email":"example","newUserPassword":"example","roles":["example"],"timeZoneId":"example","loginMethod":1,"defaultPrinter":{"printerConnectionId":1,"printerId":1},"allowedPrinters":[{"printerConnectionId":1,"printerId":1}],"defaultPrinters":[{"printerConnectionId":1,"printerId":1}],"packStationId":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://twoja-instancja-smerp-api.enterprise.sellrocket.pl/api/v3/Users/1 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "fullName": "example", "username": "example", "email": "example", "newUserPassword": "example", "roles": [ "example" ], "timeZoneId": "example", "loginMethod": 1, "defaultPrinter": { "printerConnectionId": 1, "printerId": 1 }, "allowedPrinters": [ { "printerConnectionId": 1, "printerId": 1 } ], "defaultPrinters": [ { "printerConnectionId": 1, "printerId": 1 } ], "packStationId": 1 }'Wymaga roli administratora.
User can only call this endpoint when he has role ADMINISTRATOR
Autoryzacja
Dział zatytułowany „Autoryzacja”Parametry
Dział zatytułowany „Parametry”Parametry ścieżki
Dział zatytułowany „Parametry ścieżki”userId
wymagane
integer format: int64
Id of the user whose details should be changed
Treść żądania
Dział zatytułowany „Treść żądania”Details regarding updated to user account.
RequesterPasswordConfirmation is the password of user that edits the profile.
null value in properties means, they should not be changed
object
fullName
string
username
string
email
string
newUserPassword
string
roles
Array<string>
timeZoneId
string
loginMethod
integer format: int32
defaultPrinter
object
printerConnectionId
wymagane
integer format: int64
printerId
wymagane
integer format: int64
allowedPrinters
Array<object>
object
printerConnectionId
wymagane
integer format: int64
printerId
wymagane
integer format: int64
defaultPrinters
Array<object>
object
printerConnectionId
wymagane
integer format: int64
printerId
wymagane
integer format: int64
packStationId
integer format: int64
Examplegenerated
{ "fullName": "example", "username": "example", "email": "example", "newUserPassword": "example", "roles": [ "example" ], "timeZoneId": "example", "loginMethod": 1, "defaultPrinter": { "printerConnectionId": 1, "printerId": 1 }, "allowedPrinters": [ { "printerConnectionId": 1, "printerId": 1 } ], "defaultPrinters": [ { "printerConnectionId": 1, "printerId": 1 } ], "packStationId": 1}object
fullName
string
username
string
email
string
newUserPassword
string
roles
Array<string>
timeZoneId
string
loginMethod
integer format: int32
defaultPrinter
object
printerConnectionId
wymagane
integer format: int64
printerId
wymagane
integer format: int64
allowedPrinters
Array<object>
object
printerConnectionId
wymagane
integer format: int64
printerId
wymagane
integer format: int64
defaultPrinters
Array<object>
object
printerConnectionId
wymagane
integer format: int64
printerId
wymagane
integer format: int64
packStationId
integer format: int64
Examplegenerated
{ "fullName": "example", "username": "example", "email": "example", "newUserPassword": "example", "roles": [ "example" ], "timeZoneId": "example", "loginMethod": 1, "defaultPrinter": { "printerConnectionId": 1, "printerId": 1 }, "allowedPrinters": [ { "printerConnectionId": 1, "printerId": 1 } ], "defaultPrinters": [ { "printerConnectionId": 1, "printerId": 1 } ], "packStationId": 1}object
fullName
string
username
string
email
string
newUserPassword
string
roles
Array<string>
timeZoneId
string
loginMethod
integer format: int32
defaultPrinter
object
printerConnectionId
wymagane
integer format: int64
printerId
wymagane
integer format: int64
allowedPrinters
Array<object>
object
printerConnectionId
wymagane
integer format: int64
printerId
wymagane
integer format: int64
defaultPrinters
Array<object>
object
printerConnectionId
wymagane
integer format: int64
printerId
wymagane
integer format: int64
packStationId
integer format: int64
Examplegenerated
{ "fullName": "example", "username": "example", "email": "example", "newUserPassword": "example", "roles": [ "example" ], "timeZoneId": "example", "loginMethod": 1, "defaultPrinter": { "printerConnectionId": 1, "printerId": 1 }, "allowedPrinters": [ { "printerConnectionId": 1, "printerId": 1 } ], "defaultPrinters": [ { "printerConnectionId": 1, "printerId": 1 } ], "packStationId": 1}Odpowiedzi
Dział zatytułowany „Odpowiedzi”No Content
Server Error

