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

# Retrieve a City



## OpenAPI

````yaml Commerce get /cities/{state}/{name}
openapi: 3.1.0
info:
  title: Commerce
  version: '3.0'
  contact:
    email: samuel@driv.ly
    name: Samuel Lippert
    url: https://driv.ly/
  description: Drivly Commerce API
servers:
  - url: https://commerce.driv.ly/api
security: []
paths:
  /cities/{state}/{name}:
    parameters:
      - schema:
          type: string
        name: state
        in: path
        required: true
        description: City is uniquely identified by State
      - schema:
          type: string
        name: name
        in: path
        required: true
        description: City is uniquely identified by Name
      - schema:
          type: integer
        name: depth
        in: query
        required: false
        description: The number of levels of related objects to include in the response
    get:
      summary: Retrieve a City
      operationId: get-city
      responses:
        '200':
          description: City Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/City'
                  success:
                    type: boolean
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
                examples:
                  - error:
                      code: 401
                      message: Unauthorized
                    success: false
        '404':
          description: City Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
                examples:
                  - error:
                      code: 404
                      message: City Not Found
                    success: false
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
                examples:
                  - error:
                      code: 429
                      message: Too Many Requests
                    success: false
components:
  schemas:
    City:
      $id: City
      examples:
        - name: Springfield
          state:
            code: IL
      required:
        - state
        - name
      title: City
      type: object
      properties:
        state:
          oneOf:
            - type: string
            - $ref: '#/components/schemas/State'
          description: City is uniquely identified by State
        name:
          type: string
          description: City is uniquely identified by Name
    ErrorModel:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: number
            message:
              type: string
        success:
          type: boolean
    State:
      $id: State
      title: State
      properties:
        code:
          type: string
          description: State is uniquely identified by State Code
      type: object
      required:
        - code

````