Megaventory API v2017a

<back to all web services

TaxGet

The following routes are available for this service:
GET POST/Tax/TaxGetGets information on current taxesUses your API Key and some Filters in an array format and returns the search results using the given filters. Optionally, you can use ReturnTopNRecords to limit the number of the results to the specified number (omit, or add ReturnTopNRecords = -1 to get all the available results). The ReturnTopNRecords chooses the top records in a TaxID descending order.

Examples:



A.

Return the first two mvTax objects with a tax value larger than 3. The results are returned as mvTaxes objects. We can add two Filters by using the AndOr operator as shown below:

Value:

{
   "Filters": [
      {
         "FieldName": "TaxValue",
         "SearchOperator": "GreaterThan",
         "SearchValue": 3
      }
   ],
   "ReturnTopNRecords": 2
}


Response:

{
   "mvTaxes": [
      {
         "TaxID": 352,
         "TaxName": "t5",
         "TaxDescription": "",
         "TaxValue": 5
      },
      {
         "TaxID": 351,
         "TaxName": "t4",
         "TaxDescription": "",
         "TaxValue": 4
      }
   ],
   "ResponseStatus": {
      "ErrorCode": "0"
   }
}

To override the Content-type in your clients HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /csv/reply/TaxGet HTTP/1.1 
Host: api.megaventory.com 
Content-Type: text/csv
Content-Length: length

AndOr,Group,FieldName,SearchOperator,SearchValue
And,Undefined,String,Undefined,String

HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

TaxID,TaxName,TaxDescription,TaxValue
0,String,String,0.00