softwerkab / fortnox-csharp-api-sdk

.NET SDK for Fortnox API.
MIT License
52 stars 64 forks source link

Attendancy #173

Closed abbekall closed 3 years ago

abbekall commented 3 years ago

Hi I just tried to get attendancy data for all employees. The problem is that I just get a small portion of data, no working time "Tid" and mostly causecode "OK0".

Is this a known issue or is there a quick fix?

Thanks!

richardrandak commented 3 years ago

Hello! I am not familiar with the TID module... can you try getting the data you want by using Postman? I mean, if the data you expect are not available that way, then there is nothing I can do in SDK.

abbekall commented 3 years ago

Hi! Thanks, are trying but stumple across, probably a simple miss from my side, this message just trying to grab some customers (xyz = my access-token)

curl -X "GET" "https://api.fortnox.se/3/Customers" -H "Authorization: Bearer xyz" -H "Content-Type: application/json" -H "Accept: application/json"

{"message":"unauthorized"}

what am I missing?

xpagedeveloper commented 3 years ago

Do you have the correct scope added?

abbekall commented 3 years ago

Hi, I can access the customers with the same token when using the SDK

Mvh Albert Winter (Från telefonen)

22 sep. 2021 kl. 07:37 skrev Fredrik Norling @.***>:

 Do you have the correct scope added?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

richardrandak commented 3 years ago

Which auth workflow have you used?

If your token is from old auth workflow (in GUID format), you need to add these two headers instead of the "Authorization" header "Access-Token" : "xyz" "Client-Secret" : "abc"

abbekall commented 3 years ago

Perfect, works like a charm. The problem still remains that I feel I get to few posts from attenadance. Cant seem to find most of the working time

From: richardrandak @.> Sent: Wednesday, 22 September 2021 10:15 To: FortnoxAB/csharp-api-sdk @.> Cc: abbekall @.>; Author @.> Subject: Re: [FortnoxAB/csharp-api-sdk] Attendancy (#173)

Which auth workflow have you used?

If your token is from old auth workflow (in GUID format), you need to add these two headers instead of the "Authorization" header "Access-Token" : "xyz" "Client-Secret" : "abc"

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/FortnoxAB/csharp-api-sdk/issues/173#issuecomment-924693077 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AR7QXIVMUGFGSZEOR6EAZ2LUDGGB5ANCNFSM5EOGWUNQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub . https://github.com/notifications/beacon/AR7QXIRWNC7GZ5FVDX7HUBTUDGGB5A5CNFSM5EOGWUN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOG4O3EVI.gif

richardrandak commented 3 years ago

Then I think you need to contact official Fortnox support. I don't have much knowledge of attendance endpoints to help you with this. It is possible these endpoints are limited. There was already an issue #151 where it seems the API does not cover all that is visible through the GUI portal.

abbekall commented 3 years ago

Yes, thanks for your help

Mvh Albert Winter (Från telefonen)

22 sep. 2021 kl. 15:46 skrev richardrandak @.***>:

 Then I think you need to contact official Fortnox support. I don't have much knowledge of attendance endpoints to help you with this. It is possible these endpoints are limited. There was already an issue #151 where it seems the API does not cover all that is visible through the GUI portal.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

richardrandak commented 3 years ago

You're welcome. Please let us know when you get some information regarding this issue.

richardrandak commented 3 years ago

Any update?

abbekall commented 3 years ago

Hi! No, nothing more then that the consider the service to work correctly but that it provides the correct info. So most either a bug or, most likely, some that cannot be fetched from the api.

Mvh Albert Winter (Från telefonen)

4 okt. 2021 kl. 18:04 skrev richardrandak @.***>:

 Any update?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

richardrandak commented 3 years ago

So there is nothing we can do.. once again :)

abbekall commented 3 years ago

Looks like it unfortuantly, but thank you for terrific help

Mvh Albert Winter (Från telefonen)

4 okt. 2021 kl. 20:58 skrev richardrandak @.***>:

 So there is nothing we can do.. once again :)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

richardrandak commented 3 years ago

I know this may be a stupid question.. but you know you can do pagination, right? By default there will be just 100 records. The beginning of the response should tell you how many records there are in total.

abbekall commented 3 years ago

Yes I do:)

Mvh Albert Winter (Från telefonen)

4 okt. 2021 kl. 21:17 skrev richardrandak @.***>:

 I know this may be a stupid question.. but you know you can do pagination, right? By default there will be just 100 records. The part of the response should tell you how many records there are in total.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.