Skip to content
On this page

# Get Company account

Overview

The list of all employees from each company can be retrieved using the following endpoint.

A GET request can be made to https://sandbox.tendopay.ph/api/payroll/v1/user/{tp_company_id}?limit=2&last_user_id= where {tp_company_id} is the TendoPay company ID, limit is the number of employees to be retrieved and last_user_id is to fetch data after the previous last_user_id passes.

Alternatively, a GET request can also be made to https://sandbox.tendopay.ph/api/payroll/v1/user/ref/{ref_company_id}?limit=2&last_user_id= where {ref_company_id} is your company's reference ID and the limit is the number of employees to be retrieved and last_user_id is to fetch data after the previous last_user_id passes.

TIP

For details on failed response codes, please visit Response Status

Example

Example Request:

bash
curl --location --request GET 'https://sandbox.tendopay.ph/api/payroll/v1/user/123456/789043'

Example Response:200

json
{
  "data": [
    {
      "tp_user_id": 752233,
      "tp_company_id": 10112,
      "ref_user_id": "13",
      "ref_company_id": "DEMO-123460",
      "first_name": "Jelly",
      "middle_name": "Bretaña",
      "last_name": "Casiñas",
      "email": "user752233@fake.com",
      "phone": null,
      "user_status": "VERIFIED",
      "message": "",
      "registered_at": "2022-04-05T20:12:00+08:00",
      "updated_at": "2022-04-05T20:12:06+08:00",
      "credit_limit": 54900,
      "available_credit_limit": 54900,
      "repayment_days": "5,20",
      "billing_account_id": "FP706681"
    },
    {
      "tp_user_id": 752049,
      "tp_company_id": 10112,
      "ref_user_id": "136",
      "ref_company_id": "DEMO-123460",
      "first_name": "rosita",
      "middle_name": "Urbano",
      "last_name": "garlando",
      "email": "user752049@fake.com",
      "phone": "+63 (000) 136 11795",
      "user_status": "DECLINED",
      "message": "Not specify Tier",
      "registered_at": "2022-04-05T16:14:49+08:00",
      "updated_at": "2022-04-05T16:20:08+08:00",
      "credit_limit": null,
      "available_credit_limit": 0,
      "repayment_days": "",
      "billing_account_id": ""
    }
  ],
  "meta": {
    "has_more": true,
    "last_user_id": 752049
  }
}