メインコンテンツへスキップ

update-customer-classification

dci update-customer-classification customerID [flags]

Sets the customer's operational and lifecycle status tier, which governs their account priority and service state across the platform. See the classification field below for the meaning of each value.

Optimistic concurrency via the required If-Match header (RFC 3339 timestamp from a prior read) and idempotent via the required Idempotency-Key header.

Request

Content-Type: application/json

Example

{
"classification": "strategic"
}

Schema

{
"type": "object",
"required": [
"classification"
],
"properties": {
"classification": {
"type": "string",
"description": "Sets the customer's operational and lifecycle status tier. This governs their account priority (`business`, `strategic`) or reflects their service state (`terminated`, `inactive`, `suspendedForNonPayment`).\n\n| Value | Meaning | When to use |\n|---|---|---|\n| `business` | Active paying customer on standard terms. | The default tier for an active commercial account. |\n| `strategic` | High-value account with extended terms. | Promote a key account that warrants extended terms and elevated priority. |\n| `terminated` | Contract ended; API access revoked for all users. | The customer relationship has ended. |\n| `inactive` | Not actively using the platform. | The account is dormant but the relationship is intact. |\n| `suspendedForNonPayment` | Account suspended due to outstanding invoices. | Payment is overdue and access should be gated until it is resolved. |\n\n⚠️ **WARNING:** Setting the classification to `terminated` permanently revokes all active user access keys for that customer account.",
"enum": [
"business",
"strategic",
"terminated",
"inactive",
"suspendedForNonPayment"
]
}
}
}

Flags

--dry-run: (boolean)

Responses

204

Classification updated (or validated when dryRun=true).

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/problem+json)

Another request with the same Idempotency-Key is already in flight.

{
"type": "object",
"description": "RFC 9457 Problem Details object (`Content-Type: application/problem+json`).",
"required": [
"type",
"title",
"status",
"detail",
"code",
"retryable"
],
"properties": {
"type": {
"type": "string",
"format": "uri",
"description": "Stable URI identifying the problem type, of the form `https://developer.doit.com/errors/<code>`."
},
"title": {
"type": "string",
"description": "Short, human-readable summary of the problem type. Consumers must not branch on it."
},
"status": {
"type": "integer",
"description": "HTTP status code, mirrored in the body."
},
"detail": {
"type": "string",
"description": "Human-readable explanation specific to this occurrence."
},
"instance": {
"type": "string",
"format": "uri",
"description": "URI of the form `https://api.doit.com/requests/{requestId}`."
},
"code": {
"type": "string",
"description": "Stable, machine-parseable, snake_case identifier (e.g. `precondition_failed`, `customers.invalid_classification`)."
},
"retryable": {
"type": "boolean",
"description": "`true` means retrying with backoff might succeed without changing the request."
}
}
}

412 (application/problem+json)

The If-Match timestamp does not match the customer's current version (optimistic concurrency conflict).

{
"type": "object",
"description": "RFC 9457 Problem Details object (`Content-Type: application/problem+json`).",
"required": [
"type",
"title",
"status",
"detail",
"code",
"retryable"
],
"properties": {
"type": {
"type": "string",
"format": "uri",
"description": "Stable URI identifying the problem type, of the form `https://developer.doit.com/errors/<code>`."
},
"title": {
"type": "string",
"description": "Short, human-readable summary of the problem type. Consumers must not branch on it."
},
"status": {
"type": "integer",
"description": "HTTP status code, mirrored in the body."
},
"detail": {
"type": "string",
"description": "Human-readable explanation specific to this occurrence."
},
"instance": {
"type": "string",
"format": "uri",
"description": "URI of the form `https://api.doit.com/requests/{requestId}`."
},
"code": {
"type": "string",
"description": "Stable, machine-parseable, snake_case identifier (e.g. `precondition_failed`, `customers.invalid_classification`)."
},
"retryable": {
"type": "boolean",
"description": "`true` means retrying with backoff might succeed without changing the request."
}
}
}

422 (application/problem+json)

Missing or invalid classification value, malformed body, or Idempotency-Key reused with a different body.

{
"type": "object",
"description": "RFC 9457 Problem Details object (`Content-Type: application/problem+json`).",
"required": [
"type",
"title",
"status",
"detail",
"code",
"retryable"
],
"properties": {
"type": {
"type": "string",
"format": "uri",
"description": "Stable URI identifying the problem type, of the form `https://developer.doit.com/errors/<code>`."
},
"title": {
"type": "string",
"description": "Short, human-readable summary of the problem type. Consumers must not branch on it."
},
"status": {
"type": "integer",
"description": "HTTP status code, mirrored in the body."
},
"detail": {
"type": "string",
"description": "Human-readable explanation specific to this occurrence."
},
"instance": {
"type": "string",
"format": "uri",
"description": "URI of the form `https://api.doit.com/requests/{requestId}`."
},
"code": {
"type": "string",
"description": "Stable, machine-parseable, snake_case identifier (e.g. `precondition_failed`, `customers.invalid_classification`)."
},
"retryable": {
"type": "boolean",
"description": "`true` means retrying with backoff might succeed without changing the request."
}
}
}

428 (application/problem+json)

The required If-Match header is absent.

{
"type": "object",
"description": "RFC 9457 Problem Details object (`Content-Type: application/problem+json`).",
"required": [
"type",
"title",
"status",
"detail",
"code",
"retryable"
],
"properties": {
"type": {
"type": "string",
"format": "uri",
"description": "Stable URI identifying the problem type, of the form `https://developer.doit.com/errors/<code>`."
},
"title": {
"type": "string",
"description": "Short, human-readable summary of the problem type. Consumers must not branch on it."
},
"status": {
"type": "integer",
"description": "HTTP status code, mirrored in the body."
},
"detail": {
"type": "string",
"description": "Human-readable explanation specific to this occurrence."
},
"instance": {
"type": "string",
"format": "uri",
"description": "URI of the form `https://api.doit.com/requests/{requestId}`."
},
"code": {
"type": "string",
"description": "Stable, machine-parseable, snake_case identifier (e.g. `precondition_failed`, `customers.invalid_classification`)."
},
"retryable": {
"type": "boolean",
"description": "`true` means retrying with backoff might succeed without changing the request."
}
}
}

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-customer-classification, updatecustomerclassification