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

update-customer

dci update-customer

Partially updates the general settings of the customer scoped to the authenticated tenant (from the bearer token). Requires the Settings permission and DoiT API access (platform:externalApi); updating allowedInviteDomains additionally requires the UsersManager permission.

The request body must use application/merge-patch+json (RFC 7396): an omitted field leaves the current value unchanged, and an explicit null also leaves it unchanged, except for urlSlug, where an explicit empty string removes the customer's active URL slug rather than leaving it unchanged.

Request

Content-Type: application/merge-patch+json

Schema

{
"type": "object",
"description": "Partial update to a customer's general settings. Every field is optional; only fields present in the request body are changed. See the operation description for `urlSlug`'s null-vs-absent semantics, which differ from every other field.",
"properties": {
"currency": {
"type": "string",
"description": "Billing currency code (e.g. `USD`, `EUR`).",
"x-doit-confidentiality": "customer-data"
},
"emails": {
"type": "array",
"description": "Point-of-contact email addresses for the customer.",
"items": {
"type": "string",
"format": "email"
},
"x-doit-pii": true,
"x-doit-confidentiality": "customer-data"
},
"urlSlug": {
"type": "string",
"description": "The customer's URL display name. An explicit empty string removes the active slug; a non-empty value must be 3-12 characters of lowercase letters, digits, or dashes, starting and ending with a letter or digit, and must be unique across all customers.",
"x-doit-confidentiality": "customer-data"
},
"allowedInviteDomains": {
"type": "array",
"description": "Email domains allowed to self-invite into the customer. Requires the `UsersManager` permission in addition to `Settings`.",
"items": {
"type": "string"
},
"x-doit-pii": true,
"x-doit-confidentiality": "customer-data"
}
}
}

Responses

200

OK - Customer general settings updated.

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 requested urlSlug is already assigned to another customer, or conflicts with an existing customer ID.

{
"type": "object",
"description": "Standard error response structure.",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}

415 (application/json)

Unsupported Media Type - The request Content-Type must be application/merge-patch+json.

{
"type": "object",
"description": "Standard error response structure.",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}

422 (application/json)

Unprocessable Entity - The customer has reached the limit of 5 previously-used URL slugs.

{
"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: updatecustomer