PHP SDK Lookup API and SMS Pricing - php

I would like to validate a phone number and get the price that it would cost to send a SMS to that phone number.
I can do this with 2 API calls, however according to https://www.twilio.com/docs/sms/api/pricing you can do this with 1 call? "Prices can be retrieved at a country level directly via the Pricing Messaging Countries resource or for a specific phone number by leveraging the Lookup API and Pricing Messaging Countries resource.".
Am I overlooking something? or can this not be done?

I'm Matt from Twilio's PHP content team. I've been looking through V2 of the Lookup API but don't see anything to do with it returning pricing information. That said, I'll take it up internally to find out more for you.

Related

is there a way to retrieve ad cost for an ASIN using Amazon Advertising API?

For last couple of days I am digging into Amazon advertising api and looking for a solution to find advertising cost using ASIN and Amazon Advertising API. The closest I could find is this Campaign Report.
It returns a list of campaigns with campaign id and cost per campaign. But Ideally, I would like to pass parameters like ASIN and a date or a date range, to retrieve the advertising cost.
Alright, I found a way to deal with this problem. There are different reports available with the api and sponsoredProducts solved my problem. It returns asin, impression, clicks and cost etc for a particular date.
I also used a github library, which made it very easy to work with the Advertising api. I'd surely recommend using this one -
https://github.com/amzn/amazon-advertising-api-php-sdk#requestreport

Amazon MWS PHP-API Access and Print Out Packing List

How do I use Amazon MWS with PHP to access and print out packing lists? What is the process, and if possible what are the steps? Examples would be helpful.
Because you're talking about MWS and "packing lists", I assume the following to be true:
You are an Amazon Seller
You are sending out packages yourself (MFN / merchant fulfillment), and not using AFN / FBA (Fulfillment by Amazon)
To create packing lists, you will roughly have to do the following:
Fetch the "OrderReport" from the Amazon MWS Servers. The returned XML will contain details for your all outstanding orders including: shipping address, quantities, SKUs and product names.
Confirm the reception of those orders through the "OrderAcknowledgment" API call
Use above data to create pretty HTML files, images, PDF files or whatever else that can be printed as packing lists
While you're at it, you may want to look at the "OrderFulfillment" call. This lets Amazon know that you've actually shipped.
The sample PHP code you linked should help you with steps 1 and 2.
(for future reference: sample client code in PHP,C# and Java is available at https://developer.amazonservices.com/ . Follow the API documentation links to get current versions)
I am a little confused by your question because of the use of packing lists.
Amazon makes labels available, but the labels are used to differentiate between multiple sellers of the same SKU, and is not a packing list in and of itself. Amazon generates their own packing list when an order is placed for AFN orders, and MFN orders are send to you for processing via your own process.
However, assuming you are looking for the Amazon labels I took a quick look through all the API's and did not see any information on printing them. As far as I know this is only available through seller central, however if any API does that functionality it would be the feeds API.
I would suggest creating an account on https://sellercentral.amazon.com/forums/forum.jspa?forumID=35 and asking the folks there - several Amazon Employee's monitor that forum and Oneida Books is the resident guru and can pretty much answer anything API related.

Instant UPS tracking Number

I have a client that has a shopping cart. She wants to implement a module that allows the end user to receive a tracking number immediately after purchase.
I am not too sure if this is possible. My concept is that after the store owner ships the purchase, that's when the store owner receives a tracking number that he/she can give to the purchaser. And the purchaser then can start tracking their package.
I guess my question is... "Is it possible to generate a tracking number to give to the purchaser before the store owner even bothers to wrap up the order and send it out.This is so the purchaser can automatically start tracking their purchase and the store owner doesn't have to manually give them a tracking number." ?
I know this would have to require the api. I just need to know if this is possible before I start investing alot of time in trying to build it.
She is using Magento for her shopping cart service.
You can use what's called a tracking reference.
From UPS:
When you create a shipment, you can
assign a shipment reference that helps
you track quickly and with ease. This
reference can contain up to 35
characters in any combination of
letters and numbers
http://www.ups.com/content/us/en/resources/track/check/#Track+by+Reference
UPS will store this reference number in its system so that you can have customers track with that instead. They will need to click Track By Reference in the Track Packages & Freight tab.
It's "possible" in that way that everything in software is possible. There's nothing built-in or third party that I know of that would build this functionality into a system though. My experience with the UPS shipping API says that even if you created a UPS shipment at the time of ordering, there's a non-deterministic delay before the actual shipping code is created. See mention of tracking reference in this thread.
If you want to move forward with this, it means creating your own tracking system. Immediately after generating an order you also generate a unique tracking number, and a tracking URL. This URL points at your system, and returns a page that lists ou;t any UPS, FedEX, etc tracking numbers that are in the system for that order. If the order hasn't received its number yet, you list a message like "at source warehouse" instead.
Good luck, ERP and fulfillment integration is always a bear.
As far as i think Magento has built-in support for such tracking services.
Dont remember if it supports UPS but i guess it does.
Otherwise use the UPS Developer API and play around with their web services.
And for the advance tracking number as you require that feature is also implemented in Magento for shipping packages as well as order tracking etc...
PS: I observed these in Magento 1.4+
You can get bundles of shipping forms with fields such as your business name, address, account etc that are prefilled. These bundles also have sequenced tracking numbers.
You would have to get these bundles and upon receiving them enter the starting number and ending number of the stack into a database. From there the person packing the order must be careful to use the correct form with the order.
If you interface with ShipWorks and set it up with your UPS account, it both creates your UPS shipping label, gets the shipping charge and posts the UPS tracking number back to Magento. Very smooth integration.

How do I identify orders with the Google Checkout Notification API (using PHP)?

I am using the Google Checkout API to code a simple store. I have gotten as far as letting the user select items, edit the cart, and checkout/pay with Google Checkout. The notification API (with XML) is being used to read notifications sent by Google after receiving orders. How can I connect the order notifications with the orders information in my SQL database? Can I send an "order ID" or something like that to Google with the initial order? I have coded that portion (ordering) with the HTML API.
Thanks in advance!
When an order is placed, a notification is made giving you a serial number for the order. You need to store this serial number in your database against whatever internal order number you have, so that you can use the serial number to refer to the order with Google Checkout via the Notification API.
No. Notification and Polling are two separate concepts.
Notification is when Google Checkout sends you info as it occurs, and Polling is when you send a request for sale details at some time in the future.
Documentation for Polling is lacking on-line. That is why you - and I - have not found the answer.
Google sends an e-mail when a sale is made (or when something goes wrong with a payment), and it stores some detail in your dashboard. You can use the date or the number to Poll for the rest of the details. Exactly how to do that is lacking in the on-line documentation.
Use the merchant-private-data field to pass any custom data about your order.
When you get back the notification, read the custom info from the merchant-private-data field.
See this answer for a solution to a similar issue.

How can I get a phone number customers can sms to that posts the information to my website?

i need an sms service that can gives me a phone number and then my customers can send me sms to that number. then posts the sms information to my website like http://xx.com/newsms.php?body=hey
Thanks
Twilio recently released a SMS API. With Twilio you can:
Get a unique phone number (not a keyword at a shared short code).
Easily connect it via a HTTP POST
It's ridiculously simple. Check out the API.
Try www.textmarks.com - they got a PHP API as well.
If the content can be public or semi-public you might consider using Twitter, which allows various ways of posting via SMS. Their API lets you do pretty much whatever you want with the resulting feed.
An upside of this could mean extra exposure for your site, depending on how you implement it. This is especially true if any of your customers happen to be heavy Twitter users. Also, people would be not be limited to SMS, but could post via web or twitter apps.

Categories