FedEx and UPS Tracking API - fedex

Anyone familiar with either the FedEx or UPS APIs. Is it possible to calculate the "guaranteed delivery date" of a package. I want to be able to tell if a package arrived late.
Thanks

You have to use the Tracking API and the response will contain this information formatted in XML. I think the property is 'OrderStatus', and the code for Delivered is '011'. You should download the UPS Shipping API and read the Track specifications and examples.
As far as the 'guaranteed delivery date', it seems to only be available for UPS Freight LTL Guaranteed (most UPS options does not guarantee) You can however compare the /TrackResponse/Shipment/**ScheduledDeliveryDate** (and Time) to the /TrackResponse/Shipment/DeliveryDetails/**DeliveryDate**/Date.
And, it seems to follow that if the shipment has a guaranteed date, then Scheduled date should equal the Delivery Date.

Related

Quota exceeded for quota metric 'Requests' and limit 'Requests per minute' of service 'mybusinessbusinessinformation.googleapis.com' for consumer

I'm trying to collect and update data using the Business Information API.
In order to get the API Calls to work, I'm only trying to get information from my business by using "Get-requests". However when calling several methods, I keep receiving the following errors:
"Quota exceeded for quota metric 'Requests' and limit 'Requests per minute' ".
Both in the Postman-calls or the OAuth 2.0 Playground (which in my eyes: should be a sandbox, ready for testing - very frustrating…).
When I look for my quota in the API settings: I'm not even able to change the requests per minute other than '0'. This makes it really hard to test/use the API.
I can't even find out which categories there are for a business location… 
For your information: I've already asked for increase of the quota using the forms. But it seems google isn't really responsive in this matter.
Can this be solved?
The API shall be used to update a group of 50 (or more) locations, this instead of bulk-editing with a csv-file.
Any help would be welcome.
Thanks in advance,
Kind Regards,
Seppe
If the quota approval form was ignored, you might still have a chance via the API support (https://support.google.com/business/contact/api_default).
They might be reluctant to grant you a quota if your maximum location count is this low though - the API is designed for larger use cases.
Is it documented anywhere that it's meant for larger users? I got approved being very clear it was only for a handful of locations.
BUT even though I got approved and have access there are 3 specific quotas (all per-minute) that are set to zero, even though I have tonnes of allowance for all the non-per-minute quotas. Seems like a bug to me.
I can make 10000 "Update Location requests per day" but zero per minute.

Applying for Additional Quota for YouTube API as an Individual (without business info)

I recently began using the Youtube Data v3 API for a program that I'm writing which is purely for personal use. To give a brief summary of what it does, it checks the the live chat from my most recent (usually ongoing) livestream and performs actions based on certain keywords entered in chat (essentially commands for people to use from live chat). In order to do that, however, I have to constantly send requests to get a refreshed livechat. As it is now, it sends requests on 1 second intervals. I recently did a livestream to test out my program and it only took about 25 minutes for me to reach the daily quota limit of 10,000 units/day.
The request is:youtube.liveChatMessages().list(liveChatId=liveChatId,part="snippet")
It seems like every request I make costs 6 units, according to the math. I want to be able to host livestreams at lengths of up to 3 hours, which would require a significant quota increase. I'm aware that there is an option to fill out a form to request additional quota. However, it asks for business information such as a business name, business website, business mailing address, etc. Like I said before, I'm doing this for my own use only. I'm in no way part of a business, and just made my program as a personal project. Does anyone know if there's any way to apply for additional quota as an individual/hobbyist? If not, do you think just putting n/a in those fields would be acceptable? I did find another post where someone else had the exact same problem, but no one was able to give a helpful answer. Any advice would be greatly appreciated.
Unfortunately, and although only related, it seems as Google is for the money here. I also tried to do something similar myself (a very basic chat bot just reading the chat messages), and, although some other users on the net got some different results, they all have in common that, according to the doc how it should be done, all poll at this interval of about once a second (that's the timeout one get as part of the answer to a poll for new messages). I, along with a few others, got as most as about 5 minutes with polling once a second, some others, like you, got a few more minutes out of it. I changed the interval by hand in incrementing intervals of 5 seconds each: 5, 10, 15, etc... you get the picture. I can't remember on which value I finally tuned in, but I was only able to get about 2 1/2 hours worth with a rather long polling interval of just once every 10 seconds or so - still way enough for a simple chat bot just reading the chat. But also replying would had at least doubled the usage and hence halfed the time.
It's already a pain to get it working as an idividual as just setting up the required OAuth authentication requires one to at least provide basic information like providing a fixed callback and some legal and policy information. I always ended up in had it rejected with this standard reply "Your project seem to be for internal use only.". I even was able to got this G suite working (before it required payment) to set up an "internal" project (only possible if account belongs to a G suite organization account), but after I set up the OAuth login I got the error that my private account I wanted to use the bot on was not part of the organization and hence can't be used. TLDR: Just useless waste of time.
As far as I'm in for this for several months now there's just no way to get it done as a private individual for personal use. Yes, one can just set it up and have the required check rejected (as it uses the YouTube data API scopes), but one still stuck with that 10.000 units / day quota. Building your own powerful tool capable of doing more than just polling once every 10 to 30 seconds with just a minimum of interaction doesn't get you any further than just a few minuts, maybe one or two hours if you're lucky. If you want more you have to set up a business and pay for it - simple and short: Google wants you to pay for that service.
As Mixer got officially announced to be shut down on July 22nd you have exactly these two options:
Use one of the public available services like Streamlabs, Nightbot, etc ... They're backed by their respective "businesses" and by it don't seem to have those quota limits (although I just found some complaints on Streamlabs just from April - so about one month prior to when you posted this question where they admitted to had reached their limits - don't know if they already got it solved).
Don't use YouTube for streaming but rather Twitch - as Twitch doesn't have these limits and anybody is free to set up an API token either on the main account or on a second bot account (which is also explicitly explained in their docs). The downside of this are of course the objective sacrifices one has to suffer: a) viewers only have the quality of the streamer until one reaches at least affiliate b) caped at max 1080p60 with only 6.000kBit/s c) only short time of VOD storage
I myself wanted to use YouTube as my main platform (and currently do, but without my own stuff at the moment) and my own bot stuff and such as streaming on YouTube has some advantages over Twitch, but as YouTube wants me to pay what others (namely: Twitch) offer me for free (although overall not as good quality) it's an easy decision to make. Mixer looked promissing, as it also offered quite some neat features (overall better quality than Twitch, lower latency), but the requirements to get partner status were so high (2.000 followers along with another insane high number to reach) and Mixer itself just so little of a platform (I made the fun to count all the streamers and viewers - only a few hundred streamers with just a few 10.000s viewers the whole platform had less than some big Twitch channels on their own) - and now it's announced soon to be dead anyway.
Hope this may give you some input into what a small streamer has to consider and suffer from when chosing a platform - but after all what I experienced I have these information: Either do it like all the others: Stream on Twitch and use YouTube as an archive to export to from Twitch (although Twitch STILL doesn't have an auto-export of the latest VOD implemented - but I guess that could be done by some small script) - or if you want to stay on YouTube use some existing bot like Nightbot or any of the other services like Streamlabs.
If you get any other information on how to convince Google to increase the limit as an individual please let us know.

Youtube API liveChat messages Quota Limit way too low

I am implementing an application that should react to live chat messages.
In a first test I simply called https://www.googleapis.com/youtube/v3/liveChat/messages to get the chats and author details (parameter part=snippet,authorDetails). The response indicates pollingIntervalMillis: 1000 so in theory I could call the API every second. However my little manual testing (without automated polling) already used a stunning 120 Quota Usage out of a 10.000 daily limit?
Am I doing something wrong?
Will I get lower usage if I specify something like a fields parameter to only ask for the needed data (message text + author name)?
I have the feeling to have missed some important thing to cut down the quota usage? Or is this simply not a supported use case?
Is there something like a streaming API that pushes new messages to my server?

In Twilio, what are "monitor-reads" and "monitor-writes"?

This morning I saw two event triggers in my account that I never saw before, and don't think were there last night. I don't know what they mean. I'm sure the words have meaning to the people at Twilio, but clicking help on Twilio brings me to stack overflow. The https://www.twilio.com/console/usage/triggers page shows the following:
FRIENDLY NAME USAGE CATEGORY CURRENT VALUE TRIGGER VALUE FREQUENCY LAST FIRED
Nearing monitor-reads free tier (5000). Consumed 4000 monitor-reads 0 4,000.00 ---
Nearing monitor-writes free tier (10000). Consumed 8000 monitor-writes 0 8,000.00 ---
Clicking on the event gives me no idea what it's talking about either.
CURRENT VALUE
0
LAST FIRED
Never
USAGE CATEGORY
monitor: reads
TRIGGER VALUE
4,000.00
TRIGGER BY
count
I search the words in Twilio to see what that means and found this but I still have no idea what it means either. Hoping one of the Twilio support people see this here.
Twilio developer evangelist here.
The monitor-reads and monitor-writes events refer to the Audit Events that you can have switched on for your account. The help article you linked to is actually out of date, particularly where it says everyone is opted in automatically (and I am working to get the article updated).
A better description of Audit Events comes from this page, which says:
Audit Events (previously known as Monitor Events) is designed to give Information Technology (IT) and Information Security (Info-Sec) teams detailed operational insight into their Twilio utilization. This feature is most beneficial to those with IT compliance and security requirements - eg storing detailed change logs for forensic analysis and security reviews. However, this feature is not beneficial, or needed, by most of Twilio’s customers.
If you need to track configuration changes within your Twilio project because of security and compliance requirements, please opt-in to Audit Events. Note that you will be charged for Audit Events written, stored, and read via the API.
I've also discovered that we do generate the triggers that you are seeing, even if you are not opted in. We are working to change that and avoid this confusion in the future.
All you need to know is that you are not automatically opted in to Audit Events and those triggers will not affect you unless you decide to opt into Audit Events in the future.

Pattern for recording the price of Twilio phone calls

Would like to maintain a local record of the price of all the phone calls that my application makes.
Am not sure what a good pattern for this would be. It looks like the price is not available in the arguments provided during the status call back when the call is closed. I assume this means I'll need to query Twilio's servers to find the price of the call. Can I do this immediately or do I need to wait a certain amount of time for the price to populate?
Is there another pattern that would be simpler, require fewer steps, or be less error prone that I am not seeing here?
Thanks!
Twilio evangelist here.
I'd recommend checking out the Usage Records API. These handy API's give you an easy way to get rollup data for your account, like how much your account spent yesterday, or how many outbound calls it made.
You can also set up Usage Triggers to proactively notify you when threshholds are met.
Hope that helps.

Resources