OneSpan API call result
Friday, May 12, 2023 at 01:26pmHi Duo, when I use GET Packages API call response says I have total of X Packages but if I use GET account usage it tells me I have Y Packages and Y is almost double value of X. I need accurate "counts" . . . Thx Mike
Reply to: OneSpan API call result
Friday, May 12, 2023 at 02:00pmHi Mike,
Are you trying the GET packages API (GET /api/packages?lastUpdatedStartDate=2020-01-01&lastUpdatedStartDate=2023-05-12) against either of below usage APIs?
GET /api/reports/usage?from=2020-01-01&to=2023-05-12
GET /api/reports/sender-transaction-summary?startDate=2020-01-01&endDate=2023-05-12&from=1&to=20&senderId=
GET packages API only retrieves the transactions created by the API key/token holder, while the usage report API retrieves packages of all senders under the account, that's probably why you are seeing more amount of packages with usage API.
Duo
Reply to: OneSpan API call result
Friday, May 12, 2023 at 04:24pmHi Duo, I think you've explained why I had a difference ... :)
Regarding your Report related API calls with from/to parms and startDate/endDate that use "=" operator, can other relational operators be used? ( > < >= <= )
Is there an Account "owner" group so an Account can have more than owner?
Mike(C)
Reply to: OneSpan API call result
Monday, May 15, 2023 at 07:27amHi Mike,
For your questions:
-OSS APIs only support "=" operator in API parameters.
"?startDate=2020-01-01&endDate=2023-05-12" implies start date >= 2020-01-01T00:00:00Z (GMT timezone) and end date <= 2023-05-12T23:59:59Z (GMT timezone)
-No, an account only has one account owner. May I know the reason why you are asking this?
Duo
Reply to: OneSpan API call result
Monday, May 15, 2023 at 08:57amHi Duo, thx for your info. Regarding single owner of account question, my understanding is if you are Account owner, some API calls allow you to count ALL packages regardless of ownership vs if you are not owner, you must sum package counts from each owner.
Reply to: OneSpan API call result
Monday, May 15, 2023 at 09:05amHi Mike,
I see. Unfortunately for GET packages API (GET /api/packages?lastUpdatedStartDate=2020-01-01&lastUpdatedStartDate=2023-05-12&[email protected]), you will always have to sum packages from each sender due to the nature of the API.
Reporting APIs, on the other hand, requires the API user to have MANAGER type (or equavelent permissions if your account has Roles&Permissions turned on), it doesn't make difference if the API key holder is account owner or manager type.
Duo