How to design API for reports - api

Hi and thanks in advance for ideas.
I have an api endpoint to design which is a report of tickets.
The report itself needs to accept up to 8-10 parameters like start / end date
or start / end product group.
The report then is fairly simple ( Van number, product, quantity ) group by van & product
The API endpoint should represent a resource ( so it would be tickets ) however that would force the API consumer ( a webpage in this scenario ) to calculate the total quantity on frontend.
So I wonder what is the correct pattern here?
Is creating an endpoint for such report wrong way of doing it?
Should I create /tickets/vanloading?startDate=2021-06-28&endDate=.........
What is general approach for different kind of reports when implementing API when there is plenty of data to aggregate ?
Thank you.

Related

Google Analytic dimensions different from web to API

I have a strange error that i am not sure how to handle.
We have GA monitoring a non-English website ( we are a global brand) and some of the campaign values in GA have the native language ( in this case symbols). So when we do custom channel grouping in GA any campaign that matches the criteria goes into this custom grouping. (the channel grouping is set up using something like campaign like 'KOREAN LANGUAGE HERE').
However when i fetch the data via the API for custom channel groupings the data for this row/campaign is not the Korean value but a simplified English value. I've matched the rows due to the transactions/users/session counts - its the same row.
What on earth is going on? Does google provide a name/title type of framework for campaigns? Is it translating the custom channel grouping somehow?
Any help appreciated.

Linkedin REST API - likes and comments

We are using Linkedin REST API and we need to get the number of likes and comments from owned companies updates. The method get-updates always returns the last 3 likes/comments and also the total is 3, even if you have more than 3. So in order to get all the likes/comments of the updates we have to make a query to each update because that way we get all the likes/comments. But this is not a good method because if I have 100 updates then I have to do 101 api calls and a user has a limit of 700 per day, so they are very easily get depleted. We really find it hard to believe there is no way your API doesn't solve the n+1 problem. So how can it be done?
Thank you!
if you hit this URL -> "https://api.linkedin.com/v1/companies/{id}/company-statistics", provided if you have the id of the company page.
you can get the likes,clicks,impressions,engagement,shares,comments in month break up wise.
For more info
LinkedIn API Company statistics data

No way to get per-transaction commission fee in new Yodlee API? (/ysl/restserver/v1)

I was trying to extract commission cost at a per-transaction basis, this field does exist in old Aggregation style api but not in new API data model.
Any suggestions / alternative solutions?
Can you please explain in detail-
-End-point url which you are using in the old API.
-The field details in the response , which returns the required commission cost.
So this will help us to give you suggestions accordingly.
Regards,
Krithik

Is there an API limit to product rules on a Bigcommerce customer group?

Does anyone know if there is a limit to the number of product rules that can be applied to a customer group using the API?
I am able to set 1474 before it starts to return a status 400.
There isn't a hard limit on the number of rules a customer group can have, but it does start to act up once you get into that range.
If you can provide some context to what functionality you are looking to accomplish, I can try to provide a workaround.

ebay getOrders API

I am building a .net service to getOrders from ebay. my service runs fine, however I dont know how should I handle data.
For example I am using CreateTimeTo and CreateTimeFrom Filter to return orders from past 24 hours. I save them into my database, now some orders return no Address info.
My question is, Whats the best way to hadnle/update already imported orders into my database. Say for example order imported into my system wa without shiping info, and customer completed shipping info after a week, how would I update that order in my system?
Thanks
I would definitely use modtimefrom modtimeto filter. Ih this way you can get all order that have been modiefied in last "x interval". This way you will get either new orders and modified (checkout complete - paid - shipped) and so on. My favourite filter anyway is NumberOfDays. This one acts as ModTimeFrom/ModTimeTo but is way more simple and you don't have to deal with dates.
An order without address means buyer has not completed checkout (no payment selected so no shipping address as well yet).
Once buyer completes checkout or order is mark as paid the entire address will be avaible.
You can get buyer default address shipping by using call GetSellerTransaction
I hope i understood your question and to be helpful.