> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hellocobi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Customer Model

> The customer data model represents information about your customers in the Cobi system.

## Schema

```json theme={null}
{
  "type": "object",
  "required": ["customer_id", "user_id", "region"],
  "properties": {
    "customer_id": {
      "type": "string",
      "format": "uuid",
      "description": "Unique identifier for the customer"
    },
    "user_id": {
      "type": "string",
      "format": "uuid",
      "description": "Unique identifier for the user"
    },
    "birthdate": {
      "type": "string",
      "format": "date",
      "nullable": true,
      "description": "Customer's date of birth"
    },
    "institute_id": {
      "type": "string",
      "format": "uuid",
      "nullable": true,
      "description": "ID of the educational institute"
    },
    "course_id": {
      "type": "string",
      "format": "uuid",
      "nullable": true,
      "description": "ID of the course"
    },
    "region": {
      "type": "string",
      "description": "Geographic region of the customer (2-letter country code, ISO 3166-1 alpha-2)"
    },
    "gender": {
      "type": "string",
      "nullable": true,
      "description": "Customer's gender"
    },
    "created": {
      "type": "string",
      "format": "date-time",
      "nullable": true,
      "description": "Timestamp when the record was created"
    },
    "updated": {
      "type": "string",
      "format": "date-time",
      "nullable": true,
      "description": "Timestamp when the record was last updated"
    },
    "is_deleted": {
      "type": "boolean",
      "nullable": true,
      "description": "Flag indicating if the record is marked as deleted"
    }
  }
}
```

## Field Descriptions

### Required Fields

| Field         | Type   | Format | Description                                                      |
| ------------- | ------ | ------ | ---------------------------------------------------------------- |
| `customer_id` | string | UUID   | Unique identifier for the customer                               |
| `user_id`     | string | UUID   | Unique identifier for the user                                   |
| `region`      | string | -      | Geographic region (2-letter country code, e.g., "CA" for Canada) |

### Optional Fields

| Field          | Type    | Format    | Description                                        |
| -------------- | ------- | --------- | -------------------------------------------------- |
| `birthdate`    | string  | date      | Customer's date of birth (YYYY-MM-DD)              |
| `institute_id` | string  | UUID      | ID of the educational institute                    |
| `course_id`    | string  | UUID      | ID of the course                                   |
| `gender`       | string  | -         | Customer's gender                                  |
| `created`      | string  | date-time | Timestamp when the record was created              |
| `updated`      | string  | date-time | Timestamp when the record was last updated         |
| `is_deleted`   | boolean | -         | Flag indicating if the record is marked as deleted |

## Example

```json theme={null}
{
  "customer_id": "550e8400-e29b-41d4-a716-446655440000",
  "user_id": "550e8400-e29b-41d4-a716-446655440001",
  "birthdate": "1990-01-01",
  "institute_id": "550e8400-e29b-41d4-a716-446655440002",
  "course_id": "550e8400-e29b-41d4-a716-446655440003",
  "region": "CA",
  "gender": "MALE",
  "created": "2023-01-15T14:30:00Z",
  "updated": "2023-06-22T09:15:30Z",
  "is_deleted": false
}
```

## Best Practices

1. **UUID Format**: Use valid UUID v4 format for all ID fields
2. **Date Format**: Use ISO 8601 date format (YYYY-MM-DD) for birthdate
3. **Region Codes**: Use ISO 3166-1 alpha-2 country codes (e.g., "CA" for Canada, "US" for United States)
4. **Data Consistency**: Ensure consistent data across all customer records

Need help? Contact our support team at [support@hellocobi.com](mailto:support@hellocobi.com)
