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

# Modify an existing office

> Partially update an office. Modifiable fields: `name`, `contactName`, `address` (full-object replace when present), `active`. Setting `active=false` soft-deletes the office. Reactivation (`active=true`) is not supported and returns 400. Business-rule rejections (active inventory, active return orders, default-office-for-package) return HTTP 409 with `source="office"` envelope.



## OpenAPI

````yaml /openapi.json patch /api/v1/offices/{officeId}
openapi: 3.1.0
info:
  title: Firstbase API Specification Beta
  description: Integration endpoints for Firstbase
  version: 0.1.0
servers:
  - url: /
    description: Default
security:
  - ApiKey: []
tags:
  - name: Inventory Orders
    description: Create and manage inventory orders
  - name: Shipment Notices V1
    description: 'Query shipment notice orders (V1: package items expose `inventories` list)'
  - name: Packages
    description: ''
  - name: Categories
    description: Query available categories for asset creation
  - name: Catalog
    description: ''
  - name: New Joiners
    description: New joiner provisioning pipeline for the organization
  - name: Orders
    description: ''
  - name: People
    description: >-
      Manage the users of Firstbase for your organization. API follows the SCIM
      standard.
    externalDocs:
      url: https://scim.cloud/
  - name: People — Lifecycle
    description: Offboard and reactivate users.
  - name: Assets
    description: Manage inventory assets
  - name: Regions V1
    description: Query regions (V1)
  - name: Warehouses V1
    description: Query warehouses (V1)
  - name: Brands
    description: Query available brands for asset creation
  - name: Inventory
    description: ''
  - name: Replacements
    description: Create and manage equipment replacements
  - name: Offices
    description: Manage and query office locations for the authenticated organization
  - name: Returns
    description: Return and Replacements
paths:
  /api/v1/offices/{officeId}:
    patch:
      tags:
        - Offices
      summary: Modify an existing office
      description: >-
        Partially update an office. Modifiable fields: `name`, `contactName`,
        `address` (full-object replace when present), `active`. Setting
        `active=false` soft-deletes the office. Reactivation (`active=true`) is
        not supported and returns 400. Business-rule rejections (active
        inventory, active return orders, default-office-for-package) return HTTP
        409 with `source="office"` envelope.
      operationId: patchOffice
      parameters:
        - name: officeId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicAPIPatchOfficeRequest'
        required: true
      responses:
        '200':
          description: Office updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OfficeResponse'
        '400':
          description: >-
            Empty body, invalid field values, explicit null for `name`,
            `address`, or `active`, or attempted reactivation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiHttpErrors'
        '403':
          description: Endpoint not enabled for this organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiHttpErrors'
        '404':
          description: Office not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiHttpErrors'
        '409':
          description: >-
            Office cannot be modified (editability rule, duplicate name, country
            change, etc.)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiHttpErrors'
components:
  schemas:
    PublicAPIPatchOfficeRequest:
      type: object
      description: Partial update payload for an office (FBS-3322)
      properties:
        name:
          $ref: '#/components/schemas/JsonNullableString'
          description: Office name
        contactName:
          $ref: '#/components/schemas/JsonNullableString'
          description: Office contact name
        address:
          $ref: '#/components/schemas/JsonNullableUpdateAddress'
          description: Office address (full replace when present)
        active:
          $ref: '#/components/schemas/JsonNullableBoolean'
          description: >-
            Set to false to soft-delete the office. Must be a boolean if
            present; null is invalid. Reactivation (true) is not supported.
          example: false
        isReactivation:
          type: boolean
        isAtLeastOneModifiableField:
          type: boolean
        isNameValidWhenPresent:
          type: boolean
        isAddressValidWhenPresent:
          type: boolean
        isActiveValidWhenPresent:
          type: boolean
        isReactivationNotRequested:
          type: boolean
        nameField:
          $ref: '#/components/schemas/JsonNullableString'
        contactNameField:
          $ref: '#/components/schemas/JsonNullableString'
        addressField:
          $ref: '#/components/schemas/JsonNullablePublicAPIOfficeAddress'
        activeField:
          $ref: '#/components/schemas/JsonNullableBoolean'
      required:
        - active
        - activeField
        - address
        - addressField
        - contactName
        - contactNameField
        - isActiveValidWhenPresent
        - isAddressValidWhenPresent
        - isAtLeastOneModifiableField
        - isNameValidWhenPresent
        - isReactivation
        - isReactivationNotRequested
        - name
        - nameField
    OfficeResponse:
      type: object
      description: An office location belonging to the organization
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for this office
          example: ed92d1a0-a8ee-4768-bbcb-26dd4bfdf8a4
        name:
          type: string
          description: Display name of the office
          example: HQ Office
        contactName:
          type: string
          description: >-
            Name of the contact person at this office, used for shipping and
            logistics
          example: Jane Doe
        address:
          $ref: '#/components/schemas/AddressResponse'
          description: >-
            Physical address of this office, used for equipment deliveries and
            returns
        active:
          type: boolean
          description: >-
            Whether this office is currently active. Inactive offices cannot
            receive new orders or returns
          example: true
      required:
        - active
        - address
        - id
        - name
    PublicApiHttpErrors:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/PublicApiError'
      required:
        - errors
    JsonNullableString:
      type: object
      properties:
        present:
          type: boolean
    JsonNullableUpdateAddress:
      type: object
      properties:
        present:
          type: boolean
    JsonNullableBoolean:
      type: object
      properties:
        present:
          type: boolean
    JsonNullablePublicAPIOfficeAddress:
      type: object
      properties:
        present:
          type: boolean
    AddressResponse:
      type: object
      description: Office address
      properties:
        street1:
          type: string
          description: Street address line 1
          example: 123
        street2:
          type: string
          description: Street address line 2
          example: Suite 100
        city:
          type: string
          description: City
          example: San Francisco
        province:
          type: string
          description: State or province
          example: California
        postalCode:
          type: string
          description: Postal / ZIP code
          example: 94105
        countryCode:
          type: string
          description: ISO 3166-1 alpha-2 country code
          example: US
        phoneNumber:
          type: string
          description: Contact phone number for the office
          example: '+15551234567'
    PublicApiError:
      type: object
      properties:
        detail:
          type: string
          description: Human-readable description of the error
          example: Invalid request
        source:
          type: string
          description: >-
            Entity or field path that caused the error (for example order,
            shipmentNotice, or person:email)
          example: request
      required:
        - detail
        - source
  securitySchemes:
    ApiKey:
      type: apiKey
      description: Prefix the value with "ApiKey" to indicate the custom authorization type
      name: Authorization
      in: header

````