1. Knowledge base
  2. Gamfi API Docs
  3. Process and workflow management

Starting processes

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' \
--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"
}'
In place:
  • {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
  • "manager_forename": the manager's first name
  • "manager_surname": manager's last name
  • "manager_email": manager's email address
  • "manager_phone": manager's phone number

Example URL:

curl --location 'https://{app_name}.gamfi.io/api/app_api_admin.php/v2/workflows/integration/process' \
--header 'X-Samus-Authorization-Api-Key: ' \
--header 'X-Samus-Authorization-Api-Secret: ' \
--header 'Content-Type: application/json' \
--data-raw '{
  "employee_forename": "John",
  "employee_surname": "Doe",
  "employee_email": "john.doe@gamfi.com",
  "employee_phone": "48123123123",
  "manager_forename": "Jane",
  "manager_surname": "Doe",
  "manager_email": "jane.doe@gamfi.com",
  "manager_phone": "48123123124",
  "workflow_id": "3f9a81c3-132c-4660-b459-2226805b1d80",
  "key_date": "2024-01-01"
}'

If the answer is correct, you will receive a status (200).

⚠️ If the user (employee / manager) does not have an account with Gamfi, starting the process will create a new account using the details provided.