Update Customer Group
Updates the data of an existing customer group.
Request
PUT /api/oauth/v2/resource/customers/groups/{uuid}
Header
| Header | Value |
|---|---|
Authorization | Bearer {access_token} |
Content-Type | application/json |
URL parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
uuid | string (UUID) | Yes | Unique customer group ID |
Body parameters
Note: All fields are optional. Fields that are not sent remain unchanged.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Name of the customer group (max. 50 characters). Leading and trailing spaces are removed. Emoji and other 4-byte characters are not allowed |
description | string | No | Description text. Emoji and other 4-byte characters are not allowed |
color | string | No | Color as a hex code (e.g. #74AFAD) |
Important:
"description": nulldoes not clear the description. A field explicitly set tonullis treated the same as a field that wasn't sent — the response still returns200 OK, and the existing description stays unchanged. To clear a description, send an empty string ("").
Required scope: customers
Response
Success (200 OK)
json
{
"data": {
"id": "b2c3d4e5-f6a7-8901-bcde-f01234567890",
"name": "VIP customers",
"description": "Customers with a premium contract",
"color": "#74AFAD"
}
}Response fields
| Field | Type | Description |
|---|---|---|
data.id | string (UUID) | Unique customer group ID |
data.name | string | Name of the customer group |
data.description | string | null | Description text |
data.color | string | Color as a hex code |
Beispiele
bash
curl -X PUT "https://my.offisy.at/api/oauth/v2/resource/customers/groups/b2c3d4e5-f6a7-8901-bcde-f01234567890" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '{
"name": "Muster GmbH",
"description": "beispiel",
"color": "beispiel"
}'Parameter
Zuerst Token anfordern
Possible errors
| Status | Code | Description |
|---|---|---|
| 400 | validation_error | Invalid request data (e.g. name too long, or name/description containing emoji) |
| 401 | invalid_client | Invalid or missing access token |
| 403 | insufficient_scope | Scope customers not present |
| 403 | access_denied | Access denied due to missing permission |
| 404 | not_found | Customer group not found |
On 400, the response returns a JSON error object, e.g.:
json
{"error":"validation_error","error_description":"name must not exceed 50 characters."}json
{"error":"validation_error","error_description":"description must not contain emoji or other 4-byte characters."}