POST api/v7/TaxClassTaxRules

Add a new tax class and tax type.

Tables Impacted

TaxClassTaxRule, TaxClass, TaxRule, TaxRuleDetail

Request Information

URI Parameters

None.

Body Parameters

the tax class-tax type information

TaxClassTaxRuleDto
NameDescriptionTypeRequired?Additional information
taxClassCode *

Tax Class Code

string

Yes

String length: between 1 and 10, inclusive

className

Tax Class Name

string

No

String length: between 1 and 5, inclusive

subClass

Tax Sub Class

string

No

String length: between 1 and 5, inclusive

taxCode *

Tax Code

string

Yes

String length: between 1 and 16, inclusive

taxRuleCode *

tax Rule code

string

Yes

String length: between 1 and 16, inclusive

startDate *

start date

date

Yes

None.

endDate

end date

date

No

None.

isTaxHoliday

indicate if it is tax holiday

boolean

No

None.

thresholdMethod

threasholdmethod

integer

No

None.

thresholdAmount

thresholdAmount

decimal number

No

None.

returnTaxDays

return tax days.

integer

No

None.

customerAuditDate

Audit information

date

No

None.

Request Formats

application/json, text/json

Sample:
{
  "taxClassCode": "001001",
  "className": "001",
  "subClass": "001",
  "taxCode": "1",
  "taxRuleCode": "1",
  "startDate": "2010-01-01T12:00:00",
  "isTaxHoliday": true,
  "thresholdMethod": 1,
  "thresholdAmount": 1000.0,
  "returnTaxDays": 30,
  "customerAuditDate": "2018-01-01T00:00:00"
}

application/xml, text/xml

Sample:
<TaxClassTaxRule xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <taxRuleCode>1</taxRuleCode>
  <startDate>2010-01-01T12:00:00</startDate>
  <endDate xsi:nil="true" />
  <isTaxHoliday>true</isTaxHoliday>
  <thresholdMethod>1</thresholdMethod>
  <thresholdAmount>1000.0</thresholdAmount>
  <returnTaxDays>30</returnTaxDays>
  <customerAuditDate>2018-01-01T00:00:00</customerAuditDate>
  <taxClassCode>001001</taxClassCode>
  <className>001</className>
  <subClass>001</subClass>
  <taxCode>1</taxCode>
</TaxClassTaxRule>

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>