Create or Update a Vat Item

To create a new vat item or update an existing one in the AppZen System. This returns the uuid, the unique identifier, for this vat item.

If there already exists a vat item, with the given vat_code and vat_rate body parameters, then the existing vat item will be updated. The status in the response shows as UPDATED.
For a newly created vat item, the status shows as CREATED.

Request URI 

POST https://api.appzen.com/dictionary-data-services/
vat


Header Parameters

Name Type Description Required
x-api-key String The x-api-key provided to authorize the request. Yes
customer-id String The Customer ID provided to authorize the request. Yes
customer-key String  The Customer Key provided to authorize the request. Yes


Body Parameters

Name Type Description Required

vat_code

String

Vat item code as mentioned in your system.
Example: VAT12

Yes

vat_rate

Number

Vat item rate in ERP system. Vat code/rate combination corresponds to a unique vat master item.

Example:12

No

vat_id

String

Vat item Id from your system.
Example:1xsd2sd

No

is_active

Boolean

To check if the item is active in your System.

Default:true

No


Sample Request

curl --location 'https://api.enft.dev.appzen.com/dictionary-data-services/vat' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'x-api-key: <>' \
--header 'customer-id: 100094' \
--header 'customer-key: <>' \
--data '{
"vat_id": "VAT_319768",
"vat_code": "VAT",
"vat_rate": 25,
"valid_start_date": "2022-10-05T19:02:01Z",
"valid_end_date": "2023-10-05T19:02:01Z",
"appzen_vat_breakdown": [
{
"code": "GST",
"rate": 2.5
},
{
"code": "UST",
"rate": 7.5
}
],
"country": "USA",
"country_code_iso3": "USA",
"is_active": true
}'

Sample Response

Success

{
    "uuid": "5fc03087-d265-11e7-b8c6-83e29cd24f4c",
    "status": "UPDATED"
}  

Failure

The request fails if you enter an invalid URL.

{
  "timestamp": "2019-01-17T16:12:45.977+0000",
  "status": 404,
  "error": "Not Found",
  "message": "Error code : 17e3338d - The resource you specified cannot be not found"
}   

Response Code

Response Code Description
200 The request is successful.
201

The request is successful.

400

The request failed due to a malformed request syntax. Check the requested URL, including the parameters.

401

The request failed due to an authorization issue. For example, the Customer Key could be missing or invalid.

403

The request failed due to a permission issue. The x-api key may not have permission to perform the request. 

404

The request failed as the resource is not found. Check the requested URL.

500

The request failed due to an AppZen server issue. 


See Also

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.