What a pay configuration holds
A pay configuration has a base rate, a currency, and a timezone. Every rule on it is interpreted in that timezone. On top of the base rate sit two kinds of rule:- Weekly rules apply every week, on the days and between the times you choose. A rule paying more for weekday evenings is a weekly rule.
- One-off rules apply over a single window of time. A public holiday is a one-off rule.
What you can do
Create and manage configurations
You can create a pay configuration with its rules in a single request, list the configurations in your organization, and fetch one by its ID. Updating a configuration changes its name, timezone, currency and base rate. It leaves the rules alone, so you do not need to restate them to change the name. Manage rules through their own endpoints instead. Deleting a configuration archives it. Reports already published against it keep their own copy of the rules, so their figures do not change. Any schedule using it as a default loses that default.Manage rules one at a time
Each rule on a configuration is its own resource with its own ID, so you can change one rule without sending the whole configuration back. For weekly rules you can list them, add one, fetch one, update one and remove one. One-off rules have the same five endpoints. Two things worth knowing before you write rules:- Weekly rules are evaluated in the order they are returned, and the first rule that covers a shift wins. A rule you add goes to the end of the list, so it is evaluated after everything already there.
- One-off rules may not overlap each other. If you add one that overlaps a rule the configuration already has, the request is rejected and nothing is saved.
Permissions
An API key needs one of two permissions, which you grant when you create the key:
A configuration becomes visible to everyone in your organization once a published report has priced against it. Until then, a configuration someone created in the dashboard stays private to them, and your API key will not see it. Configurations created through the API belong to no one in particular, so they are visible to everyone from the start.