OS1 Services
...
User API
Introduction to Users
4 min
a user represents the human resource that performs a task or a set of tasks such as pick up, delivery, and operations management users perform various assigned roles, such as operator, supervisor, and manager you can use the user api to build apps that can onboard and manage users in your customer’s organization user lifecycle by default, a user has four lifecycle states onboarding user data is being entered and/or verified active user data is verified and the user is activated deboarding the user is in the process of being deactivated (for example, serving a notice period) inactive the user has been deactivated to retrieve the current state of a user, call the https //docs getos1 com/reference/get current state of user by id or external ref endpoint the response body is returned in json format { "error" { "code" "string", "description" "string" }, "request" { "uri" "string", "body" {} }, "data" { "event" { "tostate" "active\ available", "reasoncode" "r 104", "data" {} }, "id" "user\ e5f2064c 1a8c 45d9 b125 05a5416135c9", "state" "active\ available" } } to change the state of a user, call the https //docs getos1 com/reference/update state of user by id or external ref endpoint and pass the following parameters in the request body true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type request bodies are specified in json format the following example request body shows how to change the state of the user { "tostate" "active\ available", "reasoncode" "r 104", "data" {} } user attributes attributes describe the characteristics of an object in the platform the user api specifies a set of system defined attributes and allows for the creation of custom attributes the following attributes are defined by default for each user in the system true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type