{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"optional","settings":"","results":{"codes":[]},"params":[],"examples":{"codes":[]},"method":"post"},"next":{"description":"","pages":[]},"title":"Create Tax Quote","type":"endpoint","slug":"create-tax-quote","excerpt":"","body":"##Definition\nhttps<span>://sandbox.bluesnap.com/services/2/tax-quote</span>\n\n<hr>\n\n##Documentation\n\nThis request allows you to create a tax quote based on details about the purchase, such as the tax codes for the items being purchased and the shopper's address. For implementation details, see the [Tax Guide](/docs/taxes). \n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Tax quote expiration\",\n  \"body\": \"A tax quote will expire 24 hours after its creation unless you send the transaction to BlueSnap before then. If a tax quote expires before the transaction has been sent to BlueSnap, you'll need to create a new one.\"\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<ul class=\\\"nav nav-pills nav-justified\\\">\\n  <li class=\\\"active\\\"><a data-toggle=\\\"pill\\\" href=\\\"#menujson\\\">JSON</a></li>\\n  <li><a data-toggle=\\\"tab\\\" href=\\\"#menuxml\\\">XML</a></li>\\n</ul>\\n<div class=\\\"tab-content\\\">\\n  <div id=\\\"menujson\\\" class=\\\"tab-pane fade in active\\\">\"\n}\n[/block]\n###JSON Request Content \nSend a [taxQuote](doc:taxquote-json-object) object, with the following:\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`shipTo` &nbsp;&nbsp;&nbsp; *object* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span> (see [shipTo](doc:shipto-json-object))\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`shipFrom` &nbsp;&nbsp;&nbsp; *object* &nbsp;&nbsp;&nbsp;optional (see [shipFrom](doc:shipfrom-json-object))\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`currency` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span> \n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`lines` &nbsp;&nbsp;&nbsp; *array* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span> (see [lines](doc:lines-json-object))\n\n###JSON Response Details \nIf successful, the response HTTP status code is 200 OK.\nThe response contains the `taxQuote` object (see [taxQuote (JSON object)](doc:taxquote-json-object)). \n\n<hr>\n\n##JSON Examples\n\n###Request Examples\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/taxQuote \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n  \\\"currency\\\": \\\"USD\\\",\\n  \\\"shipTo\\\": {\\n    \\\"address\\\": \\\"1768 Mirassou Place\\\",\\n    \\\"city\\\": \\\"San Jose\\\",\\n    \\\"state\\\": \\\"CA\\\",\\n    \\\"zip\\\": \\\"95124\\\",\\n    \\\"country\\\": \\\"US\\\"\\n  },\\n  \\\"lines\\\": [\\n    {\\n      \\\"quantity\\\": 1,\\n      \\\"amount\\\": 100,\\n      \\\"taxCode\\\": \\\"PS081282\\\",\\n      \\\"itemCode\\\": \\\"Y0001\\\",\\n      \\\"description\\\": \\\"Yarn\\\"\\n    },\\n    {\\n      \\\"quantity\\\": 4,\\n      \\\"amount\\\": 60,\\n      \\\"taxCode\\\": \\\"PS081282\\\",\\n      \\\"itemCode\\\": \\\"Y0002\\\",\\n      \\\"description\\\": \\\"Shirt\\\"\\n    }\\n  ]\\n}'\",\n      \"language\": \"curl\",\n      \"name\": \"Create Tax Quote\"\n    }\n  ]\n}\n[/block]\n###Response Examples\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"shipFrom\\\": {\\n    \\\"address\\\": \\\"800 South St 640\\\",\\n    \\\"city\\\": \\\"Waltham\\\",\\n    \\\"state\\\": \\\"MA\\\",\\n    \\\"zip\\\": \\\"02453\\\",\\n    \\\"country\\\": \\\"US\\\"\\n  },\\n  \\\"shipTo\\\": {\\n    \\\"address\\\": \\\"1768 Mirassou Pl\\\",\\n    \\\"city\\\": \\\"San Jose\\\",\\n    \\\"state\\\": \\\"CA\\\",\\n    \\\"zip\\\": \\\"95124-5722\\\",\\n    \\\"country\\\": \\\"US\\\"\\n  },\\n  \\\"currency\\\": \\\"USD\\\",\\n  \\\"lines\\\": [\\n    {\\n      \\\"quantity\\\": 1,\\n      \\\"amount\\\": 100.0,\\n      \\\"taxCode\\\": \\\"PS081282\\\",\\n      \\\"itemCode\\\": \\\"Y0001\\\",\\n      \\\"description\\\": \\\"Yarn\\\",\\n      \\\"tax\\\": 9.25\\n    },\\n    {\\n      \\\"quantity\\\": 4,\\n      \\\"amount\\\": 60.0,\\n      \\\"taxCode\\\": \\\"PS081282\\\",\\n      \\\"itemCode\\\": \\\"Y0002\\\",\\n      \\\"description\\\": \\\"Shirt\\\",\\n      \\\"tax\\\": 5.55\\n    }\\n  ],\\n  \\\"taxReference\\\": \\\"cf23b118-4adc-4d92-8743-fa140f6c6893\\\",\\n  \\\"totalTax\\\": 14.8,\\n  \\\"status\\\": \\\"Saved\\\",\\n  \\\"used\\\": false,\\n  \\\"companyId\\\": 899652,\\n  \\\"requestDate\\\": \\\"Wed Aug 26 00:00:00 IDT 2020\\\",\\n  \\\"totalAmount\\\": 160.0,\\n  \\\"totalExempt\\\": 0.0,\\n  \\\"totalTaxable\\\": 160.0,\\n  \\\"taxVatType\\\": \\\"TAX\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Create Tax Quote\"\n    }\n  ]\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \" </div>\\n <div id=\\\"menuxml\\\" class=\\\"tab-pane fade\\\">\"\n}\n[/block]\n###XML Request Content \nSend a [tax-quote](doc:tax-quote-xml-resource) resource, with the following:\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`ship-to` &nbsp;&nbsp;&nbsp; *container* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span> (see [ship-to](doc:ship-to-xml-resource))\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`ship-from` &nbsp;&nbsp;&nbsp; *container* &nbsp;&nbsp;&nbsp;optional (see [ship-from](doc:ship-from))\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`currency` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span> \n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`lines` &nbsp;&nbsp;&nbsp; *container* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span> (see [lines](doc:lines-xml-resource))\n\n###XML Response Details \nIf successful, the response HTTP status code is 200 OK.\nThe response contains the `tax-quote` resource (see [tax-quote (XML resource)](doc:tax-quote-xml-resource)). \n\n<hr>\n\n##XML Examples\n\n###Request Examples\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/taxQuote \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Accept: application/xml' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<tax-quote xmlns=\\\"http://ws.plimus.com\\\">\\n  <currency>USD</currency>\\n  <ship-to>\\n    <address>1768 Mirassou Place</address>\\n    <city>San Jose</city>\\n    <state>CA</state>\\n    <zip>95124</zip>\\n    <country>US</country>\\n  </ship-to>\\n  <lines>\\n    <quantity>1</quantity>\\n    <amount>100</amount>\\n    <tax-code>PS081282</tax-code>\\n    <item-code>Y0001</item-code>\\n    <description>Yarn</description>\\n  </lines>\\n</tax-quote>'\",\n      \"language\": \"curl\",\n      \"name\": \"Create Tax Quote\"\n    }\n  ]\n}\n[/block]\n##Response Examples \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"yes\\\"?>\\n<tax-quote xmlns=\\\"http://ws.plimus.com\\\">\\n  <ship-from>\\n    <address>800 South St 640</address>\\n    <city>Waltham</city>\\n    <state>MA</state>\\n    <zip>02453</zip>\\n    <country>US</country>\\n  </ship-from>\\n  <ship-to>\\n    <address>1768 Mirassou Pl</address>\\n    <city>San Jose</city>\\n    <state>CA</state>\\n    <zip>95124-5722</zip>\\n    <country>US</country>\\n  </ship-to>\\n  <currency>USD</currency>\\n  <lines>\\n    <quantity>1</quantity>\\n    <amount>100.0</amount>\\n    <tax-code>PS081282</tax-code>\\n    <item-code>Y0001</item-code>\\n    <description>Yarn</description>\\n    <tax>9.2500</tax>\\n  </lines>\\n  <tax-reference>1ef16d7a-34a5-4608-a084-3ee3f2278643</tax-reference>\\n  <vat-code></vat-code>\\n  <total-tax>9.2500</total-tax>\\n  <status>Saved</status>\\n  <used>false</used>\\n  <company-id>899652</company-id>\\n  <request-date>Mon Sep 07 00&#x3a;00&#x3a;00 IDT 2020</request-date>\\n  <total-amount>100.0</total-amount>\\n  <total-exempt>0.0</total-exempt>\\n  <total-taxable>100.0</total-taxable>\\n  <tax-vat-type>TAX</tax-vat-type>\\n</tax-quote>\",\n      \"language\": \"xml\",\n      \"name\": \"Create Tax Quote\"\n    }\n  ]\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"</div>\\n</div>\"\n}\n[/block]","updates":[],"order":0,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"60957f4cce403c0045a0323d","createdAt":"2020-09-01T15:21:38.731Z","user":"5ea72d649148ff00653f6bbc","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Tax Quotes","slug":"tax-quotes","order":16,"from_sync":false,"reference":false,"_id":"60957f4cce403c0045a031f4","createdAt":"2020-09-01T15:20:37.817Z","version":"60957f4cce403c0045a03255","project":"57336fd5a6a9c40e00e13a0b","__v":0},"version":{"version":"8976-Tools","version_clean":"8976.0.0-Tools","codename":"3.38 Release","is_stable":false,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["60957f4cce403c0045a031e3","60957f4cce403c0045a031e4","60957f4cce403c0045a031e5","60957f4cce403c0045a031e6","60957f4cce403c0045a031e7","60957f4cce403c0045a031e8","60957f4cce403c0045a031e9","60957f4cce403c0045a031ea","60957f4cce403c0045a031eb","60957f4cce403c0045a031ec","60957f4cce403c0045a031ed","60957f4cce403c0045a031ee","5b34c737e0dca2000311de6a","60957f4cce403c0045a031ef","60957f4cce403c0045a031f0","60957f4cce403c0045a031f1","60957f4cce403c0045a031f2","60957f4cce403c0045a031f3","60957f4cce403c0045a031f4","60957f4cce403c0045a031f5"],"_id":"60957f4cce403c0045a03255","project":"57336fd5a6a9c40e00e13a0b","__v":0,"forked_from":"603fec227146110018e1daaf","createdAt":"2018-04-23T15:17:35.680Z","releaseDate":"2018-04-23T15:17:35.680Z"},"project":"57336fd5a6a9c40e00e13a0b","__v":0,"parentDoc":null}

postCreate Tax Quote


Definition

https://sandbox.bluesnap.com/services/2/tax-quote


Documentation

This request allows you to create a tax quote based on details about the purchase, such as the tax codes for the items being purchased and the shopper's address. For implementation details, see the Tax Guide.

Tax quote expiration

A tax quote will expire 24 hours after its creation unless you send the transaction to BlueSnap before then. If a tax quote expires before the transaction has been sent to BlueSnap, you'll need to create a new one.