Delete Configuration Template
1 min
DELETE
https://api.upstartcommerce.com/v1/tenants/cfg/templates/{templateId}
Path Parameters
- templateIdstringrequiredDescription
Header Parameters
- x-upstart-tenantstringrequiredDescription
Responses
200
204
400
- ValidationErrorResponseExample
{ "name": "ValidationError", "code": "SCHEMA_VALIDATION_FAILED", "detail": "Configuration data validation failed: data.apiKey is required but was not provided. Expected string with minimum length 32." }Description- namestringrequiredExampleDescription
- codestringrequiredExampleDescription
- detailstringExampleDescription
404
- ErrorResponseExample
{ "name": "ResourceNotFoundError", "code": "TEMPLATE_NOT_FOUND", "detail": "The configuration template with ID \"payment-stripe\" was not found in the system.", "reason": "The template may have been deleted or you may not have permission to access it. Verify the template ID using GET /tenants/cfg/templates." }Description- namestringrequiredExampleDescription
- codestringrequiredExampleDescription
- detailstringrequiredExampleDescription
- reasonstringExampleDescription
422
- ErrorResponseExample
{ "name": "UnprocessableEntityError", "code": "TEMPLATE_IN_USE", "detail": "Cannot delete template \"payment-cybersource\" because 5 configuration records are still using it.", "reason": "Delete or migrate all records using this template before deleting the template itself." }Description- namestringrequiredExampleDescription
- codestringrequiredExampleDescription
- detailstringrequiredExampleDescription
- reasonstringExampleDescription
500
- ErrorResponseExample
{ "name": "InternalServerError", "code": "UNEXPECTED_ERROR", "detail": "An unexpected error occurred while processing your request.", "reason": "Our team has been notified. Please try again, and if the problem persists, contact support with trace ID: 550e8400-e29b-41d4-a716-446655440000" }Description- namestringrequiredExampleDescription
- codestringrequiredExampleDescription
- detailstringrequiredExampleDescription
- reasonstringExampleDescription
curl
curl --request DELETE \
--url https://api.upstartcommerce.com/v1/tenants/cfg/templates/{templateId} \
--header 'accept: application/json' \
--header 'x-upstart-tenant: string'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
myHeaders.append("x-upstart-tenant", "string");
var requestOptions = {
method: 'DELETE',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.upstartcommerce.com/v1/tenants/cfg/templates/{templateId}", 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/tenants/cfg/templates/{templateId}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request["x-upstart-tenant"] = "string"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.upstartcommerce.com/v1/tenants/cfg/templates/{templateId}"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json',
'x-upstart-tenant': 'string'
}
response = requests.request("DELETE", url, headers=headers, data=payload)
print(response.text)
200
// Template deleted successfully.
204
// Template already deleted.
400
// The request contained information that the server was unable to process. Appropriate errors are provided in the response body.
{
"name": "ValidationError",
"code": "SCHEMA_VALIDATION_FAILED",
"detail": "Configuration data validation failed: data.apiKey is required but was not provided. Expected string with minimum length 32."
}404
// The requested resource was not found in the NoChannel system.
{
"name": "ResourceNotFoundError",
"code": "TEMPLATE_NOT_FOUND",
"detail": "The configuration template with ID \"payment-stripe\" was not found in the system.",
"reason": "The template may have been deleted or you may not have permission to access it. Verify the template ID using GET /tenants/cfg/templates."
}422
// The request was well-formed but contains semantic errors or violates business rules that prevent processing.
{
"name": "ResourceNotFoundError",
"code": "TEMPLATE_NOT_FOUND",
"detail": "The configuration template with ID \"payment-stripe\" was not found in the system.",
"reason": "The template may have been deleted or you may not have permission to access it. Verify the template ID using GET /tenants/cfg/templates."
}500
// An unexpected internal server error occurred. The request may be retried, and if the problem persists, contact support with the traceId from the error response.
{
"name": "ResourceNotFoundError",
"code": "TEMPLATE_NOT_FOUND",
"detail": "The configuration template with ID \"payment-stripe\" was not found in the system.",
"reason": "The template may have been deleted or you may not have permission to access it. Verify the template ID using GET /tenants/cfg/templates."
}