Describes how to create, retrieve, update, and delete Tax Codes using Zuora Tax Engine through the Settings API.
Get Tax Engines
The ID of the Tax Engine is required as a path parameter to create a Tax Code using the Zuora Tax Engine. See the following request and a sample of 200 response to get the ID of any tax engine:
All the examples provided in this section use the Zuora Sandbox endpoint URL. You must substitute it with your own endpoint base URL.
HTTP request:
GET https://rest.apisandbox.zuora.com/settings/tax-engines
Request body:
2 | --header 'Content-Type: application/json'\ |
3 | --header 'Authorization: Bearer d45afc73e95d4440806b18b28a86fa70' |
Response body:
4 | "id" : "2c92c8fb7a2d26b6017a2eaa6c212f5e" , |
6 | "taxEngineType" : "Z_Tax" |
Create Tax Code using Zuora Tax Engine
Ensure that you retrieve the engine ID of ZTax from the Get a Tax Engine section before proceeding with the following steps. To create a new Tax Code using the Zuora Tax Engine, see the following request and a sample of 200 response:
HTTP request:
POST https://rest.apisandbox.zuora.com/settings/tax-codes/ztax/
Request body:
2 | --header 'Content-Type: application/json' \ |
3 | --header 'Authorization: Bearer <oauth token>’\ |
7 | "description" : "The description of the ZTax code" , |
8 | "taxEngineId" : "2c92c8fb7a2d26b6017a2eaa6c212f5e" }' |
Response body:
2 | "id" : "8a90f13b8e555a7a018e559973cb14dd" , |
3 | "taxEngineId" : "2c92c8fb7a2d26b6017a2eaa6c212f5e" , |
6 | "description" : "ztax code" , |
Get Tax Code using Zuora Tax Engine
To get a Tax Code using the Zuora Tax Engine, see the following request and a sample of 200 response:
HTTP request:
GET https://rest.apisandbox.zuora.com/settings/tax-codes/ztax/8ad0845b8e74e4de018e7eedc595693f \
Request body:
1 | curl --request GET \ --url https: |
2 | --header 'Authorization: Bearer b31aea1a9ab345979f1a41ba67da8fc5' \ |
Response body:
2 | "id" : "8a90f13b8e555a7a018e559973cb14dd" , |
3 | "taxEngineId" : "2c92c8fb7a2d26b6017a2eaa6c212f5e" , |
6 | "description" : "ztax code" , |
Update Tax Code using Zuora Tax Engine
To update the Tax Code using the Zuora Tax Engine, see the following request and a sample of 200 response:
HTTP request:
PUT https://rest.apisandbox.zuora.com/settings/tax-codes/ztax/8a90f13b8e555a7a018e559973cb14dd
Request body:
1 | curl --location --request PUT 'https: |
2 | --header 'Content-Type: application/json' \ |
3 | --header 'Authorization: Bearer 3498b3107d754de1bb320b4f9f451553' \ |
7 | "description" : "The description of the ZTax code" , |
8 | "taxEngineId" : "2c92c8fb7a2d26b6017a2eaa6c212f5e" }' |
Response body:
2 | "id" : "8a90f13b8e555a7a018e559973cb14dd" , |
3 | "taxEngineId" : "2c92c8fb7a2d26b6017a2eaa6c212f5e" , |
6 | "description" : "The description of the ZTax code" , |