Megaventory API v2017a

<back to all web services

TaxGet

Gets 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 .soap11 suffix or ?format=soap11

HTTP + SOAP11

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

POST /soap11 HTTP/1.1 
Host: api.megaventory.com 
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: TaxGet

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>

<TaxGet xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Megaventory.APIEndpoints.Operations">
  <Filters xmlns="http://schemas.datacontract.org/2004/07/Megaventory.APIEndpoints">
    <Filter>
      <AndOr>And</AndOr>
      <FieldName>String</FieldName>
      <Group>Undefined</Group>
      <SearchOperator>Undefined</SearchOperator>
      <SearchValue>String</SearchValue>
    </Filter>
  </Filters>
  <ReturnTopNRecords xmlns="http://schemas.datacontract.org/2004/07/Megaventory.APIEndpoints">0</ReturnTopNRecords>
  <APIKEY>String</APIKEY>
  <showDeleted>showOnlyUndeleted</showDeleted>
</TaxGet>

    </soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>

<TaxGetResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Megaventory.APIEndpoints.Operations">
  <mvTaxes xmlns:d2p1="https://api.megaventory.com/types">
    <d2p1:mvTax>
      <d2p1:TaxID>0</d2p1:TaxID>
      <d2p1:TaxName>String</d2p1:TaxName>
      <d2p1:TaxDescription>String</d2p1:TaxDescription>
      <d2p1:TaxValue>0.00</d2p1:TaxValue>
    </d2p1:mvTax>
  </mvTaxes>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
      </d2p1:ResponseError>
    </d2p1:Errors>
  </ResponseStatus>
  <InternalErrorCode>String</InternalErrorCode>
</TaxGetResponse>

    </soap:Body>
</soap:Envelope>