3

I have downloaded the UPS apis for both shipping and rates. The zips contain multiple docs some of which are hundreds of pages long. The zips also contain sample code, however, they are missing information needed to run successfully, i.e. Url endpoints, location of wsdl files... etc.

I have found enough information looking through stackoverflow posts to make the sample code work, though I am at a loss as to how I would build out my own soap calls needed for my business logic.

I have looked through the .wsdl files and cannot determine what parameters need to be sent and what options/methods are available to call.

For example, in the sample code there is the following:

  $option['RequestOption'] = 'Shop';
  $request['Request'] = $option;

If I change Shop to another value I receive an error saying invalid request. Is this the only request that can be made for the Rate service? Where do I find the available requests to choose from and the data expected / returned?

Another example is the operation value: $operation = "ProcessRate"; In the wsdl I have found ProcessRate though there is very little information about input/output... unless im missing something

<wsdl:operation name="ProcessRate"><soap:operation soapAction="http://onlinetools.ups.com/webservices/RateBinding/v1.1" style="document"/><wsdl:input name="RateRequest"><soap:body parts="Body" use="literal"/><soap:header message="tns:RateRequestMessage" part="UPSSecurity" use="literal"><soap:headerfault message="tns:RateErrorMessage" part="RateError" use="literal"/></soap:header></wsdl:input><wsdl:output name="RateResponse"><soap:body parts="Body" use="literal"/></wsdl:output><wsdl:fault name="RateError"><soap:fault name="RateError" use="literal"/></wsdl:fault></wsdl:operation>

My goal is to make a call to determine shipping costs based on the amount of items a user has purchased. Any info / direction would be greatly appreciated!

Shawn Northrop
  • 5,826
  • 6
  • 42
  • 80
  • Can you provide links to where you downloaded the docs from? – Luke Shaheen Apr 01 '13 at 20:51
  • 2
    https://www.ups.com/upsdeveloperkit – Shawn Northrop Apr 01 '13 at 20:54
  • 1
    You need to register to access, I can provide these zips if needed / makes it easier – Shawn Northrop Apr 01 '13 at 20:54
  • I didn't succeed to make the request work with SOAP calls (no endpoints indeed...) but it does works through cURL with PHP. I simply send the json request, which is more convenient for me. For the record, odd thing is that I have to make my request header as "plain-text" instead of "json". – tomsihap Dec 06 '16 at 14:45

1 Answers1

3

Have you checked out their Developer Resource Center?

It provides links to:

Contact for UPS Developer Support

Send UPS an email with your question and attach a file with your code and error messages using the link below. Our goal is to reply to your message within four hours during support business hours: Monday through Friday, 8 a.m. - 9 p.m. EST. E-mail UPS

You might get better/quicker support through one of the above channels.

Luke Shaheen
  • 4,262
  • 12
  • 52
  • 82
  • Yea I've given them a once over. I'm sure I will have to dig deeper, just want to be heading in the right direction. I've worked with many api's before this one seems very poorly documented / difficult to use. Seems like a logical place to ask questions though :) thx! – Shawn Northrop Apr 01 '13 at 20:56
  • @ShawnNorthrop Sure, just wanted to make sure that you checked out all their different support avenues. For something as specific as this, you might get better quality, or quicker, support by checking out their own forums or emailing their tech support. – Luke Shaheen Apr 01 '13 at 20:57