# Assign customer guest group

`PUT /public/api/v1.1/Tenants/{tenantId}/Customers/{customerId}/AssignGuestGroup`

User API · Customers · base URL `https://user-api.ancon.io` · auth: `Access-Token` header · docs: https://ancon.dev/api/user/customers/assign-customer-guest-group

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string (uuid) | yes |  |
| `customerId` | string (uuid) | yes |  |

## Header parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `correlationId` | string | no | Correlation Id for the request |

## Request body

Content type: `application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `guestGroupId` | string (uuid) or null | no |  |
| `outletId` | string (uuid) | no |  |

### Example (from schema)

```json
{
  "guestGroupId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "outletId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
```

## Responses

| Status | Description |
| --- | --- |
| 200 | OK |
| 400 | Bad Request |
| 401 | Unauthorized |
| 404 | Not Found |

### 200 response (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `customer` | object or null | no |  |
| `customer.id` | string (uuid) | no |  |
| `customer.created` | string (date-time) | no |  |
| `customer.modified` | string (date-time) | no |  |
| `customer.identityUserId` | string (uuid) | no |  |
| `customer.firstName` | string or null | no |  |
| `customer.lastName` | string or null | no |  |
| `customer.email` | string or null | no |  |
| `customer.dateOfBirth` | string (date-time) | no |  |
| `customer.gender` | integer (int32) | no | Allowed values: `0`, `1`, `2`, `3`. |
| `customer.telephoneNumber` | string or null | no |  |
| `customer.languageCode` | string or null | no |  |
| `customer.isDeleted` | boolean | no |  |
| `customer.isDisabled` | boolean | no |  |
| `customer.addresses` | array<object> or null | no |  |
| `customer.addresses[].id` | string (uuid) | no |  |
| `customer.addresses[].addressType` | integer (int32) | no | Allowed values: `0`, `1`, `2`. |
| `customer.addresses[].title` | string or null | no |  |
| `customer.addresses[].street` | string or null | no |  |
| `customer.addresses[].zipCode` | string or null | no |  |
| `customer.addresses[].city` | string or null | no |  |
| `customer.addresses[].state` | string or null | no |  |
| `customer.addresses[].country` | string or null | no |  |
| `customer.addresses[].location` | object or null | no |  |
| `customer.addresses[].location.latitude` | number (double) | no |  |
| `customer.addresses[].location.longitude` | number (double) | no |  |
| `customer.addresses[].note` | string or null | no |  |
| `customer.saleAllTime` | array<object> or null | no |  |
| `customer.saleAllTime[].id` | string (uuid) | no |  |
| `customer.saleAllTime[].outletId` | string (uuid) | no |  |
| `customer.saleAllTime[].tenantId` | string (uuid) | no |  |
| `customer.saleAllTime[].totalSpent` | object or null | no |  |
| `customer.saleAllTime[].totalSpent.amount` | number (double) | no |  |
| `customer.saleAllTime[].totalSpent.currency` | string or null | no |  |
| `customer.saleAllTime[].totalOnlineOrders` | integer (int32) | no |  |
| `customer.saleAllTime[].totalPosOrders` | integer (int32) | no |  |
| `customer.saleAllTime[].firstOrder` | string (date-time) or null | no |  |
| `customer.saleAllTime[].lastOrder` | string (date-time) or null | no |  |
| `customer.saleAllTime[].customerOrderFormatSales` | array<object> or null | no |  |
| `customer.saleAllTime[].customerOrderFormatSales[].orderFormat` | integer (int32) | no | Allowed values: `0`, `1`, `2`, `4`, `8`, `16`, `32`, `64`, `128`, `159`, `191`. |
| `customer.saleAllTime[].customerOrderFormatSales[].orderCount` | integer (int32) | no |  |
| `customer.saleAllTime[].customerOrderFormatSales[].totalAmount` | object or null | no |  |
| `customer.saleAllTime[].customerOrderFormatSales[].totalAmount.amount` | number (double) | no |  |
| `customer.saleAllTime[].customerOrderFormatSales[].totalAmount.currency` | string or null | no |  |
| `customer.guestGroups` | array<object> or null | no |  |
| `customer.guestGroups[].tenantId` | string (uuid) | no |  |
| `customer.guestGroups[].guestGroupId` | string (uuid) | no |  |
| `guestGroup` | object or null | no |  |
| `guestGroup.id` | string (uuid) | no |  |
| `guestGroup.name` | string or null | no |  |

#### Example (from schema)

```json
{
  "customer": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "created": "2026-01-15T12:00:00Z",
    "modified": "2026-01-15T12:00:00Z",
    "identityUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "firstName": "string",
    "lastName": "string",
    "email": "string",
    "dateOfBirth": "2026-01-15T12:00:00Z",
    "gender": 0,
    "telephoneNumber": "string",
    "languageCode": "string",
    "isDeleted": true,
    "isDisabled": true,
    "addresses": [
      {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "addressType": 0,
        "title": "string",
        "street": "string",
        "zipCode": "string",
        "city": "string",
        "state": "string",
        "country": "string",
        "location": {
          "latitude": 0,
          "longitude": 0
        },
        "note": "string"
      }
    ],
    "saleAllTime": [
      {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "outletId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "tenantId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "totalSpent": {
          "amount": 0,
          "currency": "string"
        },
        "totalOnlineOrders": 0,
        "totalPosOrders": 0,
        "firstOrder": "2026-01-15T12:00:00Z",
        "lastOrder": "2026-01-15T12:00:00Z",
        "customerOrderFormatSales": [
          {
            "orderFormat": 0,
            "orderCount": 0,
            "totalAmount": {}
          }
        ]
      }
    ],
    "guestGroups": [
      {
        "tenantId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "guestGroupId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
      }
    ]
  },
  "guestGroup": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "name": "string"
  }
}
```

### 400 response (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `message` | string or null | no |  |
| `errorCode` | string (uuid) | no |  |
| `additionalData` | any or null | no |  |

#### Example (from schema)

```json
{
  "message": "string",
  "errorCode": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "additionalData": null
}
```

### 404 response (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `message` | string or null | no |  |
| `errorCode` | string (uuid) | no |  |

#### Example (from schema)

```json
{
  "message": "string",
  "errorCode": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
```

## Example request

```bash
curl -X PUT "https://user-api.ancon.io/public/api/v1.1/Tenants/{tenantId}/Customers/{customerId}/AssignGuestGroup" \
  -H "Access-Token: $ANCON_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "guestGroupId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "outletId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}'
```
