SwsimV22


Click here for a complete list of operations.

GetRates

Calculate a rate or a list of rates.

Test

The test form is only available for requests from the local machine.

SOAP 1.1

The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.

POST /swsim/swsimv22.asmx HTTP/1.1
Host: swsim.stamps.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://stamps.com/xml/namespace/2012/04/swsim/swsimv22/GetRates"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetRates xmlns="http://stamps.com/xml/namespace/2012/04/swsim/swsimv22">
      <Rate>
        <FromZIPCode>string</FromZIPCode>
        <ToZIPCode>string</ToZIPCode>
        <ToCountry>string</ToCountry>
        <Amount>decimal</Amount>
        <MaxAmount>decimal</MaxAmount>
        <ServiceType>Unknown or US-FC or US-PM or US-XM or US-PP or US-MM or US-BP or US-EMI or US-PMI or US-FCI</ServiceType>
        <PrintLayout>string</PrintLayout>
        <DeliverDays>string</DeliverDays>
        <WeightLb>double</WeightLb>
        <WeightOz>double</WeightOz>
        <PackageType>Unknown or Postcard or Letter or Large Envelope or Flat or Thick Envelope or Package or Flat Rate Box or Small Flat Rate Box or Large Flat Rate Box or Flat Rate Envelope or Flat Rate Padded Envelope or Large Package or Oversized Package or Regional Rate Box A or Regional Rate Box B or Legal Flat Rate Envelope or Regional Rate Box C</PackageType>
        <RequiresAllOf>
          <RequiresOneOf>
            <AddOnTypeV2>US-A-INS or US-A-COD or US-A-DC or US-A-SC or US-A-COM or US-A-CM or US-A-RR or US-A-RRM or US-A-REG or US-A-RD or US-A-SH or SC-A-INS or SC-A-INSRM or SC-A-HP or US-A-WDS or US-A-NDW or US-A-ESH or US-A-NND</AddOnTypeV2>
            <AddOnTypeV2>US-A-INS or US-A-COD or US-A-DC or US-A-SC or US-A-COM or US-A-CM or US-A-RR or US-A-RRM or US-A-REG or US-A-RD or US-A-SH or SC-A-INS or SC-A-INSRM or SC-A-HP or US-A-WDS or US-A-NDW or US-A-ESH or US-A-NND</AddOnTypeV2>
          </RequiresOneOf>
          <RequiresOneOf>
            <AddOnTypeV2>US-A-INS or US-A-COD or US-A-DC or US-A-SC or US-A-COM or US-A-CM or US-A-RR or US-A-RRM or US-A-REG or US-A-RD or US-A-SH or SC-A-INS or SC-A-INSRM or SC-A-HP or US-A-WDS or US-A-NDW or US-A-ESH or US-A-NND</AddOnTypeV2>
            <AddOnTypeV2>US-A-INS or US-A-COD or US-A-DC or US-A-SC or US-A-COM or US-A-CM or US-A-RR or US-A-RRM or US-A-REG or US-A-RD or US-A-SH or SC-A-INS or SC-A-INSRM or SC-A-HP or US-A-WDS or US-A-NDW or US-A-ESH or US-A-NND</AddOnTypeV2>
          </RequiresOneOf>
        </RequiresAllOf>
        <Length>double</Length>
        <Width>double</Width>
        <Height>double</Height>
        <ShipDate>date</ShipDate>
        <InsuredValue>decimal</InsuredValue>
        <RegisteredValue>decimal</RegisteredValue>
        <CODValue>decimal</CODValue>
        <DeclaredValue>decimal</DeclaredValue>
        <NonMachinable>boolean</NonMachinable>
        <RectangularShaped>boolean</RectangularShaped>
        <Prohibitions>string</Prohibitions>
        <Restrictions>string</Restrictions>
        <Observations>string</Observations>
        <Regulations>string</Regulations>
        <GEMNotes>string</GEMNotes>
        <MaxDimensions>string</MaxDimensions>
        <DimWeighting>string</DimWeighting>
        <AddOns>
          <AddOnV2>
            <Amount>decimal</Amount>
            <AddOnType>US-A-INS or US-A-COD or US-A-DC or US-A-SC or US-A-COM or US-A-CM or US-A-RR or US-A-RRM or US-A-REG or US-A-RD or US-A-SH or SC-A-INS or SC-A-INSRM or SC-A-HP or US-A-WDS or US-A-NDW or US-A-ESH or US-A-NND</AddOnType>
            <RequiresAllOf xsi:nil="true" />
            <ProhibitedWithAnyOf xsi:nil="true" />
            <MissingData>string</MissingData>
          </AddOnV2>
          <AddOnV2>
            <Amount>decimal</Amount>
            <AddOnType>US-A-INS or US-A-COD or US-A-DC or US-A-SC or US-A-COM or US-A-CM or US-A-RR or US-A-RRM or US-A-REG or US-A-RD or US-A-SH or SC-A-INS or SC-A-INSRM or SC-A-HP or US-A-WDS or US-A-NDW or US-A-ESH or US-A-NND</AddOnType>
            <RequiresAllOf xsi:nil="true" />
            <ProhibitedWithAnyOf xsi:nil="true" />
            <MissingData>string</MissingData>
          </AddOnV2>
        </AddOns>
        <EffectiveWeightInOunces>int</EffectiveWeightInOunces>
        <IsIntraBMC>boolean</IsIntraBMC>
        <Zone>int</Zone>
        <RateCategory>int</RateCategory>
        <ToState>string</ToState>
        <CubicPricing>boolean</CubicPricing>
      </Rate>
    </GetRates>
  </soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetRatesResponse xmlns="http://stamps.com/xml/namespace/2012/04/swsim/swsimv22">
      <Authenticator>string</Authenticator>
      <Rates>
        <Rate>
          <FromZIPCode>string</FromZIPCode>
          <ToZIPCode>string</ToZIPCode>
          <ToCountry>string</ToCountry>
          <Amount>decimal</Amount>
          <MaxAmount>decimal</MaxAmount>
          <ServiceType>Unknown or US-FC or US-PM or US-XM or US-PP or US-MM or US-BP or US-EMI or US-PMI or US-FCI</ServiceType>
          <PrintLayout>string</PrintLayout>
          <DeliverDays>string</DeliverDays>
          <WeightLb>double</WeightLb>
          <WeightOz>double</WeightOz>
          <PackageType>Unknown or Postcard or Letter or Large Envelope or Flat or Thick Envelope or Package or Flat Rate Box or Small Flat Rate Box or Large Flat Rate Box or Flat Rate Envelope or Flat Rate Padded Envelope or Large Package or Oversized Package or Regional Rate Box A or Regional Rate Box B or Legal Flat Rate Envelope or Regional Rate Box C</PackageType>
          <RequiresAllOf>
            <RequiresOneOf xsi:nil="true" />
            <RequiresOneOf xsi:nil="true" />
          </RequiresAllOf>
          <Length>double</Length>
          <Width>double</Width>
          <Height>double</Height>
          <ShipDate>date</ShipDate>
          <InsuredValue>decimal</InsuredValue>
          <RegisteredValue>decimal</RegisteredValue>
          <CODValue>decimal</CODValue>
          <DeclaredValue>decimal</DeclaredValue>
          <NonMachinable>boolean</NonMachinable>
          <RectangularShaped>boolean</RectangularShaped>
          <Prohibitions>string</Prohibitions>
          <Restrictions>string</Restrictions>
          <Observations>string</Observations>
          <Regulations>string</Regulations>
          <GEMNotes>string</GEMNotes>
          <MaxDimensions>string</MaxDimensions>
          <DimWeighting>string</DimWeighting>
          <AddOns>
            <AddOnV2 xsi:nil="true" />
            <AddOnV2 xsi:nil="true" />
          </AddOns>
          <EffectiveWeightInOunces>int</EffectiveWeightInOunces>
          <IsIntraBMC>boolean</IsIntraBMC>
          <Zone>int</Zone>
          <RateCategory>int</RateCategory>
          <ToState>string</ToState>
          <CubicPricing>boolean</CubicPricing>
        </Rate>
        <Rate>
          <FromZIPCode>string</FromZIPCode>
          <ToZIPCode>string</ToZIPCode>
          <ToCountry>string</ToCountry>
          <Amount>decimal</Amount>
          <MaxAmount>decimal</MaxAmount>
          <ServiceType>Unknown or US-FC or US-PM or US-XM or US-PP or US-MM or US-BP or US-EMI or US-PMI or US-FCI</ServiceType>
          <PrintLayout>string</PrintLayout>
          <DeliverDays>string</DeliverDays>
          <WeightLb>double</WeightLb>
          <WeightOz>double</WeightOz>
          <PackageType>Unknown or Postcard or Letter or Large Envelope or Flat or Thick Envelope or Package or Flat Rate Box or Small Flat Rate Box or Large Flat Rate Box or Flat Rate Envelope or Flat Rate Padded Envelope or Large Package or Oversized Package or Regional Rate Box A or Regional Rate Box B or Legal Flat Rate Envelope or Regional Rate Box C</PackageType>
          <RequiresAllOf>
            <RequiresOneOf xsi:nil="true" />
            <RequiresOneOf xsi:nil="true" />
          </RequiresAllOf>
          <Length>double</Length>
          <Width>double</Width>
          <Height>double</Height>
          <ShipDate>date</ShipDate>
          <InsuredValue>decimal</InsuredValue>
          <RegisteredValue>decimal</RegisteredValue>
          <CODValue>decimal</CODValue>
          <DeclaredValue>decimal</DeclaredValue>
          <NonMachinable>boolean</NonMachinable>
          <RectangularShaped>boolean</RectangularShaped>
          <Prohibitions>string</Prohibitions>
          <Restrictions>string</Restrictions>
          <Observations>string</Observations>
          <Regulations>string</Regulations>
          <GEMNotes>string</GEMNotes>
          <MaxDimensions>string</MaxDimensions>
          <DimWeighting>string</DimWeighting>
          <AddOns>
            <AddOnV2 xsi:nil="true" />
            <AddOnV2 xsi:nil="true" />
          </AddOns>
          <EffectiveWeightInOunces>int</EffectiveWeightInOunces>
          <IsIntraBMC>boolean</IsIntraBMC>
          <Zone>int</Zone>
          <RateCategory>int</RateCategory>
          <ToState>string</ToState>
          <CubicPricing>boolean</CubicPricing>
        </Rate>
      </Rates>
    </GetRatesResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.

POST /swsim/swsimv22.asmx HTTP/1.1
Host: swsim.stamps.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <GetRates xmlns="http://stamps.com/xml/namespace/2012/04/swsim/swsimv22">
      <Rate>
        <FromZIPCode>string</FromZIPCode>
        <ToZIPCode>string</ToZIPCode>
        <ToCountry>string</ToCountry>
        <Amount>decimal</Amount>
        <MaxAmount>decimal</MaxAmount>
        <ServiceType>Unknown or US-FC or US-PM or US-XM or US-PP or US-MM or US-BP or US-EMI or US-PMI or US-FCI</ServiceType>
        <PrintLayout>string</PrintLayout>
        <DeliverDays>string</DeliverDays>
        <WeightLb>double</WeightLb>
        <WeightOz>double</WeightOz>
        <PackageType>Unknown or Postcard or Letter or Large Envelope or Flat or Thick Envelope or Package or Flat Rate Box or Small Flat Rate Box or Large Flat Rate Box or Flat Rate Envelope or Flat Rate Padded Envelope or Large Package or Oversized Package or Regional Rate Box A or Regional Rate Box B or Legal Flat Rate Envelope or Regional Rate Box C</PackageType>
        <RequiresAllOf>
          <RequiresOneOf>
            <AddOnTypeV2>US-A-INS or US-A-COD or US-A-DC or US-A-SC or US-A-COM or US-A-CM or US-A-RR or US-A-RRM or US-A-REG or US-A-RD or US-A-SH or SC-A-INS or SC-A-INSRM or SC-A-HP or US-A-WDS or US-A-NDW or US-A-ESH or US-A-NND</AddOnTypeV2>
            <AddOnTypeV2>US-A-INS or US-A-COD or US-A-DC or US-A-SC or US-A-COM or US-A-CM or US-A-RR or US-A-RRM or US-A-REG or US-A-RD or US-A-SH or SC-A-INS or SC-A-INSRM or SC-A-HP or US-A-WDS or US-A-NDW or US-A-ESH or US-A-NND</AddOnTypeV2>
          </RequiresOneOf>
          <RequiresOneOf>
            <AddOnTypeV2>US-A-INS or US-A-COD or US-A-DC or US-A-SC or US-A-COM or US-A-CM or US-A-RR or US-A-RRM or US-A-REG or US-A-RD or US-A-SH or SC-A-INS or SC-A-INSRM or SC-A-HP or US-A-WDS or US-A-NDW or US-A-ESH or US-A-NND</AddOnTypeV2>
            <AddOnTypeV2>US-A-INS or US-A-COD or US-A-DC or US-A-SC or US-A-COM or US-A-CM or US-A-RR or US-A-RRM or US-A-REG or US-A-RD or US-A-SH or SC-A-INS or SC-A-INSRM or SC-A-HP or US-A-WDS or US-A-NDW or US-A-ESH or US-A-NND</AddOnTypeV2>
          </RequiresOneOf>
        </RequiresAllOf>
        <Length>double</Length>
        <Width>double</Width>
        <Height>double</Height>
        <ShipDate>date</ShipDate>
        <InsuredValue>decimal</InsuredValue>
        <RegisteredValue>decimal</RegisteredValue>
        <CODValue>decimal</CODValue>
        <DeclaredValue>decimal</DeclaredValue>
        <NonMachinable>boolean</NonMachinable>
        <RectangularShaped>boolean</RectangularShaped>
        <Prohibitions>string</Prohibitions>
        <Restrictions>string</Restrictions>
        <Observations>string</Observations>
        <Regulations>string</Regulations>
        <GEMNotes>string</GEMNotes>
        <MaxDimensions>string</MaxDimensions>
        <DimWeighting>string</DimWeighting>
        <AddOns>
          <AddOnV2>
            <Amount>decimal</Amount>
            <AddOnType>US-A-INS or US-A-COD or US-A-DC or US-A-SC or US-A-COM or US-A-CM or US-A-RR or US-A-RRM or US-A-REG or US-A-RD or US-A-SH or SC-A-INS or SC-A-INSRM or SC-A-HP or US-A-WDS or US-A-NDW or US-A-ESH or US-A-NND</AddOnType>
            <RequiresAllOf xsi:nil="true" />
            <ProhibitedWithAnyOf xsi:nil="true" />
            <MissingData>string</MissingData>
          </AddOnV2>
          <AddOnV2>
            <Amount>decimal</Amount>
            <AddOnType>US-A-INS or US-A-COD or US-A-DC or US-A-SC or US-A-COM or US-A-CM or US-A-RR or US-A-RRM or US-A-REG or US-A-RD or US-A-SH or SC-A-INS or SC-A-INSRM or SC-A-HP or US-A-WDS or US-A-NDW or US-A-ESH or US-A-NND</AddOnType>
            <RequiresAllOf xsi:nil="true" />
            <ProhibitedWithAnyOf xsi:nil="true" />
            <MissingData>string</MissingData>
          </AddOnV2>
        </AddOns>
        <EffectiveWeightInOunces>int</EffectiveWeightInOunces>
        <IsIntraBMC>boolean</IsIntraBMC>
        <Zone>int</Zone>
        <RateCategory>int</RateCategory>
        <ToState>string</ToState>
        <CubicPricing>boolean</CubicPricing>
      </Rate>
    </GetRates>
  </soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <GetRatesResponse xmlns="http://stamps.com/xml/namespace/2012/04/swsim/swsimv22">
      <Authenticator>string</Authenticator>
      <Rates>
        <Rate>
          <FromZIPCode>string</FromZIPCode>
          <ToZIPCode>string</ToZIPCode>
          <ToCountry>string</ToCountry>
          <Amount>decimal</Amount>
          <MaxAmount>decimal</MaxAmount>
          <ServiceType>Unknown or US-FC or US-PM or US-XM or US-PP or US-MM or US-BP or US-EMI or US-PMI or US-FCI</ServiceType>
          <PrintLayout>string</PrintLayout>
          <DeliverDays>string</DeliverDays>
          <WeightLb>double</WeightLb>
          <WeightOz>double</WeightOz>
          <PackageType>Unknown or Postcard or Letter or Large Envelope or Flat or Thick Envelope or Package or Flat Rate Box or Small Flat Rate Box or Large Flat Rate Box or Flat Rate Envelope or Flat Rate Padded Envelope or Large Package or Oversized Package or Regional Rate Box A or Regional Rate Box B or Legal Flat Rate Envelope or Regional Rate Box C</PackageType>
          <RequiresAllOf>
            <RequiresOneOf xsi:nil="true" />
            <RequiresOneOf xsi:nil="true" />
          </RequiresAllOf>
          <Length>double</Length>
          <Width>double</Width>
          <Height>double</Height>
          <ShipDate>date</ShipDate>
          <InsuredValue>decimal</InsuredValue>
          <RegisteredValue>decimal</RegisteredValue>
          <CODValue>decimal</CODValue>
          <DeclaredValue>decimal</DeclaredValue>
          <NonMachinable>boolean</NonMachinable>
          <RectangularShaped>boolean</RectangularShaped>
          <Prohibitions>string</Prohibitions>
          <Restrictions>string</Restrictions>
          <Observations>string</Observations>
          <Regulations>string</Regulations>
          <GEMNotes>string</GEMNotes>
          <MaxDimensions>string</MaxDimensions>
          <DimWeighting>string</DimWeighting>
          <AddOns>
            <AddOnV2 xsi:nil="true" />
            <AddOnV2 xsi:nil="true" />
          </AddOns>
          <EffectiveWeightInOunces>int</EffectiveWeightInOunces>
          <IsIntraBMC>boolean</IsIntraBMC>
          <Zone>int</Zone>
          <RateCategory>int</RateCategory>
          <ToState>string</ToState>
          <CubicPricing>boolean</CubicPricing>
        </Rate>
        <Rate>
          <FromZIPCode>string</FromZIPCode>
          <ToZIPCode>string</ToZIPCode>
          <ToCountry>string</ToCountry>
          <Amount>decimal</Amount>
          <MaxAmount>decimal</MaxAmount>
          <ServiceType>Unknown or US-FC or US-PM or US-XM or US-PP or US-MM or US-BP or US-EMI or US-PMI or US-FCI</ServiceType>
          <PrintLayout>string</PrintLayout>
          <DeliverDays>string</DeliverDays>
          <WeightLb>double</WeightLb>
          <WeightOz>double</WeightOz>
          <PackageType>Unknown or Postcard or Letter or Large Envelope or Flat or Thick Envelope or Package or Flat Rate Box or Small Flat Rate Box or Large Flat Rate Box or Flat Rate Envelope or Flat Rate Padded Envelope or Large Package or Oversized Package or Regional Rate Box A or Regional Rate Box B or Legal Flat Rate Envelope or Regional Rate Box C</PackageType>
          <RequiresAllOf>
            <RequiresOneOf xsi:nil="true" />
            <RequiresOneOf xsi:nil="true" />
          </RequiresAllOf>
          <Length>double</Length>
          <Width>double</Width>
          <Height>double</Height>
          <ShipDate>date</ShipDate>
          <InsuredValue>decimal</InsuredValue>
          <RegisteredValue>decimal</RegisteredValue>
          <CODValue>decimal</CODValue>
          <DeclaredValue>decimal</DeclaredValue>
          <NonMachinable>boolean</NonMachinable>
          <RectangularShaped>boolean</RectangularShaped>
          <Prohibitions>string</Prohibitions>
          <Restrictions>string</Restrictions>
          <Observations>string</Observations>
          <Regulations>string</Regulations>
          <GEMNotes>string</GEMNotes>
          <MaxDimensions>string</MaxDimensions>
          <DimWeighting>string</DimWeighting>
          <AddOns>
            <AddOnV2 xsi:nil="true" />
            <AddOnV2 xsi:nil="true" />
          </AddOns>
          <EffectiveWeightInOunces>int</EffectiveWeightInOunces>
          <IsIntraBMC>boolean</IsIntraBMC>
          <Zone>int</Zone>
          <RateCategory>int</RateCategory>
          <ToState>string</ToState>
          <CubicPricing>boolean</CubicPricing>
        </Rate>
      </Rates>
    </GetRatesResponse>
  </soap12:Body>
</soap12:Envelope>