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

# Update a location

> Update a reusable Commenda OS location for a customer's business entity.

Update a reusable Commenda OS location for a customer's business entity.

Use this endpoint when an incorporation references an existing location that is missing required registered office address details.


## OpenAPI

````yaml PATCH /partner/commenda-os/customers/{customerId}/business-entities/{businessEntityId}/locations/{locationId}
openapi: 3.0.1
info:
  title: Commenda Public APIs
  description: >-
    APIs for Commenda entity management, partner incorporation, indirect tax,
    compliance, and corporate operations.
  license:
    name: NONE
    url: NONE
  version: 1.0.0
servers:
  - url: https://api.prod.commenda.io/api/v1
    description: Commenda platform APIs, including Partner Incorporation and Commenda OS.
  - url: https://transaction-tax.api.in.commenda.io/api/v1
    description: Global Indirect Tax API.
security:
  - bearerAuth: []
paths:
  /partner/commenda-os/customers/{customerId}/business-entities/{businessEntityId}/locations/{locationId}:
    patch:
      summary: Update a location
      description: Update a reusable Commenda OS location for a customer's business entity.
      operationId: updatePartnerCommendaOsLocation
      parameters:
        - name: customerId
          in: path
          required: true
          schema:
            type: integer
          description: Commenda customer identifier.
        - name: businessEntityId
          in: path
          required: true
          schema:
            type: integer
          description: Commenda business-entity identifier for the specified customer.
        - name: locationId
          in: path
          required: true
          schema:
            type: string
          description: Commenda location identifier.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CommendaOsLocationUpdateRequest'
      responses:
        '200':
          description: Location updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommendaOsLocationResponse'
        '400':
          description: Invalid location payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommendaOsPartnerError'
        '401':
          description: Missing or invalid partner API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommendaOsPartnerError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommendaOsPartnerError'
        '404':
          description: Location not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommendaOsPartnerError'
      security:
        - xApiKeyAuth: []
      servers:
        - url: https://api.prod.commenda.io/api/v1
components:
  schemas:
    CommendaOsLocationUpdateRequest:
      type: object
      description: >-
        Update a reusable Commenda OS location. Omitted fields are left
        unchanged by the Partner API client, but `locationTypes` and `address`
        are required by the current location update contract.
      required:
        - locationTypes
        - address
      properties:
        locationName:
          type: string
          description: >-
            Optional display name. Required by some location types such as
            registered office and mailing address.
          example: Singapore registered office
        startDate:
          type: string
          format: date
          nullable: true
          example: '2026-04-27'
        employeeCount:
          type: integer
          description: Employee count for employee work locations.
          example: 12
        locationTypes:
          type: array
          items:
            type: string
          example:
            - REGISTERED_OFFICE_ADDRESS
        address:
          $ref: '#/components/schemas/CommendaOsLocationAddress'
    CommendaOsLocationResponse:
      type: object
      required:
        - location
      properties:
        location:
          $ref: '#/components/schemas/CommendaOsLocation'
    CommendaOsPartnerError:
      type: object
      required:
        - statusCode
        - message
        - error
      properties:
        statusCode:
          type: integer
          description: HTTP status code for the error response.
        message:
          description: >-
            Error message returned by the API. Exact text varies by failure
            mode.
          oneOf:
            - type: string
            - type: array
              items:
                type: string
        error:
          type: string
          description: Standard error label for the response status.
    CommendaOsLocationAddress:
      type: object
      required:
        - addressLine1
        - postalCode
        - country
      properties:
        addressLine1:
          type: string
          example: 548 Market St
        addressLine2:
          type: string
          nullable: true
          example: Suite 21045
        addressLine3:
          type: string
          nullable: true
        city:
          type: string
          nullable: true
          example: San Francisco
        postalCode:
          type: string
          example: '94104'
        state:
          type: string
          nullable: true
          example: CA
        country:
          type: string
          example: US
    CommendaOsLocation:
      type: object
      required:
        - id
        - businessEntityId
        - locationTypes
        - address
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
          example: loc_123
        name:
          type: string
          nullable: true
          example: Delaware HQ
        startDate:
          type: string
          nullable: true
          example: '2025-01-01'
        employeeCount:
          type: integer
          nullable: true
          example: 12
        businessEntityId:
          type: integer
          example: 44
        locationTypes:
          type: array
          items:
            type: string
          example:
            - OPERATIONS
        address:
          $ref: '#/components/schemas/CommendaOsLocationAddress'
        createdAt:
          type: integer
          example: 1735689600000
        updatedAt:
          type: integer
          example: 1735776000000
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    xApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````