Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > Wrapper libraries >

Node SDK - accessing Payroll endpoints

Started by Matt Kelley -   in Wrapper libraries

The SDK says is provides generic methods to access unsupported endpoints

all accounting endpoints
generic methods (get, put, post, delete) for calling any unsupported endpoints"

Can someone show me how this would work for payroll endpoints using the xero-node SDK? I just can't seem to figure it out.
Hi Matt

I checked into it. Looks like it was generic accounting endpoints (aka not payroll).

I have added a test for the accounting ones here: https://github.com/XeroAPI/xero-node/commit/68c888122e994f94473772d56ff3f0248210d61b

We can make it generic enough for Payroll. I'll see if I can do it, however won't have time until next week. In the mean time I have updated the ReadMe to reflect this.

I think the issue is how we use this line here: https://github.com/XeroAPI/xero-node/blob/master/src/internals/config-helper.ts#L36

We just need to hoist it to a higher level.

Sorry about this oversight. Will try to have it fixed next week.

Phil Alsford (Xero Staff)  


Thanks for the speedy response and clarification, that's wonderful news!

Matt Kelley  

Hold on to your hat! I have the feature in coming!


Just getting someone else to check over it.

I have added an example of how to do it here: https://github.com/XeroAPI/xero-node/pull/195/files#diff-cbd73df06774b69cb0ef4237cd84829aR5

Phil Alsford (Xero Staff)  

Give 3.0.2 a spin now. Should work with Payroll. You will have to add scopes manually though.

Phil Alsford (Xero Staff)  

You guys are awesome! Thanks again!

Matt Kelley  

Bro, Can i get sample project ?

Saravanan Rajamanickam  

I want sample project for c# Payroll API

Saravanan Rajamanickam  

Hi Saravanan. For .NET please check out our .NET SDK: https://github.com/XeroAPI/Xero-NetStandard

Phil Alsford (Xero Staff)  

Yes i am using the same source. But unable to use POST AU Payroll API. getting 500 error. and api previewer also not working

Saravanan Rajamanickam