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

# Update Companies



## OpenAPI

````yaml /openapi.json patch /v1/workspaces/{workspaceId}/contacts/companies/{companyId}
openapi: 3.1.0
info:
  title: Specurate API
  description: ''
  version: 1.0.0
  contact: {}
servers:
  - url: https://app.specurate.com/api
    description: API Server
security: []
tags: []
paths:
  /v1/workspaces/{workspaceId}/contacts/companies/{companyId}:
    patch:
      tags:
        - Companies
      summary: Update Companies
      operationId: CompaniesController_update_v1
      parameters:
        - name: workspaceId
          required: true
          in: path
          schema:
            type: string
        - name: companyId
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCompanyDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompanyResponseDto'
components:
  schemas:
    UpdateCompanyDto:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 255
        categoryIds:
          maxItems: 100
          type: array
          items:
            type: string
            pattern: ^\d+$
        domain:
          anyOf:
            - type: string
              maxLength: 2048
            - type: 'null'
        tags:
          type: array
          items:
            type: string
            enum:
              - client
              - manufacturer
              - vendor
              - consultants_contractors
              - warehouse
              - facility_management
        status:
          enum:
            - preferred
            - approved
            - pending_approval
            - inactive
          type: string
        notes:
          anyOf:
            - type: string
              minLength: 1
              maxLength: 2000
            - type: 'null'
        ratingQuality:
          anyOf:
            - type: integer
              minimum: 1
              maximum: 5
            - type: 'null'
        ratingLeadTime:
          anyOf:
            - type: integer
              minimum: 1
              maximum: 5
            - type: 'null'
        ratingPricing:
          anyOf:
            - type: integer
              minimum: 1
              maximum: 5
            - type: 'null'
        website:
          anyOf:
            - type: string
              minLength: 1
              maxLength: 2048
            - type: 'null'
        accountNumber:
          anyOf:
            - type: string
              minLength: 1
              maxLength: 255
            - type: 'null'
        vatTaxId:
          anyOf:
            - type: string
              minLength: 1
              maxLength: 255
            - type: 'null'
        registrationNumber:
          anyOf:
            - type: string
              minLength: 1
              maxLength: 255
            - type: 'null'
        portalUrl:
          anyOf:
            - type: string
              minLength: 1
              maxLength: 2048
            - type: 'null'
        portalLogin:
          anyOf:
            - type: string
              minLength: 1
              maxLength: 255
            - type: 'null'
        portalPassword:
          anyOf:
            - type: string
              minLength: 1
              maxLength: 255
            - type: 'null'
        paymentTerms:
          anyOf:
            - type: string
              enum:
                - net_30
                - net_60
                - due_on_receipt
                - deposit_50
            - type: 'null'
        creditLimit:
          anyOf:
            - type: string
              pattern: ^\d{1,10}(\.\d{1,2})?$
            - type: 'null'
        minOrderAmount:
          anyOf:
            - type: string
              pattern: ^\d{1,10}(\.\d{1,2})?$
            - type: 'null'
        standardDiscountPct:
          anyOf:
            - type: string
              pattern: ^\d{1,3}(\.\d{1,4})?$
            - type: 'null'
        defaultLeadTimeDays:
          anyOf:
            - type: integer
              minimum: 0
              maximum: 3650
            - type: 'null'
      additionalProperties: false
    CompanyResponseDto:
      type: object
      properties:
        categories:
          type: array
          items:
            $ref: '#/components/schemas/CompanyCategoryDto'
        identity:
          $ref: '#/components/schemas/CompanyIdentityResponseDto'
        id:
          type: string
        name:
          type: string
        domain:
          type: string
          nullable: true
        tags:
          type: array
          items:
            type: string
        status:
          enum:
            - preferred
            - approved
            - pending_approval
            - inactive
          type: string
        notes:
          type: string
          nullable: true
        ratingQuality:
          type: number
          nullable: true
        ratingLeadTime:
          type: number
          nullable: true
        ratingPricing:
          type: number
          nullable: true
        website:
          type: string
          nullable: true
        accountNumber:
          type: string
          nullable: true
        vatTaxId:
          type: string
          nullable: true
        registrationNumber:
          type: string
          nullable: true
        portalUrl:
          type: string
          nullable: true
        portalLogin:
          type: string
          nullable: true
        portalPasswordSet:
          type: boolean
        paymentTerms:
          nullable: true
          enum:
            - net_30
            - net_60
            - due_on_receipt
            - deposit_50
          type: string
        creditLimit:
          type: string
          nullable: true
        minOrderAmount:
          type: string
          nullable: true
        standardDiscountPct:
          type: string
          nullable: true
        defaultLeadTimeDays:
          type: number
          nullable: true
        primaryPerson:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/CompanyPrimaryPersonDto'
        createdAt:
          type: string
        updatedAt:
          type: string
      required:
        - categories
        - id
        - name
        - domain
        - tags
        - status
        - notes
        - ratingQuality
        - ratingLeadTime
        - ratingPricing
        - website
        - accountNumber
        - vatTaxId
        - registrationNumber
        - portalUrl
        - portalLogin
        - portalPasswordSet
        - paymentTerms
        - creditLimit
        - minOrderAmount
        - standardDiscountPct
        - defaultLeadTimeDays
        - primaryPerson
        - createdAt
        - updatedAt
    CompanyCategoryDto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
      required:
        - id
        - name
    CompanyIdentityResponseDto:
      type: object
      properties:
        globalCompany:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/GlobalCompanyResponseDto'
        version:
          type: number
          nullable: true
        suggestion:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/CompanyIdentitySuggestionDto'
      required:
        - globalCompany
        - version
    CompanyPrimaryPersonDto:
      type: object
      properties:
        id:
          type: string
        email:
          type: string
        firstName:
          type: string
          nullable: true
        lastName:
          type: string
          nullable: true
      required:
        - id
        - email
        - firstName
        - lastName
    GlobalCompanyResponseDto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        primaryType:
          enum:
            - brand
            - rep
            - dealer
            - distributor
          type: string
        legalName:
          type: string
          nullable: true
        country:
          type: string
          nullable: true
        aliases:
          type: array
          items:
            type: string
        domains:
          type: array
          items:
            type: string
        retiredAt:
          type: string
          nullable: true
      required:
        - id
        - name
        - primaryType
        - legalName
        - country
        - aliases
        - domains
        - retiredAt
    CompanyIdentitySuggestionDto:
      type: object
      properties:
        candidates:
          type: array
          items:
            $ref: '#/components/schemas/CompanyIdentityCandidateResponseDto'
        expectedVersion:
          type: number
          nullable: true
        evidenceFingerprint:
          type: string
      required:
        - candidates
        - expectedVersion
        - evidenceFingerprint
    CompanyIdentityCandidateResponseDto:
      type: object
      properties:
        company:
          $ref: '#/components/schemas/GlobalCompanyResponseDto'
        nameMatch:
          type: boolean
        matchingHosts:
          type: array
          items:
            type: string
        typeMatch:
          type: boolean
      required:
        - company
        - nameMatch
        - matchingHosts
        - typeMatch

````