Last active
January 13, 2016 20:25
-
-
Save evanr76/3365397 to your computer and use it in GitHub Desktop.
Shipwire: Shipping Rate API Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POST /exec/RateServices.php | |
Content-Type: application/xml | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE RateRequest SYSTEM "http://www.shipwire.com/exec/download/RateRequest.dtd"> | |
<RateRequest> | |
<Username>[email protected]</Username> | |
<Password>yourpassword</Password> | |
<Order id="12579"> | |
<Warehouse>0</Warehouse> | |
<AddressInfo type="ship"> | |
<Address1>321 Foo bar lane</Address1> | |
<Address2>Apartment #2</Address2> | |
<City>Nowhere</City> | |
<State>CA</State> | |
<Country>US</Country> | |
<Zip>12345</Zip> | |
</AddressInfo> | |
<Item num="0"> | |
<Code>12345</Code> | |
<Quantity>1</Quantity> | |
</Item> | |
</Order> | |
</RateRequest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<!DOCTYPE RateResponse SYSTEM "http://www.shipwire.com/exec/download/RateResponse.dtd"> | |
<RateResponse> | |
<Status>OK</Status> | |
<Order sequence="1"> | |
<Quotes> | |
<Quote method="GD"> | |
<Warehouse>Chicago</Warehouse> | |
<Service deliveryConfirmation="YES" trackable="YES" signatureRequired="NO">USPS Priority Mail Flat Rate Small | |
Box</Service> | |
<CarrierCode>USPS PMFS</CarrierCode> | |
<Cost currency="USD" converted="NO" originalCurrency="USD" originalCost="5.90">5.90</Cost> | |
<Subtotals> | |
<Subtotal type="Freight"> | |
<Cost currency="USD" converted="NO" originalCurrency="USD" originalCost="5.90">5.90</Cost> | |
</Subtotal> | |
<Subtotal type="Insurance"> | |
<Cost currency="USD" converted="NO" originalCurrency="USD" originalCost="0.00">0.00</Cost> | |
</Subtotal> | |
<Subtotal type="Packaging"> | |
<Cost currency="USD" converted="NO" originalCurrency="USD" originalCost="0.00">0.00</Cost> | |
</Subtotal> | |
<Subtotal type="Handling" includedInCost="NO"> | |
<Cost currency="USD" converted="NO" originalCurrency="USD" originalCost="0.00">0.00</Cost> | |
</Subtotal> | |
</Subtotals> | |
<DeliveryEstimate> | |
<Minimum units="days">2</Minimum> | |
<Maximum units="days">3</Maximum> | |
</DeliveryEstimate> | |
</Quote> | |
<Quote method="2D"> | |
<Warehouse>Chicago</Warehouse> | |
<Service deliveryConfirmation="YES" trackable="YES" signatureRequired="NO">UPS Second Day Air</Service> | |
<CarrierCode>UPS 2D</CarrierCode> | |
<Cost currency="USD" converted="NO" originalCurrency="USD" originalCost="30.41">30.41</Cost> | |
<Subtotals> | |
<Subtotal type="Freight"> | |
<Cost currency="USD" converted="NO" originalCurrency="USD" originalCost="30.41">30.41</Cost> | |
</Subtotal> | |
<Subtotal type="Insurance"> | |
<Cost currency="USD" converted="NO" originalCurrency="USD" originalCost="0.00">0.00</Cost> | |
</Subtotal> | |
<Subtotal type="Packaging"> | |
<Cost currency="USD" converted="NO" originalCurrency="USD" originalCost="0.00">0.00</Cost> | |
</Subtotal> | |
<Subtotal type="Handling" includedInCost="NO"> | |
<Cost currency="USD" converted="NO" originalCurrency="USD" originalCost="0.00">0.00</Cost> | |
</Subtotal> | |
</Subtotals> | |
<DeliveryEstimate> | |
<Minimum units="days">2</Minimum> | |
<Maximum units="days">2</Maximum> | |
</DeliveryEstimate> | |
</Quote> | |
<Quote method="1D"> | |
<Warehouse>Chicago</Warehouse> | |
<Service deliveryConfirmation="YES" trackable="YES" signatureRequired="NO">USPS Express Mail</Service> | |
<CarrierCode>USPS XP</CarrierCode> | |
<Cost currency="USD" converted="NO" originalCurrency="USD" originalCost="34.50">34.50</Cost> | |
<Subtotals> | |
<Subtotal type="Freight"> | |
<Cost currency="USD" converted="NO" originalCurrency="USD" originalCost="34.50">34.50</Cost> | |
</Subtotal> | |
<Subtotal type="Insurance"> | |
<Cost currency="USD" converted="NO" originalCurrency="USD" originalCost="0.00">0.00</Cost> | |
</Subtotal> | |
<Subtotal type="Packaging"> | |
<Cost currency="USD" converted="NO" originalCurrency="USD" originalCost="0.00">0.00</Cost> | |
</Subtotal> | |
<Subtotal type="Handling" includedInCost="NO"> | |
<Cost currency="USD" converted="NO" originalCurrency="USD" originalCost="0.00">0.00</Cost> | |
</Subtotal> | |
</Subtotals> | |
<DeliveryEstimate> | |
<Minimum units="days">1</Minimum> | |
<Maximum units="days">1</Maximum> | |
</DeliveryEstimate> | |
</Quote> | |
</Quotes> | |
</Order> | |
<ProcessingTime units="ms">70</ProcessingTime> | |
</RateResponse> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment