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

# Find Locations

> Find nearest locations based on customer address



## OpenAPI

````yaml POST /locations/nearest
openapi: 3.1.0
info:
  title: OpenAPI Plant Store
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://dev.api.oudu.cloud
security:
  - bearerAuth: []
paths:
  /locations/nearest:
    post:
      description: Find nearest locations based on customer address
      requestBody:
        description: Customer address and search criteria
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NearestLocationsRequest'
            examples:
              example:
                value:
                  customer_address:
                    address: <string>
                    city: <string>
                    state: <string>
                    zip: '02127'
                  max_distance: 5
        required: true
      responses:
        '200':
          description: List of nearest locations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NearestLocationsResponse'
              examples:
                example:
                  value:
                    Code: Success
                    locations:
                      - name: Antons Cleaners - 135 W Broadway St
                        address: 135 W. Broadway St.
                        city: Boston
                        state: MA
                        zip: '02127'
                        business_hours:
                          Monday: 7:00 AM - 7:00 PM
                          Tuesday: 7:00 AM - 7:00 PM
                          Wednesday: 7:00 AM - 7:00 PM
                          Thursday: 7:00 AM - 7:00 PM
                          Friday: 7:00 AM - 7:00 PM
                          Saturday: 8:00 AM - 5:00 PM
                          Sunday: Closed
                        lat: '42.3406939'
                        lng: '-71.0542802'
                        distance: 0.219298791554029
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    NearestLocationsRequest:
      type: object
      properties:
        customer_address:
          $ref: '#/components/schemas/CustomerAddress'
        max_distance:
          type: number
          format: float
          description: Maximum distance in miles to search for locations
          default: 5
      required:
        - customer_address
        - max_distance
    NearestLocationsResponse:
      type: object
      properties:
        Code:
          type: string
          description: Response status code
        locations:
          type: array
          description: Array of nearest locations
          items:
            $ref: '#/components/schemas/Location'
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
    CustomerAddress:
      type: object
      properties:
        address:
          type: string
          description: Street address
        city:
          type: string
          description: City name
        state:
          type: string
          description: State code
        zip:
          type: string
          description: ZIP code
      required:
        - zip
    Location:
      type: object
      properties:
        name:
          type: string
          description: Location name
        address:
          type: string
          description: Street address
        city:
          type: string
          description: City name
        state:
          type: string
          description: State code
        zip:
          type: string
          description: ZIP code
        business_hours:
          $ref: '#/components/schemas/BusinessHours'
        lat:
          type: string
          description: Latitude coordinate
        lng:
          type: string
          description: Longitude coordinate
        distance:
          type: number
          format: float
          description: Distance from customer address in miles
    BusinessHours:
      type: object
      properties:
        Monday:
          type: string
          description: Business hours for Monday
        Tuesday:
          type: string
          description: Business hours for Tuesday
        Wednesday:
          type: string
          description: Business hours for Wednesday
        Thursday:
          type: string
          description: Business hours for Thursday
        Friday:
          type: string
          description: Business hours for Friday
        Saturday:
          type: string
          description: Business hours for Saturday
        Sunday:
          type: string
          description: Business hours for Sunday
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````