> ## 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.

# Create a location

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

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

Use this endpoint when an incorporation requires a partner-provided registered office address and the customer does not already have the location in Commenda OS.


## OpenAPI

````yaml POST /partner/commenda-os/customers/{customerId}/business-entities/{businessEntityId}/locations
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:
    post:
      summary: Create a location
      description: Create a reusable Commenda OS location for a customer's business entity.
      operationId: createPartnerCommendaOsLocation
      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.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CommendaOsLocationCreateRequest'
      responses:
        '201':
          description: Location created 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: Business entity not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommendaOsPartnerError'
      security:
        - xApiKeyAuth: []
      servers:
        - url: https://api.prod.commenda.io/api/v1
components:
  schemas:
    CommendaOsLocationCreateRequest:
      type: object
      description: >-
        Create a reusable Commenda OS location for a business entity. The
        `businessEntityId` is taken from the URL path.
      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
          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

````