For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
SupportDeel Home
OverviewPlatformEmployer of RecordContractorsGlobal PayrollHREmbeddedDeel ITAPI ReferenceChangelog
OverviewPlatformEmployer of RecordContractorsGlobal PayrollHREmbeddedDeel ITAPI ReferenceChangelog
  • Resources
    • Blog
    • Community
    • API spec
  • Endpoints
      • GETGet pay stub from employees from organization integrated with external benefits vendor
      • GETGet year to date payment for benefits 401k.
    • PATCHProfiles
LogoLogo
SupportDeel Home
EndpointsPayroll

Get year to date payment for benefits 401k.

GET
/benefits/legal-entities/:id/year-to-date-pay
GET
/rest/v2/benefits/legal-entities/:id/year-to-date-pay
$curl -G https://api.letsdeel.com/rest/v2/benefits/legal-entities/123/year-to-date-pay \
> -H "Authorization: Bearer <token>" \
> -d date_start=2021-01-01 \
> -d date_end=2022-01-01
1{
2 "end_date": "2021-01-15",
3 "employees": [
4 {
5 "gross_pay": 1000,
6 "contract_id": "123",
7 "employee_id": "123e4567-e89b-12d3-a456-426614174000",
8 "hours_worked": 40,
9 "contributions": [
10 {
11 "name": "401k",
12 "type": "roth",
13 "amount": 10
14 }
15 ],
16 "employer_contributions": [
17 {
18 "name": "401k",
19 "type": "match_rate",
20 "amount": 10
21 }
22 ]
23 }
24 ],
25 "start_date": "2021-01-01"
26}

Returns aggregated year-to-date payroll figures for employees in the specified legal entity over a caller-specified date range. Both date_start and date_end are required. Token scopes: organizations:read

Was this page helpful?
Previous

Retrieve employee payslips

Next
Built with

Authentication

AuthorizationBearer
## Authentication The Deel API uses bearer tokens to authenticate requests. All API calls must be made over HTTPS — calls over plain HTTP or without authentication will fail. ```curl curl -X GET 'https://api.letsdeel.com/rest/v2/contracts' \ -H 'Authorization: Bearer YOUR-TOKEN-HERE' ``` [Learn more about authentication](/api/authentication)
OR
AuthorizationBearer

Standard OAuth2 security scheme based on https://swagger.io/docs/specification/authentication/

Path parameters

idstringRequired
Id from the legal entity to fetch data

Query parameters

date_startstringRequired
Start date to fetch aggregated pay data
date_endstringRequired
End date to fetch aggregated pay data

Response

Successful operation.
end_datestringformat: "date"
The end date of the pay period.
employeeslist of objects
start_datestringformat: "date"
The start date of the pay period.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error

Authentication

The Deel API uses bearer tokens to authenticate requests. All API calls must be made over HTTPS — calls over plain HTTP or without authentication will fail.

1curl -X GET 'https://api.letsdeel.com/rest/v2/contracts' \
2 -H 'Authorization: Bearer YOUR-TOKEN-HERE'

Learn more about authentication