UPS WorldShip sample program integrates with both Volusion API and UPS WorldShip XML Auto Import. This program retrieves orders that are ready to ship from the Volusion API and generates XML files to be imported in UPS WorldShip. The program is divided into two steps as shown below.

Step 1: Volusion API Request

api_url = "http://YourUrl/net/WebService.aspx?Login=YourEmail@YourDomain.com&EncryptedPassword=YourPassword&
API_Name=Generic\\Orders&SELECT_Columns=o.OrderID,o.CustomerID,o.OrderStatus,
o.ShipAddress1,o.ShipAddress2,o.ShipCity,o.ShipCompanyName,o.ShipCountry,
o.ShipDate,o.ShipFaxNumber,o.ShipFirstName,o.ShipLastName,o.ShipPhoneNumber,
o.ShippingMethodID,o.ShipPostalCode,o.ShipResidential,o.ShipState,od.ProductCode,
od.ProductID,od.ProductName,od.ProductPrice,od.ProductWeight,od.Quantity&
WHERE_Column=o.OrderStatus&WHERE_Value=Ready%20to%20Ship";

xml_http = new XMLHTTP();
xml_http.open("POST", api_url, false, "", "");
xml_http.send(null);
api_response = xml_http.responseText;

Step 2: Generate UPS XML File(s)

After the XML response has been parsed, a XML file must be generated in the XML Auto Import folder. The default XML Auto Import folder is usually in C:\UPS\WSTD\IMPEXP\XML Auto Import\. Otherwise, this can be verified under UPS WorldShip > UPS OnLine Connect > XML Auto Import.

<OpenShipments xmlns="x-schema:OpenShipments.xdr">
  <OpenShipment ShipmentOption="SC" ProcessStatus="">
    <ShipTo>
      <CustomerID />
      <CompanyOrName>Company Name</CompanyOrName>
      <Attention>Name</Attention>
      <Address1>1234 Address</Address1>
      <Address2 />Suite 1<Address3 />
      <CountryTerritory>United States</CountryTerritory>
      <PostalCode>90001</PostalCode>
      <CityOrTown>Los Angeles</CityOrTown>
      <StateProvinceCounty>CA</StateProvinceCounty>
      <Telephone>3231112222</Telephone>
      <FaxNumber>3231113333</FaxNumber>
      <EmailAddress />
      <TaxIDNumber />
      <ReceiverUpsAccountNumber>999999</ReceiverUpsAccountNumber>
      <LocationID />
      <ResidentialIndicator>1</ResidentialIndicator>
    </ShipTo>
    <ShipmentInformation>
      <VoidIndicator />
      <ServiceType>Ground</ServiceType>
      <PackageType>Package</PackageType>
      <NumberOfPackages>1</NumberOfPackages>
      <ShipmentActualWeight>2</ShipmentActualWeight>
      <DescriptionOfGoods>Regular Shipment</DescriptionOfGoods>
      <Reference1>1026</Reference1>
      <Reference2>108</Reference2>
      <Reference3>UPS</Reference3>
      <DocumentOnly />
      <GoodsNotInFreeCirculation />
      <SpecialInstructionForShipment />
      <ShipperNumber />
      <BillingOption>PP</BillingOption>
    </ShipmentInformation>
  </OpenShipment>
</OpenShipments>
Did this answer your question?