update-contract-template
dci update-contract-template templateID
Updates a contract template owned by the authenticated tenant (from the bearer token). Requires ContractTemplatesAdmin, DoiT API access (platform:externalApi), and the channelops:contracts:templates entitlement.
Request
Content-Type: application/json
Schema
{
"type": "object",
"description": "Payload for creating or updating a contract template.",
"required": [
"name",
"platform",
"structure",
"eligibleFrom"
],
"properties": {
"name": {
"type": "string"
},
"platform": {
"type": "string"
},
"structure": {
"type": "string"
},
"eligibleFrom": {
"type": "string",
"format": "date-time"
},
"eligibleTo": {
"type": "string",
"format": "date-time"
},
"billingRules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"managementAccounts": {
"type": "array",
"items": {
"type": "string"
}
},
"filters": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
},
"formula": {
"type": "string"
}
}
}
},
"priceBooks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"managementAccounts": {
"type": "array",
"items": {
"type": "string"
}
},
"rules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"percentageChange": {
"type": "number",
"format": "double"
},
"unitPrice": {
"type": "number",
"format": "double"
},
"filters": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
},
"formula": {
"type": "string"
},
"cloud": {
"type": "string"
},
"lineItemDescription": {
"type": "string"
},
"applyInLine": {
"type": "boolean"
},
"includeCredits": {
"type": "boolean"
},
"applyAWSEligibleDiscount": {
"type": "boolean"
}
}
}
}
}
}
},
"customLineItems": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
}
}
}
Responses
200 (application/json)
OK - Contract template updated.
{
"type": "object",
"description": "Contract template returned by the PartnerOps external API.",
"properties": {
"templateId": {
"type": "string"
},
"name": {
"type": "string"
},
"platform": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"active",
"archived"
]
},
"structure": {
"type": "string"
},
"eligibleFrom": {
"type": "string",
"format": "date-time"
},
"eligibleTo": {
"type": "string",
"format": "date-time"
},
"billingRules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"managementAccounts": {
"type": "array",
"items": {
"type": "string"
}
},
"filters": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
},
"formula": {
"type": "string"
}
}
}
},
"priceBooks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"managementAccounts": {
"type": "array",
"items": {
"type": "string"
}
},
"rules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"percentageChange": {
"type": "number",
"format": "double"
},
"unitPrice": {
"type": "number",
"format": "double"
},
"filters": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
},
"formula": {
"type": "string"
},
"cloud": {
"type": "string"
},
"lineItemDescription": {
"type": "string"
},
"applyInLine": {
"type": "boolean"
},
"includeCredits": {
"type": "boolean"
},
"applyAWSEligibleDiscount": {
"type": "boolean"
}
}
}
}
}
}
},
"customLineItems": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
},
"archivedAt": {
"type": "string",
"format": "date-time"
}
}
}
400 (application/json)
Bad Request - The server cannot process the request, often due to a malformed request.
{
"type": "object",
"description": "Standard error response structure.",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}
401 (application/json)
Unauthorized - Invalid API key.
{
"type": "object",
"description": "Standard error response structure.",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}
403 (application/json)
Forbidden - The client is not authorized to perform the request.
{
"type": "object",
"description": "Standard error response structure.",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}
404 (application/json)
Not Found - The requested resource does not exist.
{
"type": "object",
"description": "Standard error response structure.",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}
409 (application/json)
Conflict - The request conflicts with the current state of the resource.
{
"type": "object",
"description": "Standard error response structure.",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}
500 (application/json)
Internal Server Error - Something went wrong with the DoiT API server.
{
"type": "object",
"description": "Standard error response structure.",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}
Aliases: update-contract-template, updatecontracttemplate