How to Implement UPS API and Create Shipping Label

To implement UPS api on your website credential required like access number, username and password. Get access number from UPS account.

Steps to Implement UPS API:

Step 1: Let me explain with an HTML Form example, which you can use your website for post shipping and billing information.

Step 2: Now after submit the form action move to postshipping.php file. In this file check if create_xml hidden input post. Than create an XML for UPS shipping request.

In above postshipping.php new shipping information for UPS api created with the name of “Accessrequest.xml

Step 3: Now you can use this xml data in another php file newship.php

Use this above sample code to create UPS shipping label.

Recommended Posts For You

About Harish

I am professional web developer and blogger. Use this blog to share own api and other web development experience with you. I do accept paid work. Write to me at - [email protected]

View all posts by Harish

11 thoughts on “How to Implement UPS API and Create Shipping Label”

  1. Unfortunately ups_ship_confirm doesn’t have a provision for it in their simply xml request. I do see it in the more complicated version that requires a php soap extension.

  2. I check UPS official API documentation. Now I have find the LTL but not able to find GFP. How to find GFP? what is the service code for GFP?

  3. Hi Harish,
    Having an issue with the Ajaxsubmit.php. I’m getting Missing or invalid shipment digest.
    Any ideas?

    [ResponseStatusCode] => 0
    [ResponseStatusDescription] => Failure
    [Error] => SimpleXMLElement Object
    (
    [ErrorSeverity] => Hard
    [ErrorCode] => 125000
    [ErrorDescription] => Missing or invalid shipment digest.
    )

  4. I was using sandbox url with live ids, now I have updated live URLs and new error message is

    Array ( [0] => Array ( [0] => Customer Comment0FailureHard125000Missing or invalid shipment digest. ) [1] => Array ( [0] => Customer Comment0FailureHard125000Missing or invalid shipment digest. ) )

Leave a Reply to Matthew Cancel Reply

Your email address will not be published. Required fields are marked *