PUT api/v7/Taxes

Add or Update an existing tax.

Tables Impacted

Tax, TaxDesc, TaxOrgUnit, TaxTable

Request Information

URI Parameters

None.

Body Parameters

the tax information

TaxDto
NameDescriptionTypeRequired?Additional information
taxCode *

Tax Code

string

Yes

String length: between 1 and 16, inclusive

orgName *

Org Name

string

Conditional

Conditionally required: Either orgName or locationName should be set.

String length: between 1 and 50, inclusive

locationName *

Location Name

string

Conditional

Conditionally required: Either orgName or locationName should be set.

String length: between 1 and 128, inclusive

jurisdiction *

Jurisdiction

string

Conditional

Conditionally required: If TaxType is 'VAT', 'Jurisdiction' must be set.

String length: between 1 and 64, inclusive

taxRate *

Tax rate

decimal number

Conditional

Conditionally required: If adding new tax details, 'Tax Rate' must be set.

taxRateMethod

Tax Rate Method

integer

No

None.

roundingMethod

Rounding Method

integer

No

None.

thresholdMethod

Threshold Method

integer

No

None.

thresholdAmount

Threshold Amount

decimal number

No

None.

exclusive

exclusive

boolean

No

None.

returnTaxDays

Return Tax Days

integer

No

None.

taxTypeCode *

Tax Type Code. If Tax Type code is for 'VAT', then 'Jurisdiction' field must be set

string

Yes

String length: between 1 and 24, inclusive

taxTypeName

Tax Type Name

string

No

String length: between 1 and 64, inclusive

taxTypeCharacters

Associated Character(s) of the tax type

string

No

String length: between 1 and 3, inclusive

taxTableCode

Taxtable Code

string

No

String length: between 1 and 16, inclusive

filePath

File path

string

No

String length: between 1 and 256, inclusive

formula

Formula

string

No

String length: between 1 and 256, inclusive

activeDate *

The date from which the tax would be effective

date

Yes

None.

compoundTax

Compound tax specific tax information

Collection of CompoundTaxDto

No

None.

taxClassInfo

TaxClassInfo contains TaxClass associate with TaxType and also validate TaxRule if any associate with TaxClassCode This TaxClass Info does not support by Tax -PUT/POST API to create mapping. Please use TaxClassTaxType or TaxClassTaxRule API to create mapping

Collection of TaxClassRuleDto

No

None.

culture *

Culture Code. For example: en-US, fr, fr-CA, es, ja-JP etc.

string

Conditional

Conditionally required: Required if you wish to associate description with culture. If not provided, in most cases 'Organizational Culture' is taken

String length: between 1 and 10, inclusive

description *

Description Text (Culture specific)

string

Yes

String length: between 1 and 30, inclusive

customerAuditDate

Audit information

date

No

None.

Request Formats

application/json, text/json

Sample:
{
  "taxCode": "1",
  "orgName": "111",
  "locationName": "111",
  "jurisdiction": "State",
  "taxRate": 5.0,
  "returnTaxDays": 30,
  "taxTypeCode": "1",
  "taxTypeName": "state tax",
  "taxTypeCharacters": "T",
  "taxTableCode": "table01",
  "filePath": "c:\\temp\\",
  "formula": "xyz",
  "activeDate": "0001-01-01T00:00:00",
  "compoundTax": [
    {
      "taxTypeCode": "2",
      "sequence": 1
    }
  ],
  "culture": "en-US",
  "description": "state tax",
  "customerAuditDate": "2018-01-01T00:00:00"
}

Response Information

Resource Description

Returns a HTTPResponse Message stating the success/failure of API Action

HttpResponseMessage
NameDescriptionType
Version

Version
Content

HttpContent
StatusCode

HttpStatusCode
ReasonPhrase

string
Headers

Collection of Object
RequestMessage

HttpRequestMessage
IsSuccessStatusCode

boolean

Response Formats

application/json, text/json

Sample:
{
  "message": "Record successfully saved.",
  "propertyName": "Success"
}

application/xml, text/xml

Sample:
<ApiValidationMessage xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <message>Record successfully saved.</message>
  <propertyName>Success</propertyName>
</ApiValidationMessage>