Create

Create

Create

Adds a tax code to an account.

Request

Method
URL
POST

Path Parameters

Name
Required
Type
Description
accountUniqueId

Guid
The unique ID of the account.

Headers

Name
Required
Type
Description
APIKey

Guid
A valid API key with a scope of AccountLists

Body

Name
Required
Type
Description
code

Text
The tax code name. Required. Must be 16 characters or fewer and cannot be empty.
agency
Text
The tax agency. Optional — if omitted or explicitly sent as null, it is stored as an empty string. Maximum length is 32 characters if supplied.
rate

Number
The tax rate as a decimal (e.g. 0.0475 for 4.75%). Required.
{
"code": "NC-SALES",
"agency": "NC Dept. of Revenue",
"rate": 0.0475
}

Remarks

code and rate are both required on create — there is no fallback default. agency is optional; omitting it or explicitly sending null both result in an empty string being stored.
Tax code names must be unique per account. Attempting to create a tax code with a code that already exists for the account will fail with a 409 conflict.

Response

Headers

Location — the URL of the newly created tax code.

Status Code

Code
Description
201 Created
The tax code was created.
400 Bad Request
The tax code was not created. This occurs if code is missing, empty, or longer than 16 characters; if rate is missing; or if agency is longer than 32 characters.
401 Unauthorized
The API key is missing, invalid, disabled, or does not have the correct scope.
403 Forbidden
The API key does not belong to this account, the account does not have the API keys feature enabled, or the key does not have the required scope.
409 Conflict
A tax code with that code already exists for this account.

Body

Name
Type
Description
uniqueId
Guid
The unique ID of the tax code.
code
Text
The tax code name.
agency
Text
The tax agency.
rate
Number
The tax rate as a decimal.