APN Tax and Shipping

Tax and Shipping Resource
The APN Tax and Shipping service receives at minimum a product ID, quantity and a zip code. It will return a JSON array of tax and shipping costs sorted from lowest to highest shipping costs. If the “total” attribute is 0 in a shipping method instance, then the shipping for that method and the quantity/product combination is free. This may be the result of a business rule such as “orders for $99 or more get free shipping”. A business rule like this will result in at least one shipping method having 0 costs.
 

 

Inputs:
NameRequiredDescriptionType
prodIdsYSHOP.COM Product IDs. A list is allowed, but most often a single value is passed. Example ?prodIds=834207132Query Param
quantityYQuantity of the product to shipQuery Param
zipYShip to zip (postal) code of at least 5 digitsQuery Param
stateN2 character state abbreviationQuery Param
cityNShip to cityQuery Param
countryNShip to country (example: US)Query Param
streetNShip to streetQuery Param
 

 

Outputs: a JSON array (for multiple shipping methods) of the following attributes
NameDescriptionType
productTaxThe total tax, out to 15 decimal places, for the quantity of productnumber
methodShipping methodstring
idID of the shipping method. For use in future cart servicesstring
totalTotal shipping costs for the quantity of productnumber
currencyCurrency of the estimated shipping and tax costs provides (example: “$”)string
taxThe total tax, rounded to 2 decimal places, for the quantity of productnumber
taxTypeType of tax (example: “Tax”)string
taxRateTax Rate (example: 0.0675)number
 

 

Example:
GET https://api.shop.com:8443/AffiliatePublisherNetwork/v1/taxandshipping?prodId=749443420&quantity=3&zip=27301

{
   "state": "North Carolina",
   "quotes": 
  {
     "72094": [ 
      {
         "productTax": [ 24.289875000000002 
        ],
         "method": "Ground (1 to 6 days)",
         "id": 42,
         "total": 0,
         "currency": "$",
         "shoppingCartIDs": [ 0 
        ],
         "taxRate": 0.0675,
         "tax": 24.29,
         "taxType": "Tax" 
      },
       
      {
         "productTax": [ 24.289875000000002 
        ],
         "method": "USPS Priority (1 to 6 days)",
         "id": 43,
         "total": 10.15,
         "currency": "$",
         "shoppingCartIDs": [ 0 
        ],
         "taxRate": 0.0675,
         "tax": 24.29,
         "taxType": "Tax" 
      },
       
      {
         "productTax": [ 24.289875000000002 
        ],
         "method": "3 Day Select",
         "id": 46,
         "total": 11.71,
         "currency": "$",
         "shoppingCartIDs": [ 0 
        ],
         "taxRate": 0.0675,
         "tax": 24.29,
         "taxType": "Tax" 
      },
       
      {
         "productTax": [ 24.289875000000002 
        ],
         "method": "UPS 2nd Day Air",
         "id": 45,
         "total": 14.33,
         "currency": "$",
         "shoppingCartIDs": [ 0 
        ],
         "taxRate": 0.0675,
         "tax": 24.29,
         "taxType": "Tax" 
      },
       
      {
         "productTax": [ 24.289875000000002 
        ],
         "method": "UPS Next Day Air",
         "id": 44,
         "total": 30.4,
         "currency": "$",
         "shoppingCartIDs": [ 0 
        ],
         "taxRate": 0.0675,
         "tax": 24.29,
         "taxType": "Tax" 
      } 
    ] 
  } 
}