archive-contract-template
dci archive-contract-template templateID
Soft-deletes (archives) a contract template owned by the authenticated tenant (from the bearer token). Instantiated contracts are unaffected. Requires ContractTemplatesAdmin, DoiT API access (platform:externalApi), and the channelops:contracts:templates entitlement.
Output
OK - Contract template archived.
By default dci renders the result as a table. Use --output json to get the full structure described below — see Output formats.
| Field | Type | Description |
|---|---|---|
templateId | string | |
name | string | |
platform | string | |
status | string | One of: "active", "archived". |
structure | string | |
eligibleFrom | string (date-time) | |
eligibleTo | string (date-time) | |
billingRules | array of object | |
billingRules[].name | string | |
billingRules[].managementAccounts | array of string | |
billingRules[].filters | array of object | |
billingRules[].formula | string | |
priceBooks | array of object | |
priceBooks[].name | string | |
priceBooks[].managementAccounts | array of string | |
priceBooks[].rules | array of object | |
priceBooks[].rules[].name | string | |
priceBooks[].rules[].percentageChange | number (double) | |
priceBooks[].rules[].unitPrice | number (double) | |
priceBooks[].rules[].filters | array of object | |
priceBooks[].rules[].formula | string | |
priceBooks[].rules[].cloud | string | |
priceBooks[].rules[].lineItemDescription | string | |
priceBooks[].rules[].applyInLine | boolean | |
priceBooks[].rules[].includeCredits | boolean | |
priceBooks[].rules[].applyAWSEligibleDiscount | boolean | |
customLineItems | array of object | |
createdAt | string (date-time) | |
updatedAt | string (date-time) | |
archivedAt | string (date-time) |
Raw JSON schema
{
"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"
}
}
}
Errors
On failure, dci prints a single error message — with a hint when one is available — and exits with a typed code your scripts can branch on. See Errors and exit codes for the full contract.
| HTTP status | Exit code | Error code | Meaning |
|---|---|---|---|
| 401 | 10 | AUTHENTICATION_FAILED | Not signed in, or the API token is invalid. Run dci login or check DCI_API_KEY. |
| 403 | 11 | PERMISSION_DENIED | The DoiT user or the active customer context does not have access. |
| 404 | 20 | RESOURCE_NOT_FOUND | The requested resource does not exist. Check the identifier argument. |
| 409 | 21 | RESOURCE_CONFLICT | The operation conflicts with the resource's current state. |
| 500 | 40 | API_SERVER_ERROR | The API failed to process the request. Retryable; contact DoiT support if it persists. |
Aliases: archivecontracttemplate