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 name type required description action string true this describes what you would like to do with the api actions include create , create child , login , update , add product , add email , get info , set status group id integer true this designates which project the change should be applied to api id in the header must be part of the organization that owns the group clogin id integer true this is a central login id which identifies a single user between any projects within your organization doc json false this is the user data you would like to include in the request, formatted as json this is mandatory on all calls except for create , since a new user will not yet have a clogin id additional arguments name type required description connected to integer false this is the clogin id of a parent and is only relevant in family systems submit forms boolean false this prevents the user's forms from submitting this is generally advised if you want to prevent the update from activating triggers which are set in your project false will prevent the forms from submitting, but true is the default disable email sending boolean false this specifically prevents any emails from automatically sending as a result of an api call true will prevent the emails from sending and false will allow emails to be sent although false is the default, it is generally advised that you set this to true if you're not sure of what emails might trigger 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 } }