create configuration record
1 min
POST
https://api.upstartcommerce.com/v1/tax/cfg/records
Header Parameters
- x-upstart-tenantstringrequiredDescription
Body Parameters
- bodyobjectDescription
- recordIdstringDescriptionMin Length1
- templateIdstringrequiredDescriptionMin Length1
- siteIdsstring[]Description
- tagsstring[]
- namestringDescriptionMin Length1
- dataobjectrequired
- taxProviderstringrequiredDescriptionMin Length1
- taxCalculationEnabledbooleanrequiredDescription
- addressValidationEnabledbooleanrequiredDescription
- documentRecordingEnabledbooleanrequiredDescription
- transactionLoggingEnabledbooleanrequiredDescription
- usernamestringrequiredDescriptionMin Length1
- companyCodestringrequiredDescriptionMin Length1
- environmentstringrequiredDescriptionMin Length1
- timeoutSecondsnumberrequiredDescription
- passwordstringrequiredDescriptionMin Length1
- taxAddressobjectrequiredDescription
- citystringrequiredDescriptionMin Length1
- street1stringrequiredDescriptionMin Length1
- countrystringrequiredDescriptionMin Length1
- postalCodestringrequiredDescriptionMin Length1
- stateOrRegionstringrequiredDescriptionMin Length1
- enabledbooleanrequired
Responses
200
- stringDescription
400
- object
- namestringrequiredDescriptionMin Length1
- codestringrequiredDescriptionMin Length1
- detailobject[]requiredDescription
- pathstringrequiredDescriptionMin Length1
- errorsobject[]requiredDescription
- idstringrequiredDescriptionMin Length1
- messagestringrequiredDescriptionMin Length1
401
- GeneralErrorDescription
- namestringrequiredDescriptionMin Length1
- codestringrequiredDescriptionMin Length1
- reasonstringDescriptionMin Length1
- detailstringrequiredDescriptionMin Length1
404
415
curl
curl --request POST \
--url https://api.upstartcommerce.com/v1/tax/cfg/records \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-upstart-tenant: string' \
--data '{
"templateId": "",
"data": {
"taxProvider": "",
"taxCalculationEnabled": "",
"addressValidationEnabled": "",
"documentRecordingEnabled": "",
"transactionLoggingEnabled": "",
"username": "",
"companyCode": "",
"environment": "",
"timeoutSeconds": "",
"password": "",
"taxAddress": {
"city": "",
"street1": "",
"country": "",
"postalCode": "",
"stateOrRegion": ""
}
},
"enabled": ""
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
myHeaders.append("x-upstart-tenant", "string");
var raw = JSON.stringify({
"templateId": "",
"data": {
"taxProvider": "",
"taxCalculationEnabled": "",
"addressValidationEnabled": "",
"documentRecordingEnabled": "",
"transactionLoggingEnabled": "",
"username": "",
"companyCode": "",
"environment": "",
"timeoutSeconds": "",
"password": "",
"taxAddress": {
"city": "",
"street1": "",
"country": "",
"postalCode": "",
"stateOrRegion": ""
}
},
"enabled": ""
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.upstartcommerce.com/v1/tax/cfg/records", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.upstartcommerce.com/v1/tax/cfg/records")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request["x-upstart-tenant"] = "string"
request.body = JSON.dump({
"templateId": "",
"data": {
"taxProvider": "",
"taxCalculationEnabled": "",
"addressValidationEnabled": "",
"documentRecordingEnabled": "",
"transactionLoggingEnabled": "",
"username": "",
"companyCode": "",
"environment": "",
"timeoutSeconds": "",
"password": "",
"taxAddress": {
"city": "",
"street1": "",
"country": "",
"postalCode": "",
"stateOrRegion": ""
}
},
"enabled": ""
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.upstartcommerce.com/v1/tax/cfg/records"
payload = json.dumps({
"templateId": "",
"data": {
"taxProvider": "",
"taxCalculationEnabled": "",
"addressValidationEnabled": "",
"documentRecordingEnabled": "",
"transactionLoggingEnabled": "",
"username": "",
"companyCode": "",
"environment": "",
"timeoutSeconds": "",
"password": "",
"taxAddress": {
"city": "",
"street1": "",
"country": "",
"postalCode": "",
"stateOrRegion": ""
}
},
"enabled": ""
})
headers = {
'accept': 'application/json',
'content-type': 'application/json',
'x-upstart-tenant': 'string'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// Success-the configuration record is created.
""400
// Bad Request-the request body is either missing the required fields or the validations have failed for the request body.
{
"name": "",
"code": "",
"detail": [
{
"path": "",
"errors": [
{
"id": "",
"message": ""
}
]
}
]
}401
// Unauthorized-the provided credentials were invalid for this endpoint.
{
"name": "",
"code": "",
"reason": "",
"detail": ""
}404
// Not Found-the requested resource was not found in the NoChannel system.
415
// Unsupported Media Type-content type isn't set to application/json.