Skip to main content

list-contract-templates

dci list-contract-templates

Lists contract templates owned by the authenticated tenant (from the bearer token). Requires ContractTemplatesAdmin, DoiT API access (platform:externalApi), and the channelops:contracts:templates entitlement.

Output

OK - Contract templates returned.

By default dci renders the result as a table. Use --output json to get the full structure described below — see Output formats.

FieldTypeDescription
[].templateIdstring
[].namestring
[].platformstring
[].statusstringOne of: "active", "archived".
[].structurestring
[].eligibleFromstring (date-time)
[].eligibleTostring (date-time)
[].billingRulesarray of object
[].billingRules[].namestring
[].billingRules[].managementAccountsarray of string
[].billingRules[].filtersarray of object
[].billingRules[].formulastring
[].priceBooksarray of object
[].priceBooks[].namestring
[].priceBooks[].managementAccountsarray of string
[].priceBooks[].rulesarray of object
[].priceBooks[].rules[].namestring
[].priceBooks[].rules[].percentageChangenumber (double)
[].priceBooks[].rules[].unitPricenumber (double)
[].priceBooks[].rules[].filtersarray of object
[].priceBooks[].rules[].formulastring
[].priceBooks[].rules[].cloudstring
[].priceBooks[].rules[].lineItemDescriptionstring
[].priceBooks[].rules[].applyInLineboolean
[].priceBooks[].rules[].includeCreditsboolean
[].priceBooks[].rules[].applyAWSEligibleDiscountboolean
[].customLineItemsarray of object
[].createdAtstring (date-time)
[].updatedAtstring (date-time)
[].archivedAtstring (date-time)
Raw JSON schema
{
"type": "array",
"items": {
"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 statusExit codeError codeMeaning
40110AUTHENTICATION_FAILEDNot signed in, or the API token is invalid. Run dci login or check DCI_API_KEY.
40311PERMISSION_DENIEDThe DoiT user or the active customer context does not have access.
50040API_SERVER_ERRORThe API failed to process the request. Retryable; contact DoiT support if it persists.

Aliases: listcontracttemplates