Skip to main content
GET
/
payroll
/
{user_id}
Returns all payroll from the system that the user has access to
curl --request GET \
  --url https://api.sandbox.goteal.co/payroll/{user_id} \
  --header 'X-API-KEY: <api-key>'
import requests

url = "https://api.sandbox.goteal.co/payroll/{user_id}"

headers = {"X-API-KEY": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};

fetch('https://api.sandbox.goteal.co/payroll/{user_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.goteal.co/payroll/{user_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.sandbox.goteal.co/payroll/{user_id}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("X-API-KEY", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.sandbox.goteal.co/payroll/{user_id}")
.header("X-API-KEY", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.sandbox.goteal.co/payroll/{user_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "pagination": {
    "offset": 75,
    "limit": 25,
    "count": 14,
    "total_count": 89
  },
  "payroll_submissions": [
    {
      "id": "95a0e70b-fe02-4f47-aef9-2efff279df71",
      "account_id": "674744df-9626-47ef-ae2b-4a491be136b5",
      "entry_id": "be770ba4-1362-46cd-8c1c-2330ce3a8b69",
      "created_at": "2019-05-17T00:00:00.000Z",
      "identity_information": {
        "name": "John Smith",
        "date_of_birth": "2019-05-17T00:00:00.000Z",
        "address": {
          "street": "123 Main Street",
          "county": "Greater London",
          "city": "London",
          "post_code": "SW1A 1AA",
          "country": "United Kingdom"
        },
        "email": "john.smith@company.com",
        "phone": 447123456789,
        "NI_number": "AB123456C"
      },
      "employment_information": {
        "employer_name": "Acme Ltd",
        "role": "Software Engineer",
        "type": "Full-time",
        "status": "active",
        "start_date": "2019-05-17T00:00:00.000Z",
        "leave_date": "2019-05-17T00:00:00.000Z"
      },
      "income_information": {
        "pay_date": "2023-05-27T00:00:00.000Z",
        "pay_interval_start": "2023-05-01T00:00:00.000Z",
        "pay_interval_end": "2023-05-31T00:00:00.000Z",
        "pay_frequency": "Monthly",
        "earnings": {
          "gross_pay": 3500,
          "net_pay": 2500,
          "base_salary": 3000,
          "bonus": 500
        },
        "deductions": {
          "income_tax": 500,
          "employee_ni": 200,
          "employee_pension": 300,
          "total_deductions": 1000
        }
      },
      "document_id": "95a0e70b-fe02-4f47-aef9-2efff279df71",
      "document_external_id": "payslip123456",
      "document_filename": "file1-payslip.pdf",
      "trust_score": "High",
      "source": "Payroll (via Direct Connection)"
    }
  ]
}
{
"errors": [
"The request is missing the required field `name`"
]
}
{
"errors": [
"No X-API-KEY header provided or wrong value"
]
}

Authorizations

X-API-KEY
string
header
required

Path Parameters

user_id
string
required

ID of the user to get payroll for

Query Parameters

offset
integer<int32>
default:0

The offset to start at

Required range: x >= 1
limit
integer<int32>
default:100

The number of items to return

Required range: 1 <= x <= 100
account_id
string<uuid>

The account_id to fileter on

entry_id
string<uuid>

The account_id to fileter on

document_external_id
string

The document_external_id to fileter on

created_after
string<date-time>

Filter out payroll dated before the given date

Example:

"2019-05-17T00:00:00.000Z"

created_before
string<date-time>

Filter out payroll dated after the given date

Example:

"2019-05-17T00:00:00.000Z"

Response

Plant response

pagination
object
required
payroll_submissions
object[]
required