HomeRecipesAPI ReferenceChangelogDiscussions
Log In
Discussions

Discussions

Ask a Question
Back to All

Adding UserPayRates

When I add a user payrate through the UI, it asks for a Labor Code and a Rate. Piece of cake. I haven't been able to to it through the API yet.

Using the API, when I try to add a UserPayRate directly using POST I get "Pay Rate modifications must be performed in parent's context." Fair enough

If I PUT using the Employee base, I can add a UserPayRate entry, but the Currencies (UserPayRateMoneyValues) list is empty.
Can I add UserPayRateMoneyValues in the same statement where I add the new UserPayRate?

Also, I can manipulate a UserPayRateMoneyValues entry that already exists using its ID.
I can't figure out how to add a new UserPayRateMoneyValues to an existing UserPayRate object.

When I use PUT against EMPLOYEE, the body below will add a PayRate entry to employee 773 with a LaborCodeID of 124 with an empty Currency list. I've tried quite a few things but can't figure out how to populate the Currencies/UserPayRateMoneyValues at the same time I create the PayRate

{
"Properties":["PayRates.LaborCodeID"],
"Entity": {
"Id":"773",
"PayRates": [{"LaborCodeID":124}]
}
}