Updating hours worked
The Nmbr API surfaces an endpoint that can be used to import hours for many employees at once.Supported Earning Types
The supported earning line item types are:wage(multiple require apay_rate_idand/orearned_on)salary(multiple require apay_rate_idand/orearned_on)overtime(multiple require anovertime_rate_id,rate_multiplier, and/orearned_on)vacation_pay(multiple require apay_rate_idand/orearned_on)
Simple Scenario
In this simple scenario, each employee has been configured with a single Pay Rate. To run payroll accurately, you will be required to update the hours for each Earning Line Item generated from the Pay Rates. To cut down on API calls, use thePOST /payrolls/{payroll}/hours endpoint to import hours for multiple employees at once.
A More Complex Scenario
In some cases, employees may have multiple Pay Rates and Overtime Rates, resulting in many Earning Line Items. In order for the system to know which hours correspond with each Earning Line Item, the API requires you to provide either apay_rate_id, overtime_rate_id, or rate_multiplier, depending on the type of earning.
Tracking Hours by Date
If you track hours per day (or any other date granularity within the payroll period), you can attach anearned_on date to each entry. This is supported on every earning type.
The earned_on value:
- Must be a date that falls within the payroll’s pay period.
- Is part of the entry’s scoping key, so you can submit multiple entries against the same
pay_rate_id(orovertime_rate_id/rate_multiplier) as long as theirearned_ondates differ.
Targeting a Business Preset
When you import hours for distinct configured workflows that share an earning type and rate, includebusiness_preset_id on each earning entry. The preset identifies which line item to update or create.
The preset must belong to the payroll’s business entity, have the earning type, and match the entry’s earning type when the preset has a subtype.
business_preset_id keep their existing matching behaviour.
See Presets to create and manage Business Presets.
