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

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

# getCustomerOrderById

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

Operation ID: `getCustomerOrderById`

Get Order By Id

## Path parameters

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

## Responses

- `200` - HTTP Okay
- `404` - Customer Id or Order Id 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}/orders/{orderId}:
    parameters:
      - $ref: "#/components/parameters/CustomerId"
      - $ref: "#/components/parameters/OrderId"
    get:
      description: Get Order By Id
      operationId: getCustomerOrderById
      tags:
        - Order Service
      responses:
        "200":
          description: HTTP Okay
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BeerOrder"
        "404":
          description: Customer Id or Order Id Not Found
components:
  parameters:
    CustomerId:
      name: customerId
      in: path
      description: Customer Id
      required: true
      schema:
        type: string
        format: uuid
    OrderId:
      name: orderId
      in: path
      description: Order Id
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    BeerOrder:
      type: object
      allOf:
        - $ref: "#/components/schemas/BaseItem"
      required:
        - customerId
      properties:
        customerId:
          type: string
          format: uuid
        customerRef:
          type: string
          nullable: true
        beerOrderLines:
          type: array
          items:
            $ref: "#/components/schemas/BeerOrderLine"
        orderStatus:
          $ref: "#/components/schemas/OrderStatusEnum"
        orderStatusCallbackUrl:
          type: string
          format: uri
    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
    BeerOrderLine:
      type: object
      allOf:
        - $ref: "#/components/schemas/BaseItem"
      required:
        - upc
        - orderQuantity
      properties:
        beerId:
          type: string
          format: uuid
          readOnly: true
        upc:
          type: string
        orderQuantity:
          type: integer
          minimum: 1
          maximum: 999
        quantityAllocated:
          type: integer
          readOnly: true
          nullable: true
    OrderStatusEnum:
      type: string
      nullable: true
      enum:
        - NEW
        - VERIFIED
        - ALLOCATED
        - READY
        - PICKED_UP
```
