In this article, you will discover how to retrieve employees data in Gamfi application using API.
Downloading employee data is possible in three ways, using:- ID
 - phone number
 
ID
To retrieve an employee's data using their ID use the method and endpoint:
GET + /api/app_api_admin.php/v2/workflows/integration/user/{ID}
Example cURL:
curl --location 'https://{app_name}.gamfi.io/api/app_api_admin.php/v2/workflows/integration/user/2' \
--header 'X-Samus-Authorization-Api-Key: {apiKey}' \
--header 'X-Samus-Authorization-Api-Secret: {apiSecret}'
In place:
- {app_name} - insert the name of your application
 - {ID} - insert the employee's ID from the Gamfi application
 - {apiKey} - insert API key
 - {apiSecret} - insert API secret
 
To retrieve an employee's data using their email use the method and endpoint:
GET + /api/app_api_admin.php/v2/workflows/integration/user/email/{email}
Example cURL:
curl --location 'https://{app_name}.gamfi.io/api/app_api_admin.php/v2/workflows/integration/user/email/john.doe@gamfi.com' \
--header 'X-Samus-Authorization-Api-Key: {apiKey}' \
--header 'X-Samus-Authorization-Api-Secret: {apiSecret}'
In place:
- {app_name} - insert the name of your application
 - {email} - insert the user's email from the Gamfi application
 - {apiKey} - insert API key
 - {apiSecret} - insert API secret
 
Numer telefonu
To retrieve an employee's data using their phone number use the method and endpoint:
GET + /api/app_api_admin.php/v2/workflows/integration/user/phone/{phone_number}
Example cURL:
curl --location 'https://{app_name}.gamfi.io/api/app_api_admin.php/v2/workflows/integration/user/phone/123456789' \
--header 'X-Samus-Authorization-Api-Key: {apiKey}' \
--header 'X-Samus-Authorization-Api-Secret: {apiSecret}'
In place:
- {app_name} - insert the name of your application
 - {phone_number} - insert the employee's phone number from the Gamfi application
 - {apiKey} - insert API key
 - {apiSecret} - insert API secret
 
If the response is correct (200), you will receive a confirmation:
{
    "id": 2,
    "forename": "Administrator",
    "surname": "Gamfi",
    "avatar": null,
    "email": "admin@gamfi.pl",
    "phone": null,
    "locations": [],
    "categories": [],
    "custom_fields": []
}