Utwórz użytkownika
POST
/api/v3/Users
const url = 'https://twoja-instancja-smerp-api.enterprise.sellrocket.pl/api/v3/Users';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"id":1,"username":"example","password":"example","email":"example","fullName":"example","roles":["example"],"timeZoneId":"example","loginMethod":1,"defaultPrinter":{"printerConnectionId":1,"printerId":1},"allowedPrinters":[{"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 POST \ --url https://twoja-instancja-smerp-api.enterprise.sellrocket.pl/api/v3/Users \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "id": 1, "username": "example", "password": "example", "email": "example", "fullName": "example", "roles": [ "example" ], "timeZoneId": "example", "loginMethod": 1, "defaultPrinter": { "printerConnectionId": 1, "printerId": 1 }, "allowedPrinters": [ { "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”Treść żądania
Dział zatytułowany „Treść żądania”Details regarding new user account
object
id
integer format: int64
username
string
password
string
email
string
fullName
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
packStationId
integer format: int64
Examplegenerated
{ "id": 1, "username": "example", "password": "example", "email": "example", "fullName": "example", "roles": [ "example" ], "timeZoneId": "example", "loginMethod": 1, "defaultPrinter": { "printerConnectionId": 1, "printerId": 1 }, "allowedPrinters": [ { "printerConnectionId": 1, "printerId": 1 } ], "packStationId": 1}object
id
integer format: int64
username
string
password
string
email
string
fullName
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
packStationId
integer format: int64
Examplegenerated
{ "id": 1, "username": "example", "password": "example", "email": "example", "fullName": "example", "roles": [ "example" ], "timeZoneId": "example", "loginMethod": 1, "defaultPrinter": { "printerConnectionId": 1, "printerId": 1 }, "allowedPrinters": [ { "printerConnectionId": 1, "printerId": 1 } ], "packStationId": 1}object
id
integer format: int64
username
string
password
string
email
string
fullName
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
packStationId
integer format: int64
Examplegenerated
{ "id": 1, "username": "example", "password": "example", "email": "example", "fullName": "example", "roles": [ "example" ], "timeZoneId": "example", "loginMethod": 1, "defaultPrinter": { "printerConnectionId": 1, "printerId": 1 }, "allowedPrinters": [ { "printerConnectionId": 1, "printerId": 1 } ], "packStationId": 1}Odpowiedzi
Dział zatytułowany „Odpowiedzi”Created
Server Error

