Update

Update

Update

Updates an existing tax code on an account.

Request

Method
URL
PUT

Path Parameters

Name
Required
Type
Description
accountUniqueId

Guid
The unique ID of the account.
itemUniqueId

Guid
The unique ID of the tax code.

Headers

Name
Required
Type
Description
APIKey

Guid
A valid API key with a scope of AccountLists

Body

Name
Required
Type
Description
code
Text
Omit to leave the stored code unchanged. Unlike every other table's label field, code can never be cleared: if supplied at all, it must be non-empty and 16 characters or fewer — an explicit blank or null value is rejected with a 400, the same as on create.
agency
Text
Omit to leave the stored agency unchanged. Unlike code, agency can be cleared: sending an explicit null clears it to an empty string. Maximum length is 32 characters if a non-empty value is supplied.
rate
Number
Omit to leave the stored rate unchanged. If supplied, it replaces the stored rate. An explicit JSON null is rejected as a malformed request (400), since the underlying value cannot be null.
{
"rate": 0.05
}

Remarks

Each of the three fields has different omit/explicit-value semantics:
  • code — omitting it leaves the stored value unchanged. If supplied at all, it must be non-empty and 16 characters or fewer; an explicit blank or null is rejected with a 400. There is no way to clear code.
  • agency — omitting it leaves the stored value unchanged. An explicit null clears it to an empty string. A supplied non-empty value replaces the stored agency and must be 32 characters or fewer.
  • rate — omitting it leaves the stored value unchanged. A supplied value replaces the stored rate. An explicit null is rejected with a 400, since rate cannot be null — it cannot be "cleared" the way agency can.
In the example above, only rate is changed; the stored code and agency values are left untouched.
Tax code names must still be unique per account when a new code value is supplied.

Response

Headers

None

Status Code

Code
Description
200 OK
The updated tax code was returned.
400 Bad Request
The tax code was not updated. This occurs if code is supplied but empty or longer than 16 characters, if rate is supplied as null, 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.
404 Not Found
No tax code was found with that id for this account.
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.