Skip to content

Commit

Permalink
Renamed Files
Browse files Browse the repository at this point in the history
  • Loading branch information
Anya Stettler committed Mar 18, 2014
1 parent 163b949 commit 227c2f4
Show file tree
Hide file tree
Showing 6 changed files with 182 additions and 146 deletions.
File renamed without changes.
File renamed without changes.
290 changes: 145 additions & 145 deletions tax-get-POST.txt → GetTaxTest.txt
Original file line number Diff line number Diff line change
@@ -1,145 +1,145 @@
curl -u <AccountNumber>:<LicenseKey> -H "Content-Type: text/json" -d '{
"DocDate": "2013-06-01",
"CustomerCode": "uniqueCustomerId",
"CompanyCode": "SDK",
"DocType": "SalesInvoice",
"Commit": false,
"Client": "Cool ERP,3,5",
"DocCode": "someInvoiceNumber",
"DetailLevel": "Tax",
"CustomerUsageType": "G",
"ExemptionNo": "12334",
"Discount": 0,
"PurchaseOrderNo":"PO 23423",
"ReferenceCode":"",
"PosLaneCode":"",
"BusinessIdentificationNo":"",
"TaxOverride":
{
"Reason":"Item Returned",
"TaxDate":"2013-05-05",
"TaxOverrideType":"TaxDate"
},
"Addresses":
[
{
"AddressCode": "Origin",
"Line1": "118 N Clark St",
"City": "Chicago",
"Region": "IL",
"PostalCode": "60602-1304",
"Country": "US"
},
{
"AddressCode": "Dest",
"Line1": "1060 W. Addison St",
"City": "Chicago",
"Region": "IL",
"PostalCode": "60613-4566",
"Country": "US"
}
],
"Lines":
[
{
"LineNo": "00001",
"DestinationCode": "Dest",
"OriginCode": "Origin",
"ItemCode": "SP-001",
"Description": "Running Shoe",
"TaxCode": "PC030147",
"Qty": 1,
"Amount": 100
}
]
}' "https://development.avalara.net/1.0/tax/get"

Where <AccountNumber> is your AvaTax account number, and <LicenseKey> is your AvaTax account license key.

Expected response:
{
"ResultCode": "Success",
"DocCode": "someInvoiceNumber",
"DocDate": "2013-06-01",
"Timestamp": "2013-10-10T02:24:51.0304498Z",
"TotalAmount": "100",
"TotalDiscount": "0",
"TotalExemption": "100",
"TotalTaxable": "0",
"TotalTax": "0",
"TotalTaxCalculated": "0",
"TaxLines": [
{
"LineNo": "00001",
"TaxCode": "PC030147",
"Taxability": "true",
"BoundaryLevel": "Address",
"Exemption": "100",
"Discount": "0",
"Taxable": "0",
"Rate": "0.092500",
"Tax": "0",
"TaxCalculated": "0",
"TaxDetails": [
{
"Country": "US",
"Region": "IL",
"JurisType": "State",
"Taxable": "0",
"Rate": "0.062500",
"Tax": "0",
"JurisName": "ILLINOIS",
"TaxName": "IL STATE TAX"}
,{
"Country": "US",
"Region": "IL",
"JurisType": "County",
"Taxable": "0",
"Rate": "0.007500",
"Tax": "0",
"JurisName": "COOK",
"TaxName": "IL COUNTY TAX"}
,{
"Country": "US",
"Region": "IL",
"JurisType": "City",
"Taxable": "0",
"Rate": "0.012500",
"Tax": "0",
"JurisName": "CHICAGO",
"TaxName": "IL CITY TAX"}
,{
"Country": "US",
"Region": "IL",
"JurisType": "Special",
"Taxable": "0",
"Rate": "0.010000",
"Tax": "0",
"JurisName": "REGIONAL TRANSPORT. AUTHORITY (RTA)",
"TaxName": "IL SPECIAL TAX"}
]
}
]
,
"TaxAddresses": [
{
"AddressCode": "Dest",
"Country": "US",
"Region": "IL",
"TaxRegionId": "2062953",
"JurisCode": "1703114000",
"Address": "1060 W ADDISON ST",
"City": "CHICAGO",
"PostalCode": "60613-4566"}
,{
"AddressCode": "Origin",
"Country": "US",
"Region": "IL",
"TaxRegionId": "2062953",
"JurisCode": "1703114000",
"Address": "118 N CLARK ST",
"City": "CHICAGO",
"PostalCode": "60602-1304"}
]
,
"TaxDate": "2013-05-05"}
curl -u <AccountNumber>:<LicenseKey> -H "Content-Type: text/json" -d '{
"DocDate": "2013-06-01",
"CustomerCode": "uniqueCustomerId",
"CompanyCode": "SDK",
"DocType": "SalesInvoice",
"Commit": false,
"Client": "Cool ERP,3,5",
"DocCode": "someInvoiceNumber",
"DetailLevel": "Tax",
"CustomerUsageType": "G",
"ExemptionNo": "12334",
"Discount": 0,
"PurchaseOrderNo":"PO 23423",
"ReferenceCode":"",
"PosLaneCode":"",
"BusinessIdentificationNo":"",
"TaxOverride":
{
"Reason":"Item Returned",
"TaxDate":"2013-05-05",
"TaxOverrideType":"TaxDate"
},
"Addresses":
[
{
"AddressCode": "Origin",
"Line1": "118 N Clark St",
"City": "Chicago",
"Region": "IL",
"PostalCode": "60602-1304",
"Country": "US"
},
{
"AddressCode": "Dest",
"Line1": "1060 W. Addison St",
"City": "Chicago",
"Region": "IL",
"PostalCode": "60613-4566",
"Country": "US"
}
],
"Lines":
[
{
"LineNo": "00001",
"DestinationCode": "Dest",
"OriginCode": "Origin",
"ItemCode": "SP-001",
"Description": "Running Shoe",
"TaxCode": "PC030147",
"Qty": 1,
"Amount": 100
}
]
}' "https://development.avalara.net/1.0/tax/get"
Where <AccountNumber> is your AvaTax account number, and <LicenseKey> is your AvaTax account license key.
Expected response:
{
"ResultCode": "Success",
"DocCode": "someInvoiceNumber",
"DocDate": "2013-06-01",
"Timestamp": "2013-10-10T02:24:51.0304498Z",
"TotalAmount": "100",
"TotalDiscount": "0",
"TotalExemption": "100",
"TotalTaxable": "0",
"TotalTax": "0",
"TotalTaxCalculated": "0",
"TaxLines": [
{
"LineNo": "00001",
"TaxCode": "PC030147",
"Taxability": "true",
"BoundaryLevel": "Address",
"Exemption": "100",
"Discount": "0",
"Taxable": "0",
"Rate": "0.092500",
"Tax": "0",
"TaxCalculated": "0",
"TaxDetails": [
{
"Country": "US",
"Region": "IL",
"JurisType": "State",
"Taxable": "0",
"Rate": "0.062500",
"Tax": "0",
"JurisName": "ILLINOIS",
"TaxName": "IL STATE TAX"}
,{
"Country": "US",
"Region": "IL",
"JurisType": "County",
"Taxable": "0",
"Rate": "0.007500",
"Tax": "0",
"JurisName": "COOK",
"TaxName": "IL COUNTY TAX"}
,{
"Country": "US",
"Region": "IL",
"JurisType": "City",
"Taxable": "0",
"Rate": "0.012500",
"Tax": "0",
"JurisName": "CHICAGO",
"TaxName": "IL CITY TAX"}
,{
"Country": "US",
"Region": "IL",
"JurisType": "Special",
"Taxable": "0",
"Rate": "0.010000",
"Tax": "0",
"JurisName": "REGIONAL TRANSPORT. AUTHORITY (RTA)",
"TaxName": "IL SPECIAL TAX"}
]
}
]
,
"TaxAddresses": [
{
"AddressCode": "Dest",
"Country": "US",
"Region": "IL",
"TaxRegionId": "2062953",
"JurisCode": "1703114000",
"Address": "1060 W ADDISON ST",
"City": "CHICAGO",
"PostalCode": "60613-4566"}
,{
"AddressCode": "Origin",
"Country": "US",
"Region": "IL",
"TaxRegionId": "2062953",
"JurisCode": "1703114000",
"Address": "118 N CLARK ST",
"City": "CHICAGO",
"PostalCode": "60602-1304"}
]
,
"TaxDate": "2013-05-05"}
Empty file added PingTest.txt
Empty file.
38 changes: 37 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,40 @@
AvaTax-Calc-REST-cURL
AvaTax-REST-cURL
=====================

This is a set of cURL sample requests and expected responses demonstrating the [AvaTax REST API](http://developer.avalara.com/api-docs/rest) methods:
[tax/get POST](http://developer.avalara.com/api-docs/rest/tax/post/), [tax/get GET](http://developer.avalara.com/api-docs/rest/tax/get), [tax/cancel POST](http://developer.avalara.com/api-docs/rest/tax/cancel), and [address/validate GET](http://developer.avalara.com/api-docs/rest/address-validation).

For more information on the use of these methods and the AvaTax product, please visit our [developer site](http://developer.avalara.com/) or [homepage](http://www.avalara.com/)

Contents:
----------

<table>
<th colspan="2" align=left>Sample Files</th>
<tr><td>CancelTaxTest.txt</td><td>Demonstrates the <a href="http://developer.avalara.com/api-docs/rest/tax/cancel">CancelTax</a> method used to <a href="http://developer.avalara.com/api-docs/api-reference/canceltax">void a document</a>.</td></tr>
<tr><td>EstimateTaxTest.txt</td><td>Demonstrates the <a href="http://developer.avalara.com/api-docs/rest/tax/get">EstimateTax</a> method used for product- and line- indifferent tax estimates.</td></tr>
<tr><td>GetTaxTest.txt</td><td>Demonstrates the <a href="http://developer.avalara.com/api-docs/rest/tax/post">GetTax</a> method used for product- and line- specific <a href="http://developer.avalara.com/api-docs/api-reference/gettax">calculation</a>.</td></tr>
<tr><td>PingTest.txt</td><td>Uses a hardcoded EstimateTax call to test connectivity and credential information.</td></tr>
<tr><td>ValidateAddressTest.txt</td><td>Demonstrates the <a href="http://developer.avalara.com/api-docs/rest/address-validation">ValidateAddress</a> method to <a href="http://developer.avalara.com/api-docs/api-reference/address-validation">normalize an address</a>.</td></tr>
<th colspan="2" align=left>Other Files</th>
<tr><td>.gitattributes</td><td>-</td></tr>
<tr><td>.gitignore</td><td>-</td></tr>
<tr><td>LICENSE.md</td><td>-</td></tr>
<tr><td>README.md</td><td>-</td></tr>
</table>

Dependencies:
-----------
- Ruby 1.9.2 or later

Requirements:
----------
- Make sure to install any required gems by navigating to the root directory in the command line and running "bundle install".
- Authentication requires an valid **Account Number** and **License Key**, which should be entered in the test file (e.g. GetTaxTest.rb) you would like to run.
- If you do not have an AvaTax account, a free trial account can be acquired through our [developer site](http://developer.avalara.com/api-get-started)


AvaTax-REST-cURL
=====================

Set of cURL sample requests and expected responses for the AvaTax tax calcluation REST API
Expand Down
File renamed without changes.

0 comments on commit 227c2f4

Please sign in to comment.