Skip to content

Instantly share code, notes, and snippets.

@jonnyeom
Created May 9, 2018 19:36
Show Gist options
  • Save jonnyeom/b150fe8d1ad5dfc95242418dc8a265ed to your computer and use it in GitHub Desktop.
Save jonnyeom/b150fe8d1ad5dfc95242418dc8a265ed to your computer and use it in GitHub Desktop.
A Sample UPS XML Request from their docs
<?xml version="1.0"?>
<AccessRequest xml:lang="en-US">
<AccessLicenseNumber>Your Access License Number</AccessLicenseNumber>
<UserId>Your Username</UserId>
<Password>Your Password</Password>
</AccessRequest>
<?xml version="1.0"?>
<ShipmentConfirmRequest xml:lang="en-US">
<Request>
<TransactionReference>
<CustomerContext>Your Customer Context</CustomerContext>
</TransactionReference>
<RequestAction>ShipConfirm</RequestAction>
<RequestOption>validate</RequestOption>
</Request>
<Shipment>
<Shipper>
<Name>Shipper Name</Name>
<AttentionName>Shipper Attn Name</AttentionName>
<CompanyDisplayableName>CompanyDisplayableName</CompanyDisplayableName>
<PhoneNumber>1234567890</PhoneNumber>
<ShipperNumber>Your Shipper Number</ShipperNumber>
<TaxIdentificationNumber>1234567877</TaxIdentificationNumber>
<Address>
<AddressLine1>AddressLine1</AddressLine1>
<City>City</City>
<StateProvinceCode>StateProvinceCode</StateProvinceCode>
<PostalCode>PostalCode</PostalCode>
<CountryCode>CountryCode</CountryCode>
</Address>
</Shipper>
<ShipTo>
<CompanyName>CompanyName</CompanyName>
<AttentionName>Ship To Attn Name</AttentionName>
<PhoneNumber>1234567890</PhoneNumber>
<Address>
<AddressLine1>AddressLine1</AddressLine1>
<City>City</City>
<StateProvinceCode>StateProvinceCode</StateProvinceCode>
<PostalCode>PostalCode</PostalCode>
<CountryCode>CountryCode</CountryCode>
</Address>
</ShipTo>
<ShipFrom>
<CompanyName>CompanyName</CompanyName>
<AttentionName>Ship From Attn Name</AttentionName>
<PhoneNumber>1234567890</PhoneNumber>
<Address>
<AddressLine1>AddressLine1</AddressLine1>
<City>City</City>
<StateProvinceCode>StateProvinceCode</StateProvinceCode>
<PostalCode>PostalCode</PostalCode>
<CountryCode>CountryCode</CountryCode>
</Address>
</ShipFrom>
<PaymentInformation>
<Prepaid>
<BillShipper>
<AccountNumber>Your Account Number</AccountNumber>
</BillShipper>
</Prepaid>
</PaymentInformation>
<Service>
<Code>01</Code>
<Description>UPS Express</Description>
</Service>
<Package>
<PackagingType>
<Code>02</Code>
<Description>Package</Description>
</PackagingType>
<Description>Priority</Description>
<Dimensions>
<UnitOfMeasurement>
<Code>IN</Code>
<Description>Inches</Description>
</UnitOfMeasurement>
<Length>5</Length>
<Width>4</Width>
<Height>2</Height>
</Dimensions>
<PackageWeight>
<UnitOfMeasurement>
<Code>LBS</Code>
<Description>Pounds</Description>
</UnitOfMeasurement>
<Weight>11</Weight>
</PackageWeight>
</Package>
</Shipment>
<LabelSpecification>
<LabelPrintMethod>
<Code>GIF</Code>
<Description>GIF</Description>
</LabelPrintMethod>
<LabelImageFormat>
<Code>GIF</Code>
<Description>GIF</Description>
</LabelImageFormat>
</LabelSpecification>
</ShipmentConfirmRequest>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment