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

# Update Location

> Update an existing location's name and address fields



## OpenAPI

````yaml put /v1/locations/{location}
openapi: 3.1.1
info:
  title: HitPay API
  description: >-
    Accept PayNow, FPX, QRIS, GrabPay, cards, and 40+ payment methods with a
    single API. Production base URL: https://api.hit-pay.com, Sandbox:
    https://api.sandbox.hit-pay.com
  version: '1.0'
servers:
  - url: https://api.hit-pay.com
    description: Production
  - url: https://api.sandbox.hit-pay.com
    description: Sandbox
security: []
paths:
  /v1/locations/{location}:
    put:
      tags:
        - Location
      summary: Update location
      description: |
        Update an existing location's address fields. All fields are required.
      operationId: PublicUpdateLocation
      parameters:
        - name: X-BUSINESS-API-KEY
          in: header
          required: true
          style: simple
          explode: false
          schema:
            type: string
            example: b286daabf9921b5a01a4621f026c111e046f8911feba212996c92159b98427d
        - name: location
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Location ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - street
                - city
                - state
                - country
                - postal_code
              properties:
                name:
                  type: string
                  maxLength: 255
                  example: Main Store
                street:
                  type: string
                  maxLength: 255
                  example: 123 Main St
                city:
                  type: string
                  maxLength: 255
                  example: Singapore
                state:
                  type: string
                  maxLength: 255
                  example: Singapore
                country:
                  type: string
                  maxLength: 255
                  example: SG
                postal_code:
                  type: string
                  maxLength: 16
                  example: '123456'
            example:
              name: Main Store
              street: 123 Main St
              city: Singapore
              state: Singapore
              country: SG
              postal_code: '123456'
      responses:
        '200':
          description: Location updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    description: Location ID
                    example: 9c484458-b2a3-4f49-87ed-ad9ea71b0df3
                  business_id:
                    type: string
                    format: uuid
                    description: Business that owns this location
                    example: 8a1f2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d
                  name:
                    type: string
                    description: Name of the location
                    example: Main Store
                  street:
                    type: string
                    description: Street address
                    example: 123 Main St
                  city:
                    type: string
                    description: City
                    example: Singapore
                  state:
                    type: string
                    description: State or region
                    example: Singapore
                  country:
                    type: string
                    description: Country code or name
                    example: SG
                  postal_code:
                    type: string
                    description: Postal code
                    example: '123456'
                  active:
                    type: boolean
                    description: Whether the location is active
                    example: true
                  pickups:
                    type: array
                    description: >-
                      Pickup configurations linked to this location (empty when
                      not loaded)
                    items:
                      type: object
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
                required:
                  - id
                  - business_id
                  - name
                  - street
                  - city
                  - state
                  - country
                  - postal_code
                  - active
        '401':
          description: Missing or invalid API key / OAuth token
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                  errors:
                    type: array
        '403':
          description: Authenticated user cannot manage locations
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                  errors:
                    type: array
        '404':
          description: Location not found or does not belong to this business
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                  errors:
                    type: array
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                  errors:
                    type: array

````