In this article, you will discover how to run workflow-based processes in the Gamfi application using the API.
To start the process in the Gamfi application use the method and endpoint:
POST
+ /api/app_api_admin.php/v2/workflows/integration/process
Example cURL:
curl --location 'https://{app_name}.gamfi.io/api/app_api_admin.php/v2/workflows/integration/process' \In place:
--header 'X-Samus-Authorization-Api-Key: {apiKey} ' \
--header 'X-Samus-Authorization-Api-Secret: {apiSecret} ' \
--header 'Content-Type: application/json' \
--data-raw '{
"employee_email": "john.doe@gamfi.com",
"workflow_id": "3f9a81c3-132c-4660-b459-2226805b1d80",
"key_date": "2024-01-01"
}'
- {app_name} - insert the name of your application
- {apiKey} - insert API key
- {apiSecret} - insert API secret
The request structure should contain the following data:
- "employee_email": the email address of the user for whom you are running the process
- "workflow_id": ID of the workflow, based on which you want to run the process
- "key_date": the key date in the process in the format YYYY-MM-DD
In addition, you can pass more datatypes within the request, such as:
- "employee_forename": user's name
- "employee_surname": the user's last name
- "employee_phone": the user's phone number
- "employee_company": the user's company ID (check Getting list of companies)
And also (optionally) many other data points, such as:
-
additional roles involved in the process (e.g. Manager, HRBP, IT, etc.) – known in Gamfi as “Roles”
-
employee categories used to personalize actions within the process (e.g. region, department, branch) – known in Gamfi as “Categories”
-
custom values (e.g. SAP number, job position) – known in Gamfi as “Custom Fields”
Example URL:
curl --location 'https://{app_name}.gamfi.io/api/app_api_admin.php/v2/workflows/integration/process' \
--header 'X-Samus-Authorization-Api-Key: {apiKey} ' \
--header 'X-Samus-Authorization-Api-Secret: {apiSecret} ' \
--header 'Content-Type: application/json' \
--data-raw '{
"employee_forename": "John",
"employee_surname": "Doe",
"employee_email": "john.doe@gamfi.com",
"employee_phone": "+48123123123",
"roles": [
{
"role_id": "22d864fd-de63-4c25-be0a-b42a94bfeb6a",
"user_forename": "Jane",
"user_surname": "Doe",
"user_email": "jane.doe@gamfi.com",
"user_phone": "+48123123123"
}
],
"employee_categories": [
{
"category_id": "094f1129-6af3-4687-aa86-acbc7bb97ef7",
"options": [
{
"id": "b85059a4-3691-43cc-bd46-170e1e7eaa22"
}
]
}
],
"employee_custom_fields": [
{
"custom_field_id": "781bd8db-e310-4fab-b68a-cead1b987918",
"value": "string"
}
]
}'
If the answer is correct, you will receive a status (200).
⚠️ If the user (employee / manager, HRBP, etc.) does not have an account with Gamfi, starting the process will create a new account using the details provided.