Search

API v1 - Patch workaround

Do you need to update individual data on an employee's master data or similar? Then you can use the following guide to create a patch workaround. It allows you to fill in only the relevant data instead of all data in a form.

 

Content

Create form

Relevant endpoints

 

Create form

To target individual fields on a form, you need to create a new form with only the relevant fields. The following describes how you can update an email and phone number on employee master data. It is possible to set it up with other fields that are relevant to your solution.

To create a new form, go to Settings > Forms > 'New form'. Fill in the following pop-up window with relevant info for the solution you are building. When you are done click Save.

Skærmbillede 2024-01-22 kl. 14.39.50.png

This will take you into the form builder. Add a title for 'Step'. It is only necessary to have on step.

Skærmbillede 2024-01-22 kl. 14.41.21.png

Next, add the elements that are relevant to your solution. In our example, this is email and phone number. It's important not to create new fields, but to search for those that already exist on other forms.

Skærmbillede 2024-01-22 kl. 14.43.12.png

 

When adding the elements in the form, it is important that you set them up correctly. Once the relevant elements have been added, click 'Back to steps'. Click the edit icon next to each field (not necessary for standard fields).

Skærmbillede 2024-01-22 kl. 14.45.37.png

 

To ensure that the field updates data across forms, it is important that the across-form update settings are enabled.

Skærmbillede 2024-01-22 kl. 14.49.10.png

Save your form and you're ready to retrieve it via API.

 

Relevant endpoints

To make updates to form data, you need to use the intended API endpoints.

First, you need to retrieve the FormID on the Patch form. This can be done via the following endpoints, where you retrieve the ID of all forms. Find the right one and use the ID to make the remaining calls in the API. The ID will not change.

Skærmbillede 2024-01-22 kl. 14.52.20.png

Next, you need to find the EmployeeID, which you can do by retrieving the full list of employees on the following endpoint.

Skærmbillede 2024-01-22 kl. 14.53.33.png

Once you have the FormID and EmployeeID, you can call the following endpoint with updates in the data.

Skærmbillede 2024-01-22 kl. 14.54.53.png

When the Patch form is updated, it will update across other forms where the element is included. Check if the update is reflected in the platform.

Not sure what the format should be in your API request?

Call the following endpoint with FormID to get the form definition:

Skærmbillede 2024-01-22 kl. 14.56.41.png

Was this article helpful?

Was this article helpful?

Want to get in touch?

We got you. Fill out a request and we'll get back to you as soon as possible.

Submit a request