AccountRight API error adding PayrollCategory into a EmployeeStandardPay

This thread is now archived and closed to new comments.
Some of the links provided in this thread may no longer be available or relevant.
If you have a question please post a new topic.
3 REPLIES
Partner Caesar
2 Posts
Partner

Re: AccountRight API error adding PayrollCategory into a EmployeeStandardPay

Similar issue here. When try to add payroll category for employees. I first usePayroll/PayrollCategory/Wage API to create a list of payroll categories. Then Try to assign these new added payroll category to specific employee via Contact/EmployeeStandardPay.

but on step 2, When I construct PayrollCategories with additional paycategory in this format:

[9] => Array
(
[PayrollCategory] => Array
(
[UID] => 5feaad67-e3a2-4b87-b817-69bcfaf0e73f
)

)

 

received following error:

 

"Errors": [
{
"Name": "Required",
"Message": "All payroll categories assigned to the employee must be included on standard pay.",
"AdditionalDetails": "PayrollCategories",
"ErrorCode": 100,
"Severity": "Error"
}
],
"Information": "Warning, error messages have not been finalised in this release and may change"
}

MYOB Staff Post DeveloperJack
40 Posts
MYOB Staff Post
Australia

Re: AccountRight API error adding PayrollCategory into a EmployeeStandardPay

Hi there Dave,

 

I'd hazard a guess that there's a missing payroll category in the list of categories you're PUT'ing to the API. If you're still getting this error can you please send through the full HTTP trace (full request headers & URI and with UID's and URI's unredacted etc) through to developers@myob.com where the team can help take a closer look?

 

Cheers,

Jack

Jack Skinner
MYOBapi Evangelist

Are you a developer? Check out http://developer.myob.com
Looking for an Add-on? Check out http://myob.com/addons/
Ultimate Partner ronatbas
3,933 Posts
Ultimate Partner
Australia

Re: AccountRight API error adding PayrollCategory into a EmployeeStandardPay

@dave_01

 

Firstly an apology that no one has got back to you regarding this thread.

 

I'm not someone who should be answering api type questions as I do not use them, however I read the script which you posted and noted something that may help you.

 I don't know how the api is written but i note you are having it call Unused Annual Leave. This is not usually selected against an employee until the final pay is to be made. Even then an api should not be used as the PAYG has to be adjusted downwards if the Used Leave is greater than one pay period. 

Ron B
BAS Group
03 95588477

info@basgroup.com.au
Making MYOB work for you
Partner dave_01
1 Post
Partner
Australia

AccountRight API error adding PayrollCategory into a EmployeeStandardPay

Hi,

Having some issues with updating reference data in AccountRight Live api.

I am trying to add an PayrollCategory into a EmployeeStandardPay

 

NOTE: I am usin ruby api gem https://github.com/davidlumley/myob-api

 

e.g.

I load a record from  Contact/EmployeeStandardPay

I try to add a newPayrollCategory

 

before update 

standardPay has 

{'PayrollCategories' =>
[{"PayrollCategory"=>{"UID"=>"XXX", "Name"=>"Base Salary", "Type"=>"Wage", "URI"=>"XXX"}, "Hours"=>nil, "Amount"=>nil, "IsCalculated"=>false, "Job"=>nil}]
}

 I append this to PayrollCategories

{
"Amount" => nil,
"Hours" => nil,
"IsCalculated" => true,
"Job" => nil,
'PayrollCategory'=>{
"Name" => "Unused Annual Leave",
"Type" => "Wage",
"UID" => "xxx",
"URI" => "xxx"
}}

and save.

API gives me this response.

 

{
"Errors": [
{
"Name": "Required",
"Message": "All payroll categories assigned to the employee must be included on standard pay.",
"AdditionalDetails": "PayrollCategories",
"ErrorCode": 100,
"Severity": "Error"
}
],
"Information": "Warning, error messages have not been finalised in this release and may change"
}

 

 

I am not sure what I am missing? Or if this is the correct way to update relationship between EmployeeStandardPay adding a new PayrollCategory

 

NOTE: I tried to modify the data i sent across i.e. just send over UID etc no matter what i send i get the same response back

 

 

Didn't find your answer here?
Try using advanced search to find a post more easily Advanced Search
or
Get the conversation started and make a new post Start a Post