Appearance
Register Employee account
Overview
A POST request needs to be sent to https://sandbox.tendopay.ph/api/payroll/v1/user/register to register an employee.
Please refer to the parameters section for the required parameters.
Parameters
| Parameter | Data Type | Required | Description |
|---|---|---|---|
| tp_company_id | String | yes | Tendopay company ID |
| ref_user_id | String | yes | JustPayroll user ID |
| String | yes | ||
| mobile_number | String | yes | |
| second_phone_number | String | ||
| first_name | String | yes | |
| middle_name | String | ||
| last_name | String | ||
| date_of_birth | String | YYYY-MM-DD | |
| tin | String | TIN Number of user | |
| sss | String | ||
| nationality | String | ||
| gender | String | Male or Female | |
| address_line | String | ||
| postal_code | String | ||
| base_monthly_salary | Numeric | ||
| net_monthly_salary | Numeric | ||
| employment_start_date | String | YYYY-MM-DD | |
| employment_status | Int | @see job status codes |
Job Status codes
The employment_status parameter is an integer that represents the job status of the employee.
Below are the possible values:
| Int Parameter | Definition |
|---|---|
| 1 | Permanent Job (Private sector) |
| 2 | Temporary Job (Private sector) |
| 3 | Permanent Job (Government sector) |
| 4 | Temporary Job (Government sector) |
| 9 | Other |
| 10 | Business Owner |
| 11 | Freelance |
| 12 | Remittance Beneficiary |
| 14 | Resigned |
| 15 | Casual |
| 16 | Contractual |
| 17 | Part Time |
| 18 | Probationary |
| 19 | Project Based |
Example
Example Request:
bash
curl --location --request POST 'https://sandbox.tendopay.ph/api/payroll/v1/user/register' \
--data-raw '{
"tp_company_id": "10110",
"ref_user_id": "test-user-0003",
"first_name": "John",
"middle_name": "F",
"last_name": "Doe",
"date_of_birth": "1980-01-02",
"email": "jane@test.dev",
"mobile_number": "09112223333",
"secondary_phone_number": "",
"tin": "000-123-345",
"sss": "12-3456789-0",
"nationality": "PH",
"gender": "Male",
"address_line": "Unit 123, Zeta Building, 1 Salcedo Street, Makati City, Philippines",
"postal_code": "1234",
"base_monthly_salary": 14000.00,
"net_monthly_salary": 10000.00,
"employment_start_date": "2012-11-06",
"document_image": "https://robohash.org/driver_license.jpg",
"document_type": "driver_license",
"employment_status": 1
}
Example Response:200
If the registration is successful you will see the following information:
json
{
"tp_user_id": 728240,
"tp_company_id": 10110,
"ref_user_id": "test-user-0004",
"ref_company_id": "DEMO-123460",
"first_name": "John4",
"middle_name": "F",
"last_name": "Doe",
"email": "jane1@test.dev",
"phone": "+63 (911) 222 3333",
"user_status": "VERIFIED",
"message": "Not specify Tier",
"registered_at": "2022-03-09T04:26:55+08:00",
"updated_at": "2022-03-09T09:15:37+08:00",
"credit_limit": 57600,
"available_credit_limit": 57600,
"repayment_days": "15,30",
"billing_account_id": "TP990A76"
}
Example Response:422
If the phone number is already in use, you will get the response below:
json
{
"message": "The given data was invalid.",
"error": "This phone already in use with TendoPay."
}
Example Response:422
If an invalid nationality is given or the field is empty you will receive the error below.
WARNING
Please note that TendoPay only currently accepts Philippines nationality.
json
{
"message": "The given data was invalid.",
"error": "This phone already in use with TendoPay."
}
Example Response:422
If the company is not activated, you will receive the following error.
json
{
"message": "The given data was invalid.",
"error": "This company is not activated yet."
}