Resource URL

https://api.digitalchalk.com/dc/api/v5/userfields

Overview

User fields are extra data fields users can fill in when signing up or updating their own account information. Organization administrators have access to an additional set of fields on each user where private data can be recorded. This data is visible to other administrators, and can also be included in reports and data exports, and used as conditions for discounts or message displays.

User-visible data fields are called public; Administrator-only fields are called private. This visibility type is controlled at the User Field Category level, but it is included in all responses that return user fields for clarity.

You can find details of the JSON representation of userfields by referring to the Userfield Object Reference.

Use Case Examples

GET requests

Operation Call Description
Retrieve all userfields GET /dc/api/v5/userfields Retrieve all userfield data. Parameters can be provided to limit the output based on the type of parent category.
Retrieve a specific userfield GET /dc/api/v5/userfields/{id} Retrieve all userfield data about a specific userfield identified by {id}.

POST requests

Operation Call Description
Create text userfield POST /dc/api/v5/userfields Create a new userfield where the user may enter freeform text. This field can have minimum and maximum length constraints.
Create number userfield POST /dc/api/v5/userfields Create a new userfield where the user may enter integer-type numbers. This field can have minimum and maximum value constraints.
Create decimal number userfield POST /dc/api/v5/userfields Create a new userfield where the user may enter decimal numbers. This field can have minimum and maximum value constraints.
Create email userfield POST /dc/api/v5/userfields Create a new userfield where the user may enter an email address. This field can have minimum and maximum length constraints, and will have extra validation to ensure the user enters a valid email address.
Create date userfield POST /dc/api/v5/userfields Create a new userfield where the user choose a date. This field will have a date-picker user interface, and you may define minimum and maximum date constraints.
Create dropdown userfield POST /dc/api/v5/userfields Create a new dropdown list userfield. You provide a list of options, and you may set which value is selected by default, if any.
Create radio-buttons userfield POST /dc/api/v5/userfields Create a new radio-buttons userfield. You provide a list of options, and you may set which value is selected by default, if any.
Create single checkbox userfield POST /dc/api/v5/userfields Create a new checkbox userfield.
Create checkboxes userfield POST /dc/api/v5/userfields Create a new checkboxes userfield. You provide a list of options, and you may set which values are selected by default, if any.
Create true/false userfield POST /dc/api/v5/userfields Create a new true/false userfield. This is presented to the user as a dropdown list with True and False as the only two available options.
Create yes/no userfield POST /dc/api/v5/userfields Create a new yes/no userfield. This is presented to the user as a dropdown list with Yes and No as the only two available options.
Create message userfield POST /dc/api/v5/userfields Create a new message userfield. This can be used as an informational or instructional message for subsequent userfields.

PUT requests

Operation Call Description
Add predefined userfield to form PUT /dc/api/v5/userfields/{id} Add one of the system-provided predefined userfield types onto the user info form
Move userfield to new category PUT /dc/api/v5/userfields/{id} You can move a userfield to a different category. Note that this allows you to move a userfield from the private set of admin-only userfield categories into the public user-modifiable categories and vice-versa.
Update userfield name PUT /dc/api/v5/userfields/{id} Modify the userfield label shown to end-users when they are filling out the information form
Update userfield size PUT /dc/api/v5/userfields/{id} Modify the userfield input field size.
Toggle userfield required flag PUT /dc/api/v5/userfields/{id} Update whether the user will be required to enter a value for this field. If you mark an existing field as required, users will be prompted to enter a value for this field the next time they login.
Update localized userfield names PUT /dc/api/v5/userfields/{id} Update the set of languages and translations of the userfield name
Remove a localized userfield name PUT /dc/api/v5/userfields/{id} Remove one of the translated userfield names
Clear localized userfield names PUT /dc/api/v5/userfields/{id} Remove all translated userfield names
Update userfield options PUT /dc/api/v5/userfields/{id} Update the set of choices a user has for option-based inputs like dropdown lists, checkboxes, or radiobuttons
Remove a userfield option PUT /dc/api/v5/userfields/{id} Remove one of the choices a user has for option-based inputs like dropdown lists, checkboxes, or radiobuttons
Update userfield constraints PUT /dc/api/v5/userfields/{id} Update the set of constraints on a userfield
Remove a userfield constraint PUT /dc/api/v5/userfields/{id} Remove a single constraint from a userfield
Clear all userfield constraints PUT /dc/api/v5/userfields/{id} Remove all the constraints set on a single userfield
Update message userfield content PUT /dc/api/v5/userfields/{id} Update the content of a message-type userfield

DELETE requests

Operation Call Description
Remove a system-defined userfield DELETE /dc/api/v5/userfields/{id} Remove a predefined system-provided userfield from the user info form
Delete a custom userfield DELETE /dc/api/v5/userfields/{id} Delete a custom userfield from the user info form

Reference