Create PHP Script Pulling Shipping Cost from UPS API

Job ID: 36950950

Budget: $20 – $150 USD

I need to calculate shipping costs by using the UPS API. I want one simple page example of sending UPS the Origin, Destination, Weight of Package, and then retrieve the shipping cost for Same Day, 2-day, Regular Shipping Options.

First you need to install the UPS API with composer.

Then, create a function that uses UPS API to calculate the shipping rate and return it on the page.

For example:

getShippingRate($from_zip,$to_zip,$weight) {

// Your code here to Send info to UPS API, and Retrieve the Rate and Options:
// ...........
// ...........

// Then put the results in an array to return:
$array['...']...... /// Contains the calculated rates for each of the shipping options.

return $array;
}

So, then I will simply be able to do this:

// Where package is sent From
$origin = "{From-ZipCode}"

// Destination
$destination = "{To-ZipCode}";

//Package Weight (or whatever else is needed to get the shipping rate)
$weight = "2.4"; // 2 pounds, 4 ounces

$rate = getShippingRate($from_zip,$to_zip,$weight);

print_r($rate);

// Expected Result:

Array
(
["Same-Day"] => Array
(
[Type] => "Same Day"
[Cost] => "54.23"
)

["2-Day"] => Array
(
[Type] => "2 Day"
[Cost] => "34.23"
)

["Ground"] => Array
(
[Type] => "Ground"
[Cost] => "14.23"
)

)

So I believe this can be done in 1 or 2 pages. Then I can easily understand how to use it.

I need someone who is GREAT at working with API's and can get this done quickly, it should only take an experienced person a few hours to get this done I believe. If you agree and have read this please say I agree.

Thank you for your bids.

Tony
Related categories: PHP Software Architecture API