API Documentation

In-depth reference documentation for iQmetrix API's.

NAV

OVERVIEW

This is a DRAFT specification provided for apprasial use only. Once the development team has approved the specification is accurate, resource descriptions will be added and this notation will be removed.

ENDPOINTS

Sandbox: https://iqtaxproviderdemo.iqmetrix.net
Production: https://iqtaxprovider.iqmetrix.net

RESOURCES

TaxRates

[
    {
        "Id": "bf36136e-a1df-8d2a-5094-3e6efd6f50de",
        "CompanyId": 14146,
        "Name": "My New Tax Rate",
        "DisplayName": "MNTR",
        "Description": "MNTR $0.9999",
        "Rate": 0.9999,
        "TaxRateType": "FlatRate",
        "StartDateUtc": "2016-01-01T06:00:00",
        "EndDateUtc": "2016-01-12T06:00:00",
        "IsActive": true
    }
]
Name Description
Id (GUID)  
CompanyId (Integer)  
Name (String)  
DisplayName (String)  
Description (String)  
Rate (Decimal)  
TaxRateType (String)  
StartDateUtc (DateTime)  
EndDateUtc (DateTime)  
IsActive (Boolean)  

TaxMapping

{
    "Id": "3b67e4bb-7ab1-5cfb-b79b-602e1a47cef8",
    "CompanyId": 14146,
    "TaxCategory": "",
    "TaxCategoryId": "c5ca71bc-7d32-96c6-0f85-32a1cb73eb57",
    "CorrelationId": "215a316b-8727-ca5a-b3da-1b57baddc07b",
    "TaxRateIds": "8a42a950-c669-25b2-1512-041b2b668af5",
    "TaxRates": [
        {
            "Id": "bf36136e-a1df-8d2a-5094-3e6efd6f50de",
            "CompanyId": 14146,
            "Name": "My New Tax Rate",
            "DisplayName": "MNTR",
            "Description": "MNTR $0.9999",
            "Rate": 0.9999,
            "TaxRateType": "FlatRate",
            "StartDateUtc": "2016-01-01T06:00:00",
            "EndDateUtc": "2016-01-12T06:00:00",
            "IsActive": true
        }
    ]
}
Name Description
Id (GUID)  
CompanyId (Integer)  
TaxCategory (String)  
TaxCategoryId (GUID)  
CorrelationId (GUID)  
TaxRateIds (GUID)  
TaxRates (Array[TaxRates])  

TaxCategory

[
    {
        "Id": "b0d13457-7807-8b68-77b5-142086afbebb",
        "CompanyId": 14146,
        "Name": "Default",
        "Description": "Default TaxCategory for all companies",
        "IsDefault": true,
        "ProductCatalogIds": "",
        "TaxMapping": [
            {
                "Id": "3b67e4bb-7ab1-5cfb-b79b-602e1a47cef8",
                "CompanyId": 14146,
                "TaxCategory": "",
                "TaxCategoryId": "c5ca71bc-7d32-96c6-0f85-32a1cb73eb57",
                "CorrelationId": "215a316b-8727-ca5a-b3da-1b57baddc07b",
                "TaxRateIds": "8a42a950-c669-25b2-1512-041b2b668af5",
                "TaxRates": [
                    {
                        "Id": "bf36136e-a1df-8d2a-5094-3e6efd6f50de",
                        "CompanyId": 14146,
                        "Name": "My New Tax Rate",
                        "DisplayName": "MNTR",
                        "Description": "MNTR $0.9999",
                        "Rate": 0.9999,
                        "TaxRateType": "FlatRate",
                        "StartDateUtc": "2016-01-01T06:00:00",
                        "EndDateUtc": "2016-01-12T06:00:00",
                        "IsActive": true
                    }
                ]
            }
        ]
    }
]
Name Description
Id (GUID)  
CompanyId (Integer)  
Name (String)  
Description (String)  
IsDefault (Boolean)  
ProductCatalogIds (String)  
TaxMapping (Array[TaxMapping])  

TaxRate

[
    {
        "Id": "b91d8eb5-02b3-422d-be14-36cc87f3eb7d",
        "CompanyId": 14146,
        "Name": "My New Tax Rate",
        "DisplayName": "MNTR",
        "Description": "MNTR $0.9999",
        "Rate": 0.9999,
        "TaxRateType": "FlatRate",
        "StartDateUtc": "0001-01-01T06:00:00",
        "EndDateUtc": "9999-12-31T23:59:59.9999999",
        "IsActive": true
    }
]
Name Description
Id (GUID)  
CompanyId (Integer)  
Name (String)  
DisplayName (String)  
Description (String)  
Rate (Decimal)  
TaxRateType (String)  
StartDateUtc (DateTime)  
EndDateUtc (DateTime)  
IsActive (Boolean)  

TaxRateEntityAssociation

[
    {
        "Id": "831c3ed1-47e0-3388-6836-99618a59f270",
        "CompanyId": 14146,
        "EntityId": 14192,
        "TaxRateId": "f22f2ce4-e499-1c17-9ac6-accebf18dbda",
        "TaxRate": [
            {
                "Id": "b91d8eb5-02b3-422d-be14-36cc87f3eb7d",
                "CompanyId": 14146,
                "Name": "My New Tax Rate",
                "DisplayName": "MNTR",
                "Description": "MNTR $0.9999",
                "Rate": 0.9999,
                "TaxRateType": "FlatRate",
                "StartDateUtc": "0001-01-01T06:00:00",
                "EndDateUtc": "9999-12-31T23:59:59.9999999",
                "IsActive": true
            }
        ]
    }
]
Name Description
Id (GUID)  
CompanyId (Integer)  
EntityId (Integer)  
TaxRateId (GUID)  
TaxRate (Array[TaxRate])  

TaxCalculation

[
    {
        "Id": "831c3ed1-47e0-3388-6836-99618a59f270",
        "CompanyId": 14146,
        "EntityId": 14192,
        "LineItems": [
            {
                "LineNumber": 1,
                "ProductCatalogId": "0C424007-D07E-4BCD-884B-F766641F8AA1",
                "Price": 24.99,
                "Quantity": 1
            }
        ]
    }
]
Name Description
Id (GUID)  
CompanyId (Integer)  
EntityId (Integer)  
LineItems (Array[LineItem])  

LineItem

{
    "LineNumber": 1,
    "ProductCatalogId": "0C424007-D07E-4BCD-884B-F766641F8AA1",
    "Price": 24.99,
    "Quantity": 1
}
Name Description
LineNumber (Integer)  
ProductCatalogId (GUID)  
Price (Decimal)  
Quantity (Integer)  

REQUESTS

POST a Tax Calcuation

Request

POST /TaxCalculation

Example Request

POST /TaxCalculation
Authorization: Bearer (Access Token)
Accept: application/json
Content-Type: application/json

[
    {
        "Id": "831c3ed1-47e0-3388-6836-99618a59f270",
        "CompanyId": 14146,
        "EntityId": 14192,
        "LineItems": [
            {
                "LineNumber": 1,
                "ProductCatalogId": "0C424007-D07E-4BCD-884B-F766641F8AA1",
                "Price": 24.99,
                "Quantity": 1
            }
        ]
    }
]
curl -X POST "https://iqtaxproviderdemo.iqmetrix.net/TaxCalculation" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json" -H "Content-Type: application/json" -d '[
    {
        "Id": "831c3ed1-47e0-3388-6836-99618a59f270",
        "CompanyId": 14146,
        "EntityId": 14192,
        "LineItems": [
            {
                "LineNumber": 1,
                "ProductCatalogId": "0C424007-D07E-4BCD-884B-F766641F8AA1",
                "Price": 24.99,
                "Quantity": 1
            }
        ]
    }
]'
static IRestResponse CreatingATaxCalcuation()
{
    var client = new RestClient("https://iqtaxproviderdemo.iqmetrix.net/TaxCalculation");
    var request = new RestRequest(Method.POST);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 
    request.AddHeader("Content-Type", "application/json"); 

     request.AddParameter("application/json", "[{\"Id\":\"831c3ed1-47e0-3388-6836-99618a59f270\",\"CompanyId\":14146,\"EntityId\":14192,\"LineItems\":[{\"LineNumber\":1,\"ProductCatalogId\":\"0C424007-D07E-4BCD-884B-F766641F8AA1\",\"Price\":24.99,\"Quantity\":1}]}]", ParameterType.RequestBody);

    return client.Execute(request);
}
import org.apache.http.entity.StringEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse CreatingATaxCalcuation() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpPost request = new HttpPost("https://iqtaxproviderdemo.iqmetrix.net/TaxCalculation");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    request.addHeader("Content-Type", "application/json"); 
    StringEntity body = new StringEntity("[{\"Id\":\"831c3ed1-47e0-3388-6836-99618a59f270\",\"CompanyId\":14146,\"EntityId\":14192,\"LineItems\":[{\"LineNumber\":1,\"ProductCatalogId\":\"0C424007-D07E-4BCD-884B-F766641F8AA1\",\"Price\":24.99,\"Quantity\":1}]}]");
    request.setEntity(body);
    
    return httpClient.execute(request);
}
require 'rest-client'

body = "[{\"Id\":\"831c3ed1-47e0-3388-6836-99618a59f270\",\"CompanyId\":14146,\"EntityId\":14192,\"LineItems\":[{\"LineNumber\":1,\"ProductCatalogId\":\"0C424007-D07E-4BCD-884B-F766641F8AA1\",\"Price\":24.99,\"Quantity\":1}]}]";

response = RestClient.post 'https://iqtaxproviderdemo.iqmetrix.net/TaxCalculation', body, {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
     :'Content-Type' => 'application/json',
    } 

puts response

Request Parameters

Response Parameters

Example Response

HTTP 202 Content-Type: application/json
[
    {
        "Id": "831c3ed1-47e0-3388-6836-99618a59f270",
        "CompanyId": 14146,
        "EntityId": 14192,
        "LineItems": [
            {
                "LineNumber": 1,
                "ProductCatalogId": "0C424007-D07E-4BCD-884B-F766641F8AA1",
                "Price": 24.99,
                "Quantity": 1
            }
        ]
    }
]

Array[TaxCalculation]

GET Tax Categories

Request

GET /Companies({CompanyId})/TaxCategories

Example Request

GET /Companies(14146)/TaxCategories
Authorization: Bearer (Access Token)
Accept: application/json

curl -X GET "https://iqtaxproviderdemo.iqmetrix.net/Companies(14146)/TaxCategories" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json"
static IRestResponse GettingTaxCategories()
{
    var client = new RestClient("https://iqtaxproviderdemo.iqmetrix.net/Companies(14146)/TaxCategories");
    var request = new RestRequest(Method.GET);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 

    

    return client.Execute(request);
}

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse GettingTaxCategories() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://iqtaxproviderdemo.iqmetrix.net/Companies(14146)/TaxCategories");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.get 'https://iqtaxproviderdemo.iqmetrix.net/Companies(14146)/TaxCategories', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
[
    {
        "Id": "b0d13457-7807-8b68-77b5-142086afbebb",
        "CompanyId": 14146,
        "Name": "Default",
        "Description": "Default TaxCategory for all companies",
        "IsDefault": true,
        "ProductCatalogIds": "",
        "TaxMapping": [
            {
                "Id": "3b67e4bb-7ab1-5cfb-b79b-602e1a47cef8",
                "CompanyId": 14146,
                "TaxCategory": "",
                "TaxCategoryId": "c5ca71bc-7d32-96c6-0f85-32a1cb73eb57",
                "CorrelationId": "215a316b-8727-ca5a-b3da-1b57baddc07b",
                "TaxRateIds": "8a42a950-c669-25b2-1512-041b2b668af5",
                "TaxRates": [
                    {
                        "Id": "bf36136e-a1df-8d2a-5094-3e6efd6f50de",
                        "CompanyId": 14146,
                        "Name": "My New Tax Rate",
                        "DisplayName": "MNTR",
                        "Description": "MNTR $0.9999",
                        "Rate": 0.9999,
                        "TaxRateType": "FlatRate",
                        "StartDateUtc": "2016-01-01T06:00:00",
                        "EndDateUtc": "2016-01-12T06:00:00",
                        "IsActive": true
                    }
                ]
            }
        ]
    }
]

Array[TaxCategory]

GET Tax Rates

Request

GET /Companies({CompanyId})/TaxRates

Example Request

GET /Companies(14146)/TaxRates
Authorization: Bearer (Access Token)
Accept: application/json

curl -X GET "https://iqtaxproviderdemo.iqmetrix.net/Companies(14146)/TaxRates" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json"
static IRestResponse GettingTaxRates()
{
    var client = new RestClient("https://iqtaxproviderdemo.iqmetrix.net/Companies(14146)/TaxRates");
    var request = new RestRequest(Method.GET);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 

    

    return client.Execute(request);
}

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse GettingTaxRates() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://iqtaxproviderdemo.iqmetrix.net/Companies(14146)/TaxRates");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.get 'https://iqtaxproviderdemo.iqmetrix.net/Companies(14146)/TaxRates', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
[
    {
        "Id": "b91d8eb5-02b3-422d-be14-36cc87f3eb7d",
        "CompanyId": 14146,
        "Name": "My New Tax Rate",
        "DisplayName": "MNTR",
        "Description": "MNTR $0.9999",
        "Rate": 0.9999,
        "TaxRateType": "FlatRate",
        "StartDateUtc": "0001-01-01T06:00:00",
        "EndDateUtc": "9999-12-31T23:59:59.9999999",
        "IsActive": true
    }
]

Array[TaxRate]

GET Tax Rates for Entities

Request

GET /Companies({CompanyId})/TaxRateEntityAssociations

Example Request

GET /Companies(14146)/TaxRateEntityAssociations
Authorization: Bearer (Access Token)
Accept: application/json

curl -X GET "https://iqtaxproviderdemo.iqmetrix.net/Companies(14146)/TaxRateEntityAssociations" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json"
static IRestResponse GettingTaxRatesForEntities()
{
    var client = new RestClient("https://iqtaxproviderdemo.iqmetrix.net/Companies(14146)/TaxRateEntityAssociations");
    var request = new RestRequest(Method.GET);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 

    

    return client.Execute(request);
}

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse GettingTaxRatesForEntities() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://iqtaxproviderdemo.iqmetrix.net/Companies(14146)/TaxRateEntityAssociations");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.get 'https://iqtaxproviderdemo.iqmetrix.net/Companies(14146)/TaxRateEntityAssociations', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
[
    {
        "Id": "831c3ed1-47e0-3388-6836-99618a59f270",
        "CompanyId": 14146,
        "EntityId": 14192,
        "TaxRateId": "f22f2ce4-e499-1c17-9ac6-accebf18dbda",
        "TaxRate": [
            {
                "Id": "b91d8eb5-02b3-422d-be14-36cc87f3eb7d",
                "CompanyId": 14146,
                "Name": "My New Tax Rate",
                "DisplayName": "MNTR",
                "Description": "MNTR $0.9999",
                "Rate": 0.9999,
                "TaxRateType": "FlatRate",
                "StartDateUtc": "0001-01-01T06:00:00",
                "EndDateUtc": "9999-12-31T23:59:59.9999999",
                "IsActive": true
            }
        ]
    }
]

Array[TaxRateEntityAssociation]

GET Tax Mappings

Request

GET /Companies({CompanyId})/TaxMappings

Example Request

GET /Companies(14146)/TaxMappings
Authorization: Bearer (Access Token)
Accept: application/json

curl -X GET "https://iqtaxproviderdemo.iqmetrix.net/Companies(14146)/TaxMappings" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json"
static IRestResponse GettingTaxMappings()
{
    var client = new RestClient("https://iqtaxproviderdemo.iqmetrix.net/Companies(14146)/TaxMappings");
    var request = new RestRequest(Method.GET);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 

    

    return client.Execute(request);
}

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse GettingTaxMappings() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://iqtaxproviderdemo.iqmetrix.net/Companies(14146)/TaxMappings");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.get 'https://iqtaxproviderdemo.iqmetrix.net/Companies(14146)/TaxMappings', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
{
    "Id": "3b67e4bb-7ab1-5cfb-b79b-602e1a47cef8",
    "CompanyId": 14146,
    "TaxCategory": "",
    "TaxCategoryId": "c5ca71bc-7d32-96c6-0f85-32a1cb73eb57",
    "CorrelationId": "215a316b-8727-ca5a-b3da-1b57baddc07b",
    "TaxRateIds": "8a42a950-c669-25b2-1512-041b2b668af5",
    "TaxRates": [
        {
            "Id": "bf36136e-a1df-8d2a-5094-3e6efd6f50de",
            "CompanyId": 14146,
            "Name": "My New Tax Rate",
            "DisplayName": "MNTR",
            "Description": "MNTR $0.9999",
            "Rate": 0.9999,
            "TaxRateType": "FlatRate",
            "StartDateUtc": "2016-01-01T06:00:00",
            "EndDateUtc": "2016-01-12T06:00:00",
            "IsActive": true
        }
    ]
}

TaxMapping

Was this page helpful?