Calls
User
8 min
the users' endpoint http post https //www regpack com/reg/api2/users/ the users endpoint allows you to perform a series of actions such as creating, deleting, or updating your users each section below describes a different action basic structure each call to the api requires an action and a group id , but often, user calls will include doc and clogin id false true 111 unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type this is mandatory on all calls except for create , since a new user will not yet have a clogin id additional arguments false true 212 unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type user metadata with every call to the api that involves the users endpoint, the system will return at least two objects by default meta info and user info meta info provides a summary snapshot of the user's progress, while user info is provided as a convenience for user identification, examples of each are below meta info { "meta info" { "u name" "jim hall", "total forms" "2", "completed forms" "0", "total user forms" "2", "total completed user forms" "0", "total user mandatory forms" "2", "total completed user mandatory forms" "0", "total order" "0 00", "total paid" "0 00", "total balance" "0 00", "status id" "0", "status name" null, "status color" null, "application date" "dec 8th 2021 17 20", "application date raw" "2021 12 08 17 20 08", "u comments" "0", "group id" "100909072", "uid" "4085257", "clogin id" "102715741", "excluded" "0", "connected to" "102715741", "total user tags" "0", "user tag ids" null, "total non excluded children" "0", "star" "0", "admin initials" null, "admin color" null, "assigned admin id" null } } user info the key thing to note is that connected to relates child to parent for a parent or an individual, connected to will be identical to their own clogin id , while for a child connected to will be clogin id for their respective parent { "user info" { "clogin id" "102715741", "group id" "100909072", "connected to" "102715741" } } example call this would be an example curl which creates a user curl x post "https //www regpack com/reg/api2/users/" \\ h "content type application/json" \\ h "accept application/json" \\ h "api id 15263" \\ h "api user api admin\@regpacks com" \\ h "api token cd2e514f 7gab 3cde 62fg 51abcd4e7362" \\ d '{ "action" "create", "group id" 100909072, "clogin id" false, "doc" { "username" "jim hall\@regpacks com", "password" "dont just play something sit there!", "org name" "jim hall trio", "main email" "jim hall\@regpacks com", "first name" "jim", "last name" "hall" } } example response { "msg" "user registered ", "system action" \[ "user registered" ], "success" true, "user info" { "clogin id" "102715741", "group id" "100909072", "connected to" "102715741" }, "meta info" { "u name" "jim hall", "total forms" "2", "completed forms" "0", "total user forms" "2", "total completed user forms" "0", "total user mandatory forms" "2", "total completed user mandatory forms" "0", "total order" "0 00", "total paid" "0 00", "total balance" "0 00", "status id" "0", "status name" null, "status color" null, "application date" "dec 8th 2021 17 20", "application date raw" "2021 12 08 17 20 08", "u comments" "0", "group id" "100909072", "uid" "4085257", "clogin id" "102715741", "excluded" "0", "connected to" "102715741", "total user tags" "0", "user tag ids" null, "total non excluded children" "0", "star" "0", "admin initials" null, "admin color" null, "assigned admin id" null } }