Calls
User
create_child
5 min
this call creates a child in a family system this is very similar to create , but connected to is mandatory and must be the same as clogin id for the associated parent basic parameters name type required description action string true create child clogin id integer false this is a central login id which identifies a user within your organization organizations can have multiple projects that the same user can register in if you know the clogin id from a separate project, you can use it to connect the accounts clogin id should be false for a user who is being created for the first time within your organization group id integer true this designates which project the action should be applied towards connected to integer true this is the clogin id of the parent you are trying to add a child to doc array true see doc parameters below if no information is needed, an empty doc must still be provided submit forms boolean false this disables emails from sending as a result of triggers disable email sending boolean false this prevents all forms from submitting, which often triggers actions to occur doc parameters name type required description first name string false this is an important field which is responsible for the presentation of the first name on the user management page it is strongly advised that this is included last name string false this functions like first name org name string false similar to first name, but allows an organization name to display on the user management page note that in a family system, it is still advised that first name and last name are included in addition to org name main email string false this is similar to first name, and often serves as username as well note that emails are both validated and checked against a dns database, however the dns check can be disabled in the project settings of your project application date string false this will default to the creation date if not supplied this is included in case you want to back date an applicant's creation date should be formatted like "yyyy mm dd" or "yyyy mm dd hh\ mm\ ss" prevent duplicate logical false this tries to find the user within the family to see if any member has the same email or the same combination of first name and last name the default is true fields string false these are the fields in your project, such as multiple choice fields, short answer fields, etc see "referencing fields in api calls" for more information on how to supply fields in the api examples new child this is an example that would create a new child the key things to note are that main email , first name , and last name are all supplied while clogin id is false altogether, this is the equivalent of a parent registering a child and answering the yes/no question 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 child", "group id" 100909072, "clogin id" false, "connected to" 102670540, "doc" { "first name" "bill", "last name" "evans", "your instrument" "piano" } }import requests import json users endpoint = https //www regpack com/reg/api2/users/ headers = { "content type" "application/json", "accept" "application/json", "api id" "15263", "api user" "api admin\@regpacks com", "api token" "cd2e514f 7gab 3cde 62fg 51abcd4e7362", } payload = { "action" "create child", "group id" 100909072, "clogin id" false, "connected to" 102670540, "doc" { "first name" "bill", "last name" "evans", "your instrument" "piano" } } create new child json = json dumps(payload) create new child response = requests post(url=users endpoint, data=create new child json, headers=headers, timeout=10) new user response { "msg" "child created ", "system action" \[ "child created" ], "success" true, "user info" { "clogin id" "102715755", "group id" "100909072", "connected to" "102670540" }, "meta info" { "u name" "bill evans", "total forms" "6", "completed forms" "0", "total user forms" "6", "total completed user forms" "0", "total user mandatory forms" "6", "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" "4085259", "clogin id" "102715755", "excluded" "0", "connected to" "102670540", "total user tags" "0", "user tag ids" null, "total non excluded children" null, "star" "0", "admin initials" null, "admin color" null, "assigned admin id" null } }