---
title: "getByCustomerId"
url: "https://dev-portal.dehaven.org/apis/beer-api-v1/versions/a462a401-23c6-469f-86bf-c6017a4a1733/operations/getByCustomerId"
---

> Full API specification: https://dev-portal.dehaven.org/apis/beer-api-v1/versions/a462a401-23c6-469f-86bf-c6017a4a1733.md

# getByCustomerId

`GET` `/api/v1/customers/{customerId}`

Operation ID: `getByCustomerId`

Get customer by Id

## Path parameters

- `customerId` (string, uuid, required) - Customer Id

## Responses

- `200` - HTTP Okay
- `404` - Not Found

## OpenAPI definition

```yaml
openapi: 3.0.2
info:
  title: SFG Brewery API
  version: "1.3"
servers:
  - url: http://localhost:8080
    description: Local Host
  - url: http://api.springframework.guru
    description: Demo API
paths:
  /api/v1/customers/{customerId}:
    parameters:
      - $ref: "#/components/parameters/CustomerId"
    get:
      description: Get customer by Id
      operationId: getByCustomerId
      tags:
        - Order Service
      responses:
        "200":
          description: HTTP Okay
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Customer"
        "404":
          description: Not Found
components:
  parameters:
    CustomerId:
      name: customerId
      in: path
      description: Customer Id
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    Customer:
      type: object
      required:
        - name
      allOf:
        - $ref: "#/components/schemas/BaseItem"
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
    BaseItem:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
          nullable: true
        version:
          type: integer
          readOnly: true
          nullable: true
        createdDate:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        lastModifiedDate:
          type: string
          format: date-time
          readOnly: true
          nullable: true
```
