mikcanf

OneSpan API call result

0 votes

Hi 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

0 votes

Hi 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

 

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: OneSpan API call result

0 votes

Hi 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

0 votes

Hi 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

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: OneSpan API call result

0 votes

Hi 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

0 votes

Hi 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

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off