A form
in UKG HR Service Delivery is a customizable form that can be build by an administrator. Each form is defined by a list of fields and is displayed on the employee portal to be completed by employees.
For employees, the access to a form can be based on:
The organisation perimeter of the employee
Some filtering rules based on the custom attributes of the employee
For managers, the access to a form can be based on the role of the manager.
This method returns all forms based the query GET parameters.
GET /api/forms/?...
Accept: application/json
Content-Type: application/json
X-API-KEY: xxxxxxxxxxxxxxxxxxxxxxxxxxx
Search filters (GET parameters):
Parameter |
Description |
Type |
mandatory |
Exemple |
---|---|---|---|---|
category_code |
Identifying code (slug) of a category. If set, returns only the forms included in this category. |
|
|
category_code: onboarding |
accessible_by |
Some forms may be accessible only to employees or managers. When set to |
|
|
accessible_by: employees |
employee_technical_id |
Return only the forms accessible to this specific employee. Note: |
|
|
employee_technical_id: XAQ678900 |
manager_technical_id |
Return only the forms accessible to this specific manager. Note: |
|
|
manager_technical_id: MAQ678900 |
featured |
If true, returns only “featured” forms (those forms are displayed on the employee home page), if false, return non “featured” forms. If empty or not in the query, all forms are returned. |
|
|
featured: true |
query |
Full text search in the form title |
|
|
query: Onboarding form |
Ordering and pagination:
Parameter |
Description |
Type |
mandatory |
Exemple |
---|---|---|---|---|
order_by |
Ordering rule. Specify an attribute of a form, with a possible unary negative to imply descending sort order. The attribute can be |
|
|
order_by: -created_at |
per_page |
Number of request per page (defaults to 20, max 100) |
|
|
per_page: 50 |
page |
Page number |
|
|
page: 2 |
The response is encoded in the JSON format with the following parameters, and is a list of form objects with the following attributes:
Parameter |
Description |
Type |
Exemple |
---|---|---|---|
slug |
The slug of the form, wich is the default unique identifier used in the URI for this form |
|
how-to-complete-the-onboarding-form |
title |
The title of the form |
|
How to complete the onboarding form? |
category |
The list of categories of this form |
|
{…} |
featured |
The featured state of the form |
|
false |
total_hits |
Total number of pageviews of this form on the employee portal (API hits are not counted…) |
|
1856 |
updated_at |
Last update of the form |
|
2012-01-01T12:00:00+00:00 |
created_at |
Creation date of the form |
|
2012-01-01T12:00:00+00:00 |
manager_url |
The URL of the |
|
|
employee_url |
The URL of the |
|
|
api_url |
The URI of the |
|
For instance:
HTTP 200 OK:
HTTP/1.1 200 OK
Link: <https://BASE_URL/manager/forms/?page=2&per_page=30>; rel="next",
<https://BASE_URL/manager/forms/?page=5&per_page=30>; rel="last"
[
{form_object_1},
...,
{form_object_2}
]
Where form_object_x is a json like this:
{
"slug": "onboarding-form",
"title": "Welcome!!",
"category": {
"slug": "onboarding",
"name": "OnBoarding Section!",
"language_code": "en",
"description": "..."
},
"featured": false,
"total_hits": 5678,
"updated_at": "2012-01-01T12:00:00+00:00",
"created_at": "2012-01-01T12:00:00+00:00",
"api_url": "https://API_DOMAIN/api/forms/:slug/",
}
curl -v -X GET "https://peopleask.net/api/forms/?category_code=onboarding&employee_technical_id=56789G79" \
-H "Content-type: application/json" \
-H "Accept: application/json" \
-H "X-API-KEY: XXXXXXXXXXXXXX"