TAG LINE
SMALL TITLE

Tax / Code

(API Version v4)


Represents a container that holds a set of the Tax Rates such as "Texas Taxes"


What can you do with TaxCode?


Properties

Property Details
identity
READ-ONLY
"identity": 0
Type: Number
This is the unique numeric identifier for the TaxCode
countryId
"countryId": 17
Type: Number
Unique identifier for the associated Country object.
countryName
"countryName": "Sample Name"
Type: String
The name of the object associated with the countryId property.
stateId
"stateId": 4
Type: Number
Unique identifier for the associated State object.
stateName
"stateName": "Sample Name"
Type: String
The name of the object associated with the stateId property.
name
"name": "Texas Taxes"
Type: String
User defined name for the Tax Code.
ownerId
READ-ONLY
"ownerId": 24
Type: Number
Unique identifier for the associated Owner object.
ownerName
READ-ONLY
"ownerName": "Sample Name"
Type: String
The name of the object associated with the ownerId property.
accountTaxCategoryId
"accountTaxCategoryId": 18
Type: Number
Unique identifier for the associated AccountTaxCategory object.
accountTaxCategoryName
"accountTaxCategoryName": "Sample Name"
Type: String
The name of the object associated with the accountTaxCategoryId property.
serviceTaxCategoryId
"serviceTaxCategoryId": 26
Type: Number
Unique identifier for the associated ServiceTaxCategory object.
serviceTaxCategoryName
"serviceTaxCategoryName": "Sample Name"
Type: String
The name of the object associated with the serviceTaxCategoryId property.
taxVendorId
"taxVendorId": 20
Type: Number
Unique identifier for the associated TaxVendor object.
taxVendorName
"taxVendorName": "Sample Name"
Type: String
The name of the object associated with the taxVendorId property.
isReverseVat
"isReverseVat": true
Type: Boolean
Whether or not to calculate the tax but not apply it to the transaction. You want to report the tax but not charge for it.
displayName
"displayName": "State Taxes"
Type: String
User defined report/invoice friendly name the Tax Code.
isUsageTaxOnly
"isUsageTaxOnly": true
Type: Boolean
Whether or not this Tax Code should only be applied to usage charges.


Patch Types

The PATCH verb allows you to update an object. Just like a put, you only need to supply the fields that will be updated in the payload. However, a patch allows you to update many objects at once.

PATCH operations can be used as a standard API call or nested within the envelope of a DataFlow. Below you will find the child objects that can be updated as part of PATCH operations for the TaxCode object.

Standard PATCH objects:

DataFlow PATCH objects:


End Points

DELETEapi/v4/Tax/Code/{id}
Delete an instance of the TaxCode object. Upon successful delete, this API will return a record of all of the reelated objects deleted with this operation. The specifics on which objects have been deleted will depend on which related objects have been populated in the system.
{id}Unique identifier for the TaxCode object.
Delete an instance of the TaxCode object.
DELETE api/v4/Tax/Code/{id}
View Sample Response
HTTP/1.1 200 OK
{
    "trackingId": "d2ae5304-2355-44eb-a328-272f02935f8b",
    "type": "delete",
    "results": {
        "totalCount": 4,
        "items": [
            {
                "identity": 1,
                "action": "deleted",
                "dtoTypeKey": "taxCode"
            },
            {
                "lhsId": 2,
                "rhsId": 2,
                "action": "detached",
                "dtoTypeKey": "sampleObjectConnector"
            },
            {
                "foreignKeyIdentity": 2,
                "action": "deleted",
                "dtoTypeKey": "sampleObject"
            }
        ]
    }
}
GETapi/v4/Tax/Code/
Retrieve all of the TaxCode objects.
Retrieve all of the TaxCode objects.
GET api/v4/Tax/Code/
View Sample Response
HTTP/1.1 200 OK
{
    "trackingId": "d2ae5304-2355-44eb-a328-272f02935f8b",
    "totalCount": 1,
    "items": [
        {
            "identity": 1,
            "countryId": 22,
            "countryName": "Sample Text Data",
            "stateId": 8,
            "stateName": "Sample Text Data",
            "name": "Texas Taxes",
            "ownerId": 25,
            "ownerName": "Sample Text Data",
            "accountTaxCategoryId": 10,
            "accountTaxCategoryName": "Sample Text Data",
            "serviceTaxCategoryId": 16,
            "serviceTaxCategoryName": "Sample Text Data",
            "taxVendorId": 14,
            "taxVendorName": "Sample Text Data",
            "isReverseVat": true,
            "displayName": "State Taxes",
            "isUsageTaxOnly": true
        }
    ]
}
GETapi/v4/Tax/Code/Paged
Retrieve all of the TaxCode objects in a paged fashion. This endpoint implements pagination for its results. Individual pages can be requested to return a particular paged set in the list of results. To learn more, see details on working with paginated endpoints.
Retrieve all of the TaxCode objects in a paged fashion.
GET api/v4/Tax/Code/Paged
View Sample Response
HTTP/1.1 200 OK
{
    "trackingId": "d2ae5304-2355-44eb-a328-272f02935f8b",
    "pagination": {
        "pageNumber": 1,
        "pageSize": 20,
        "excludeTotalCount": false
    },
    "pagedResults": {
        "totalCount": 1,
        "items": [
            {
                "identity": 1,
                "countryId": 22,
                "countryName": "Sample Text Data",
                "stateId": 10,
                "stateName": "Sample Text Data",
                "name": "Texas Taxes",
                "ownerId": 13,
                "ownerName": "Sample Text Data",
                "accountTaxCategoryId": 9,
                "accountTaxCategoryName": "Sample Text Data",
                "serviceTaxCategoryId": 2,
                "serviceTaxCategoryName": "Sample Text Data",
                "taxVendorId": 5,
                "taxVendorName": "Sample Text Data",
                "isReverseVat": true,
                "displayName": "State Taxes",
                "isUsageTaxOnly": true
            }
        ]
    }
}
GETapi/v4/Tax/Code/Paged/Detail
Retrieve all of the TaxCode objects in a paged fashion with all object details. This endpoint returns additional detailed data related to this object. The specifics on which data is returned will depend on which related objects have been populated in the system.
Retrieve all of the TaxCode objects in a paged fashion with all object details.
GET api/v4/Tax/Code/Paged/Detail
View Sample Response
HTTP/1.1 200 OK
{
    "trackingId": "d2ae5304-2355-44eb-a328-272f02935f8b",
    "pagination": {
        "pageNumber": 1,
        "pageSize": 20,
        "excludeTotalCount": false
    },
    "pagedResults": {
        "totalCount": 1,
        "items": [
            {
                "identity": 1,
                "countryId": 2,
                "countryName": "Sample Text Data",
                "stateId": 2,
                "stateName": "Sample Text Data",
                "name": "Texas Taxes",
                "ownerId": 11,
                "ownerName": "Sample Text Data",
                "accountTaxCategoryId": 25,
                "accountTaxCategoryName": "Sample Text Data",
                "serviceTaxCategoryId": 13,
                "serviceTaxCategoryName": "Sample Text Data",
                "taxVendorId": 6,
                "taxVendorName": "Sample Text Data",
                "isReverseVat": true,
                "displayName": "State Taxes",
                "isUsageTaxOnly": true,
                "details": {
                    "sampleSingleObject": {
                        "identity": 2,
                        "property1": "Sample Text",
                        "property2": "2021-04-26T15:25:29.117Z",
                        "property3": 2
                    },
                    "sampleMultipleObjects": {
                        "totalCount": 1,
                        "items": [
                            {
                                "identity": 2,
                                "property1": "Sample Text",
                                "property2": "2021-04-26T15:25:29.117Z",
                                "property3": 2
                            }
                        ]
                    }
                }
            }
        ]
    }
}
GETapi/v4/Tax/Code/{id}
Retrieve an instance of the TaxCode object by its ID.
{id}Unique identifier for the TaxCode object.
Retrieve an instance of the TaxCode object by its ID.
GET api/v4/Tax/Code/{id}
View Sample Response
HTTP/1.1 200 OK
{
    "trackingId": "d2ae5304-2355-44eb-a328-272f02935f8b",
    "instance": {
        "identity": 1,
        "countryId": 14,
        "countryName": "Sample Text Data",
        "stateId": 3,
        "stateName": "Sample Text Data",
        "name": "Texas Taxes",
        "ownerId": 6,
        "ownerName": "Sample Text Data",
        "accountTaxCategoryId": 5,
        "accountTaxCategoryName": "Sample Text Data",
        "serviceTaxCategoryId": 13,
        "serviceTaxCategoryName": "Sample Text Data",
        "taxVendorId": 26,
        "taxVendorName": "Sample Text Data",
        "isReverseVat": true,
        "displayName": "State Taxes",
        "isUsageTaxOnly": true
    }
}
GETapi/v4/Tax/Code/{id}/Detail
Retrieve deep detail of the TaxCode object by its ID. This endpoint returns additional detailed data related to this object. The specifics on which data is returned will depend on which related objects have been populated in the system.
{id}Unique identifier for the TaxCode object.
Retrieve deep detail of the TaxCode object by its ID.
GET api/v4/Tax/Code/{id}/Detail
View Sample Response
HTTP/1.1 200 OK
{
    "trackingId": "d2ae5304-2355-44eb-a328-272f02935f8b",
    "instance": {
        "identity": 1,
        "countryId": 27,
        "countryName": "Sample Text Data",
        "stateId": 23,
        "stateName": "Sample Text Data",
        "name": "Texas Taxes",
        "ownerId": 0,
        "ownerName": "Sample Text Data",
        "accountTaxCategoryId": 25,
        "accountTaxCategoryName": "Sample Text Data",
        "serviceTaxCategoryId": 0,
        "serviceTaxCategoryName": "Sample Text Data",
        "taxVendorId": 20,
        "taxVendorName": "Sample Text Data",
        "isReverseVat": true,
        "displayName": "State Taxes",
        "isUsageTaxOnly": true,
        "details": {
            "sampleSingleObject": {
                "identity": 2,
                "property1": "Sample Text",
                "property2": "2021-04-26T15:25:29.117Z",
                "property3": 2
            },
            "sampleMultipleObjects": {
                "totalCount": 1,
                "items": [
                    {
                        "identity": 2,
                        "property1": "Sample Text",
                        "property2": "2021-04-26T15:25:29.117Z",
                        "property3": 2
                    }
                ]
            }
        }
    }
}
PATCHapi/v4/Tax/Code/{id}
Update or Add the TaxCode object and optionally make changes to any child objects. Patch end points allow for adding/updating multiple related entities and the results of those changes will be reported in the response JSON payload in the items array.
{id}Unique identifier for the TaxCode object.
Update or Add the TaxCode object and optionally make changes to any child objects.
PATCH api/v4/Tax/Code/{id}

{
    "details": {},
    "taxCodes": {
        "items": [
            {
                "patchType": "create",
                "patchClientId": 1,
                "countryId": 1,
                "stateId": 5,
                "name": "Texas Taxes",
                "accountTaxCategoryId": 18,
                "serviceTaxCategoryId": 19,
                "taxVendorId": 14,
                "isReverseVat": true,
                "displayName": "State Taxes",
                "isUsageTaxOnly": true
            }
        ]
    }
}
View Sample Response
HTTP/1.1 200 OK
{
    "trackingId": "d2ae5304-2355-44eb-a328-272f02935f8b",
    "type": "patch",
    "results": {
        "totalCount": 1,
        "items": [
            {
                "identity": 1,
                "action": "created",
                "dtoTypeKey": "taxCode",
                "instance": {
                    "identity": 1,
                    "countryId": 17,
                    "countryName": "Sample Text Data",
                    "stateId": 10,
                    "stateName": "Sample Text Data",
                    "name": "Texas Taxes",
                    "ownerId": 17,
                    "ownerName": "Sample Text Data",
                    "accountTaxCategoryId": 11,
                    "accountTaxCategoryName": "Sample Text Data",
                    "serviceTaxCategoryId": 13,
                    "serviceTaxCategoryName": "Sample Text Data",
                    "taxVendorId": 14,
                    "taxVendorName": "Sample Text Data",
                    "isReverseVat": true,
                    "displayName": "State Taxes",
                    "isUsageTaxOnly": true
                }
            }
        ]
    }
}
POSTapi/v4/Tax/Code/
Create a new instance of the TaxCode object.
Create a new instance of the TaxCode object.
POST api/v4/Tax/Code/

{
    "countryId": 27,
    "stateId": 4,
    "name": "Texas Taxes",
    "accountTaxCategoryId": 0,
    "serviceTaxCategoryId": 20,
    "taxVendorId": 23,
    "isReverseVat": true,
    "displayName": "State Taxes",
    "isUsageTaxOnly": true
}
View Sample Response
HTTP/1.1 200 OK
{
    "trackingId": "d2ae5304-2355-44eb-a328-272f02935f8b",
    "type": "create",
    "results": {
        "totalCount": 1,
        "items": [
            {
                "identity": 1,
                "countryId": 7,
                "countryName": "Sample Text Data",
                "stateId": 8,
                "stateName": "Sample Text Data",
                "name": "Texas Taxes",
                "ownerId": 8,
                "ownerName": "Sample Text Data",
                "accountTaxCategoryId": 3,
                "accountTaxCategoryName": "Sample Text Data",
                "serviceTaxCategoryId": 8,
                "serviceTaxCategoryName": "Sample Text Data",
                "taxVendorId": 4,
                "taxVendorName": "Sample Text Data",
                "isReverseVat": true,
                "displayName": "State Taxes",
                "isUsageTaxOnly": true
            }
        ]
    }
}
POSTapi/v4/Tax/Code/Search
Retreive a list of TaxCode objects based on search criteria. Search end points allow for retrieving results based on search criteria. Search criteria is sent as the payload of the POST.
Retreive a list of TaxCode objects based on search criteria.
POST api/v4/Tax/Code/Search

{
    "query": {
        "top": 20,
        "search": [
            {
                "name": "MyFieldName",
                "operator": "startsWith",
                "value": "a"
            }
        ]
    }
}
View Sample Response
HTTP/1.1 200 OK
{
    "trackingId": "d2ae5304-2355-44eb-a328-272f02935f8b",
    "itemCount": 1,
    "items": [
        {
            "identity": 1,
            "countryId": 15,
            "countryName": "Sample Text Data",
            "stateId": 24,
            "stateName": "Sample Text Data",
            "name": "Texas Taxes",
            "ownerId": 20,
            "ownerName": "Sample Text Data",
            "accountTaxCategoryId": 21,
            "accountTaxCategoryName": "Sample Text Data",
            "serviceTaxCategoryId": 14,
            "serviceTaxCategoryName": "Sample Text Data",
            "taxVendorId": 17,
            "taxVendorName": "Sample Text Data",
            "isReverseVat": true,
            "displayName": "State Taxes",
            "isUsageTaxOnly": true
        }
    ]
}
PUTapi/v4/Tax/Code/{id}
Update an existing instance of the TaxCode object.
Update an existing instance of the TaxCode object.
PUT api/v4/Tax/Code/{id}

{
    "identity": 1,
    "countryId": 13,
    "stateId": 23,
    "name": "Texas Taxes",
    "accountTaxCategoryId": 8,
    "serviceTaxCategoryId": 3,
    "taxVendorId": 7,
    "isReverseVat": true,
    "displayName": "State Taxes",
    "isUsageTaxOnly": true
}
View Sample Response
HTTP/1.1 200 OK
{
    "trackingId": "d2ae5304-2355-44eb-a328-272f02935f8b",
    "type": "update",
    "results": {
        "totalCount": 1,
        "items": [
            {
                "identity": 1,
                "countryId": 11,
                "countryName": "Sample Text Data",
                "stateId": 4,
                "stateName": "Sample Text Data",
                "name": "Texas Taxes",
                "ownerId": 0,
                "ownerName": "Sample Text Data",
                "accountTaxCategoryId": 9,
                "accountTaxCategoryName": "Sample Text Data",
                "serviceTaxCategoryId": 12,
                "serviceTaxCategoryName": "Sample Text Data",
                "taxVendorId": 6,
                "taxVendorName": "Sample Text Data",
                "isReverseVat": true,
                "displayName": "State Taxes",
                "isUsageTaxOnly": true
            }
        ]
    }
}