The Tax Calls API will allow you to create tax calls for address/product combinations.
POST https://marketplace.vin65.com/tax_calls
| Parameter | Required | Description |
|---|---|---|
| Authorization | TRUE | Authorization token example: Bearer 576gf565f2873g967w8.23478263g945sdfgwe523f.445gf7127cb45twe |
| version | FALSE | API Version to access example: version=1 |
curl -X "POST" "https://marketplace.vin65.com/tax_calls" \
-H "Authorization: Bearer your_auth_token_here" \
-H "Accept: version=1" \
-d '{
"tax_call": {
"address_attributes": {
"line_1": "1190 Airport Road",
"line_2": "Suite 350",
"city": "Napa",
"state": "CA",
"zip": "94558",
"country": "US"
},
"tax_call_products_attributes": [
{
"product_id": 7,
"quantity": 2
},
{
"product_id": 2,
"quantity": 2
}
]
}
}
'
body = {
"tax_call": {
"address_attributes": {
"line_1": "1190 Airport Road",
"line_2": "Suite 350",
"city": "Napa",
"state": "CA",
"zip": "94558",
"country": "US"
},
"tax_call_products_attributes": [
{
"product_id": 7,
"quantity": 2
},
{
"product_id": 2,
"quantity": 2
}
]
}
}
require 'httparty'
headers = { 'Authorization' => "Bearer #{auth_token}" }
response = HTTParty.post('https://marketplace.vin65.com/tax_calls', body: body, headers: headers)
JSON.parse(response.body)
| Parameter | Required | Description |
|---|---|---|
| tax_call.address_attributes | TRUE | Object containing Address attributes |
| tax_call.address_attributes.line_1 | TRUE | First line of Shipping Address example: 1190 Airport Road |
| tax_call.address_attributes.line_2 | FALSE | Second line of Shipping Address example: Unit 5 |
| tax_call.address_attributes.city | TRUE | City of Shipping Address example: Napa |
| tax_call.address_attributes.state | TRUE | State Shipping Address example: CA |
| tax_call.address_attributes.zip | TRUE | Zip Code Shipping Address example: 94558 |
| tax_call.address_attributes.county | FALSE | County Shipping Address example: Napa County |
| tax_call.address_attributes.country | TRUE | Country Shipping Address example: US |
| tax_call.tax_call_products_attributes | TRUE | Array of Tax Call Product Objects |
| tax_call.tax_call_products_attributes.product_id | TRUE | Product ID of product example: 123 |
| tax_call.tax_call_products_attributes.quantity | TRUE | Quantity of product example: 2 |
{
"tax_call": {
"address_attributes": {
"line_1": "1190 Airport Road",
"line_2": "Suite 350",
"city": "Napa",
"state": "CA",
"zip": "94558",
"country": "US"
},
"tax_call_products_attributes": [
{
"product_id": 7,
"quantity": 2
},
{
"product_id": 2,
"quantity": 2
}
]
}
}
HTTP/1.1 201 Created X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block X-Content-Type-Options: nosniff Content-Type: application/json; charset=utf-8 ETag: W/"f4e1fe7b18442e5163b88a4045c24cce" Cache-Control: max-age=0, private, must-revalidate X-Request-Id: a542b4c8-edee-46ea-93b6-a30f84c2d4b7 X-Runtime: 2.390705 Connection: close Transfer-Encoding: chunked
{
"tax_call": {
"id": 1,
"blended_wine_tax_rate": 0.05883,
"blended_shipping_tax_rate": 0.0234,
"address": {
"id": 94,
"line_1": "1190 Airport Road",
"line_2": "Suite 350",
"city": "Napa",
"state": "CA",
"zip": "94558",
"county": null,
"country": "US",
"single_line": "1190 Airport Road, Suite 350, Napa, CA, 94558, US"
},
"tax_call_products": [{
"product_id": 7,
"product_sku": "2011mer",
"product_name": "2011 Merlot",
"quantity": 2,
"wine_tax_rate": "0.075",
"shipping_tax_rate": "0.0"
}, {
"product_id": 2,
"product_sku": "2008Chard",
"product_name": "2008 Chardonnay",
"quantity": 2,
"wine_tax_rate": "0.075",
"shipping_tax_rate": "0.0"
}]
}
}
| Parameter | Type | Description | Example |
|---|---|---|---|
| id | NUMBER | ID of Product | 1 |
| blended_wine_tax_rate | NUMBER | Blended Wine Tax Rate of Product | 0.05833 |
| blended_shipping_tax_rate | NUMBER | Blended Shipping Tax Rate of Product | 0.0234 |
| address | OBJECT | Object containing winery address information | |
| address.line_1 | STRING | Address line 1 | 24732 Vine Drive |
| address.line_2 | STRING | Address line 2 | 9.8 |
| address.city | STRING | Address city | Napa |
| address.state | STRING | Address state | CA |
| address.zip | STRING | Address Zip Code | 90210 |
| address.county | STRING | Address county | |
| address.country | STRING | Address country | US |
| address.single_line | STRING | Single line representation of address | 24732 Vine Drive, Napa, CA, 90210, US |
| tax_call_products.product_id | STRING | ID of Product | 123 |
| tax_call_products.product_sku | STRING | SKU of Product | 11MER |
| tax_call_products.product_name | STRING | NAme of Product | 2011 Merlot |
| tax_call_products.quantity | STRING | Quantity of Product | 2 |
| tax_call_products.wine_tax_rate | STRING | Wine Sales Tax Rate | 7.5 |
| tax_call_products.shipping_tax_rate | STRING | Shipping Sales Tax Rate | 2.5 |
GET https://marketplace.vin65.com/tax_calls/{tax_call_id}
| Parameter | Required | Description |
|---|---|---|
| Authorization | TRUE | Authorization token example: Bearer 576gf565f2873g967w8.23478263g945sdfgwe523f.445gf7127cb45twe |
| version | FALSE | API Version to access example: version=1 |
| Parameter | Required | Description |
|---|---|---|
| id | TRUE | ID of Tax Call |
curl -X "GET" "https://marketplace.vin65.com/tax_calls/1" \
-H "Authorization: Bearer your_auth_token_here" \
-H "Accept: version=1"
require 'httparty'
headers = { "Authorization":"Bearer #{auth_token}" }
response = HTTParty.get(https://marketplace.vin65.com/tax_calls/1, headers: headers)
JSON.parse(response.body)
HTTP/1.1 200 OK X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block X-Content-Type-Options: nosniff Content-Type: application/json; charset=utf-8 ETag: W/"840cad3c116bc26ebfebcb13ef314a70" Cache-Control: max-age=0, private, must-revalidate X-Request-Id: 3af18f58-1f87-4826-bb62-25b04c5b1c5d X-Runtime: 0.101670 Connection: close Transfer-Encoding: chunked
{
"tax_call": {
"id": 1,
"blended_wine_tax_rate": 0.05883,
"blended_shipping_tax_rate": 0.0234,
"address": {
"id": 94,
"line_1": "1190 Airport Road",
"line_2": "Suite 350",
"city": "Napa",
"state": "CA",
"zip": "94558",
"county": null,
"country": "US",
"single_line": "1190 Airport Road, Suite 350, Napa, CA, 94558, US"
},
"tax_call_products": [{
"product_id": 7,
"product_sku": "2011mer",
"product_name": "2011 Merlot",
"quantity": 2,
"wine_tax_rate": "0.075",
"shipping_tax_rate": "0.0"
}, {
"product_id": 2,
"product_sku": "2008Chard",
"product_name": "2008 Chardonnay",
"quantity": 2,
"wine_tax_rate": "0.075",
"shipping_tax_rate": "0.0"
}]
}
}
| Parameter | Type | Description | Example |
|---|---|---|---|
| id | NUMBER | ID of Product | 1 |
| blended_wine_tax_rate | NUMBER | Blended Wine Tax Rate of Product | 0.05833 |
| blended_shipping_tax_rate | NUMBER | Blended Shipping Tax Rate of Product | 0.0234 |
| address | OBJECT | Object containing winery address information | |
| address.line_1 | STRING | Address line 1 | 24732 Vine Drive |
| address.line_2 | STRING | Address line 2 | 9.8 |
| address.city | STRING | Address city | Napa |
| address.state | STRING | Address state | CA |
| address.zip | STRING | Address Zip Code | 90210 |
| address.county | STRING | Address county | |
| address.country | STRING | Address country | US |
| address.single_line | STRING | Single line representation of address | 24732 Vine Drive, Napa, CA, 90210, US |
| tax_call_products.product_id | STRING | ID of Product | 123 |
| tax_call_products.product_sku | STRING | SKU of Product | 11MER |
| tax_call_products.product_name | STRING | NAme of Product | 2011 Merlot |
| tax_call_products.quantity | STRING | Quantity of Product | 2 |
| tax_call_products.wine_tax_rate | STRING | Wine Sales Tax Rate | 7.5 |
| tax_call_products.shipping_tax_rate | STRING | Shipping Sales Tax Rate | 2.5 |