get-contract
dci get-contract customerID contractID
Returns the specified contract.
Responses
200 (application/json)
OK - Contract returned.
{
"description": "A single contract with its version terms. DoiT-internal fields are not exposed.",
"allOf": [
{
"type": "object",
"description": "External view of a contract. DoiT-internal fields are not exposed.",
"properties": {
"id": {
"type": "string",
"description": "The unique identifier of the contract."
},
"customerId": {
"type": "string",
"description": "The customer (tenant) that holds the contract."
},
"type": {
"type": "string",
"description": "The immutable contract type."
},
"status": {
"type": "string",
"description": "The contract status.",
"enum": [
"draft",
"scheduled",
"active",
"cancelled",
"expired",
"superseded"
]
},
"name": {
"type": "string",
"description": "The contract name."
},
"startDate": {
"type": "string",
"format": "date-time",
"nullable": true,
"description": "The contract start date."
},
"endDate": {
"type": "string",
"format": "date-time",
"nullable": true,
"description": "The contract end date."
},
"renewalPolicy": {
"type": "string",
"description": "The renewal policy.",
"enum": [
"auto",
"manual",
"fixed"
]
},
"currentVersionNumber": {
"type": "integer",
"nullable": true,
"description": "The current version number of the contract."
},
"timeCreated": {
"type": "string",
"format": "date-time",
"description": "When the contract was created."
}
}
},
{
"type": "object",
"properties": {
"versions": {
"type": "array",
"description": "The contract versions, newest last, with their billing terms.",
"items": {
"type": "object",
"properties": {
"version": {
"type": "integer",
"description": "Contract version number."
},
"status": {
"type": "string",
"description": "Version status."
},
"name": {
"type": "string"
},
"startDate": {
"type": "string",
"format": "date-time"
},
"endDate": {
"type": "string",
"format": "date-time",
"nullable": true
},
"effectiveStart": {
"type": "string",
"format": "date-time"
},
"effectiveEnd": {
"type": "string",
"format": "date-time",
"nullable": true
},
"renewalPolicy": {
"type": "string"
},
"cancellationReason": {
"type": "string",
"nullable": true
},
"billingProfile": {
"type": "object"
},
"invoicesEmail": {
"type": "string",
"format": "email"
},
"contractUpdatesEmail": {
"type": "string",
"format": "email"
},
"managementAccounts": {
"type": "array",
"items": {
"type": "string"
}
},
"billingRules": {
"type": "array",
"items": {
"type": "object"
}
},
"priceBooks": {
"type": "array",
"items": {
"type": "object"
}
},
"customLineItems": {
"type": "array",
"items": {
"type": "object"
}
}
}
}
}
}
}
]
}
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."
}
}
}
Aliases: get-contract, getcontract