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

# Update Business

> Partial update of a business: `display_name`, `legal_name`, `registration_number`, `country_code`, `status`, `metadata`. `metadata` fully replaces. Setting `status` to `BLOCKED` adds the `vendor_data` to the system blocklist; moving away from `BLOCKED` removes that entry.

export const AgentPromptAccordion = ({prompt, title = "AI Agent Integration Prompt"}) => {
  const [copied, setCopied] = React.useState(false);
  const handleCopy = e => {
    e.stopPropagation();
    if (!prompt) return;
    navigator.clipboard.writeText(prompt.trim()).then(() => {
      setCopied(true);
      setTimeout(() => setCopied(false), 2000);
    });
  };
  const agents = ["Claude Code", "Codex", "Cursor", "Devin", "Windsurf", "GitHub Copilot"];
  return <div className="didit-agent-card">
      {}
      <div className="didit-agent-titlebar">
        <div className="didit-agent-dots" aria-hidden="true">
          <span className="didit-agent-dot didit-agent-dot-red"></span>
          <span className="didit-agent-dot didit-agent-dot-yellow"></span>
          <span className="didit-agent-dot didit-agent-dot-green"></span>
        </div>
        <span className="didit-agent-filename">{title}</span>
        <button type="button" className={`didit-agent-copy ${copied ? "didit-agent-copy-copied" : ""}`} onClick={handleCopy} title="Copy prompt to clipboard" aria-label={copied ? "Copied!" : "Copy prompt to clipboard"}>
          {copied ? <>
              <svg width="13" height="13" viewBox="0 0 16 16" fill="none">
                <path d="M3 8.5l3.5 3.5L13 4" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" />
              </svg>
              <span>Copied</span>
            </> : <>
              <svg width="13" height="13" viewBox="0 0 16 16" fill="none">
                <rect x="5" y="5" width="9" height="9" rx="1.5" stroke="currentColor" strokeWidth="1.5" />
                <path d="M11 5V3.5A1.5 1.5 0 0 0 9.5 2h-6A1.5 1.5 0 0 0 2 3.5v6A1.5 1.5 0 0 0 3.5 11H5" stroke="currentColor" strokeWidth="1.5" />
              </svg>
              <span>Copy</span>
            </>}
        </button>
      </div>

      {}
      <pre className="didit-agent-body"><code>{prompt.trim()}</code></pre>

      {}
      <div className="didit-agent-footer">
        <span className="didit-agent-footer-label">Paste into</span>
        <div className="didit-agent-chips">
          {agents.map(name => <span key={name} className="didit-agent-chip">{name}</span>)}
        </div>
      </div>
    </div>;
};

<AgentPromptAccordion
  title="Update Business Prompt"
  prompt={`Goal: Partial-update a Didit Business (KYB) entity by vendor_data.

Endpoint: PATCH https://verification.didit.me/v3/businesses/{vendor_data}/
Auth header: x-api-key: <DIDIT_API_KEY>
Content-Type: application/json

Path param:
- vendor_data (string, REQUIRED) — free-form string, NOT a UUID. URL-encode.

Request body (PARTIAL — only included fields are touched; counters and session history are left alone):
- display_name (string, nullable)
- legal_name (string, nullable)
- registration_number (string, nullable)
- country_code (string, nullable) — ISO 3166-1 alpha-2.
- region (string, nullable) — ISO 3166-2.
- status (enum) — "ACTIVE" | "FLAGGED" | "BLOCKED" (VendorBusinessStatusChoices). Setting "BLOCKED" auto-adds vendor_data to the system blocklist.
- metadata (object, nullable) — REPLACES existing metadata wholesale; merge client-side if you only want to add keys.

curl:
curl -X PATCH 'https://verification.didit.me/v3/businesses/company-123/' \\
-H 'x-api-key: YOUR_API_KEY' \\
-H 'Content-Type: application/json' \\
-d '{"display_name": "Acme", "metadata": {"tier": "enterprise"}}'

Response 200: full updated BusinessDetailItem (same shape as GET). See /reference/data-models.

Side effects:
- Writes an entry to the business's comments activity log (actor derived from the API key).
- last_activity_at bumped to now().
- Re-sending an unchanged body is safe.

Failure modes:
- 400 — validation. Common: { "status": ["Invalid status. Valid options are: ACTIVE, FLAGGED, BLOCKED"] }, { "metadata": ["Metadata must be a JSON object."] }
- 401 — missing/invalid x-api-key.
- 403 — lacks update:businesses.
- 404 — vendor_data not found.
- 429 — rate-limited.

Notes:
- vendor_data in the URL cannot be changed via this endpoint.
- For status-only flips, prefer the dedicated PATCH /v3/businesses/{vendor_data}/update-status/.
- Overriding registry-derived fields is allowed but flagged in the audit log.

For end-to-end Didit integration, paste in the full prompt at /integration/integration-prompt.`}
/>

## Overview

Updates mutable fields on a [Business entity](/entities/businesses/overview). Fields populated from registry lookups (`legal_name`, `registration_number`, `country_code`) become read-only after the first approved Business Verification (KYB) session.

## When to use it

* **Rename** — set a better `display_name` for internal views.
* **Update metadata** — move a business between internal tiers, record an internal note, change tags.
* **Override registry data** (with caution) — overrides are accepted but flagged in the [audit log](/console/audit-logs).

## Notes

* `vendor_data` in the URL cannot be changed via this endpoint.
* Emits a `business.data.updated` webhook with a `changed_fields` array.

## Permissions

Role must grant `update:businesses`.

## Related

* [Business operations](/entities/businesses/operations)
* [Data model](/entities/businesses/data-model)
* [Update status](/management-api/businesses/update-status)


## OpenAPI

````yaml PATCH /v3/businesses/{vendor_data}/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: Identity verification API. Authenticate with x-api-key header.
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/businesses/{vendor_data}/:
    patch:
      tags:
        - Businesses
      summary: Update business
      description: >-
        Partial update of a business: `display_name`, `legal_name`,
        `registration_number`, `country_code`, `status`, `metadata`. `metadata`
        fully replaces. Setting `status` to `BLOCKED` adds the `vendor_data` to
        the system blocklist; moving away from `BLOCKED` removes that entry.
      operationId: update_business
      parameters:
        - name: vendor_data
          in: path
          required: true
          schema:
            type: string
          description: >-
            Your unique identifier for the business (free-form string, NOT a
            UUID).
          example: company-123
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: Partial-update body. Provide only the fields you want to change.
              properties:
                display_name:
                  type: string
                  nullable: true
                  description: >-
                    Friendly display name shown in the console (takes precedence
                    over `legal_name` for UI display).
                legal_name:
                  type: string
                  nullable: true
                  description: Official legal name from registry or manual entry.
                registration_number:
                  type: string
                  nullable: true
                  description: Company registration or incorporation number.
                country_code:
                  type: string
                  nullable: true
                  description: >-
                    Country of incorporation (ISO 3166-1 alpha-2, e.g. `GB`,
                    `US`).
                status:
                  type: string
                  enum:
                    - ACTIVE
                    - FLAGGED
                    - BLOCKED
                  description: >-
                    Business lifecycle status. Setting `BLOCKED` automatically
                    adds the `vendor_data` to the system blocklist; flipping
                    away from `BLOCKED` removes that blocklist entry.
                metadata:
                  type: object
                  nullable: true
                  description: >-
                    Arbitrary JSON object you attach to the business. **Fully
                    replaces** the existing metadata on update — merge
                    client-side if you only want to add keys.
            examples:
              Update name:
                summary: Update display name
                value:
                  display_name: Acme Corp
              Flag for review:
                summary: Flip status
                value:
                  status: FLAGGED
              Add metadata:
                summary: Replace metadata JSON
                value:
                  metadata:
                    industry: fintech
                    risk_level: low
              Fix registry data:
                summary: Correct extracted fields
                value:
                  legal_name: Acme Trading International Ltd
                  registration_number: '12345678'
                  country_code: GB
      responses:
        '200':
          description: Business updated. The full updated business record is returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessDetailItem'
              examples:
                Updated:
                  value:
                    didit_internal_id: a1b2c3d4-e5f6-4890-abcd-ef1234567890
                    vendor_data: company-123
                    display_name: Acme Corp
                    legal_name: Acme Trading Ltd
                    registration_number: '12345678'
                    country_code: GB
                    effective_name: Acme Corp
                    status: FLAGGED
                    session_count: 2
                    approved_count: 1
                    declined_count: 0
                    in_review_count: 1
                    features:
                      KYB: Approved
                    features_list:
                      - feature: KYB
                        status: Approved
                    last_session_at: '2026-03-15T10:30:00Z'
                    last_activity_at: '2026-03-15T10:30:00Z'
                    first_session_at: '2026-01-10T08:00:00Z'
                    tags:
                      - uuid: 9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d
                        name: VIP
                        color: '#2567FF'
                    created_at: '2026-01-10T08:00:00Z'
                    metadata:
                      industry: fintech
                      risk_level: low
                    updated_at: '2026-03-15T10:30:00Z'
        '400':
          description: >-
            Invalid body — typically an unknown `status` or malformed
            `metadata`.
          content:
            application/json:
              examples:
                Bad status:
                  value:
                    status:
                      - >-
                        Invalid status. Valid options are: ACTIVE, FLAGGED,
                        BLOCKED
                Bad metadata:
                  value:
                    metadata:
                      - Metadata must be a JSON object.
        '403':
          description: >-
            Missing, invalid, or revoked API key, or the key cannot update
            businesses for this application. This endpoint returns `403` (never
            `401`) for authentication failures, including requests with no
            credentials at all.
          content:
            application/json:
              examples:
                Forbidden:
                  value:
                    detail: You do not have permission to perform this action.
        '404':
          description: >-
            No (non-deleted) business with the supplied `vendor_data` exists for
            this application.
          content:
            application/json:
              examples:
                Not found:
                  value:
                    detail: Not found.
        '429':
          description: >-
            Rate limit exceeded; back off and retry after the interval indicated
            in `Retry-After`.
          content:
            application/json:
              examples:
                Rate limited:
                  value:
                    detail: Request was throttled. Expected available in 30 seconds.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X PATCH
            'https://verification.didit.me/v3/businesses/company-123/' \
              -H 'x-api-key: YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"display_name": "Acme Corp", "status": "FLAGGED"}'
        - lang: python
          label: Python
          source: |-
            import requests

            resp = requests.patch(
                'https://verification.didit.me/v3/businesses/company-123/',
                headers={'x-api-key': 'YOUR_API_KEY', 'Content-Type': 'application/json'},
                json={'display_name': 'Acme Corp', 'status': 'FLAGGED'},
            )
            resp.raise_for_status()
            print(resp.json()['status'])
        - lang: javascript
          label: JavaScript
          source: >-
            const resp = await
            fetch('https://verification.didit.me/v3/businesses/company-123/', {
              method: 'PATCH',
              headers: { 'x-api-key': process.env.DIDIT_API_KEY, 'Content-Type': 'application/json' },
              body: JSON.stringify({ display_name: 'Acme Corp', status: 'FLAGGED' }),
            });

            const biz = await resp.json();

            console.log(biz.status);
components:
  schemas:
    BusinessDetailItem:
      type: object
      description: >-
        Full business detail. Extends BusinessListItem with metadata and
        updated_at.
      allOf:
        - $ref: '#/components/schemas/BusinessListItem'
        - type: object
          properties:
            metadata:
              type: object
              description: >-
                Custom metadata JSON you attached to this business. Defaults to
                `{}`.
            updated_at:
              type: string
              format: date-time
    BusinessListItem:
      type: object
      description: A verified business.
      properties:
        didit_internal_id:
          type: string
          format: uuid
          description: Didit's stable internal UUID for this business.
        vendor_data:
          type: string
          nullable: true
          description: >-
            Your unique identifier for this business (passed when creating
            sessions). This can be null when no vendor identifier was supplied.
        display_name:
          type: string
          nullable: true
          description: Custom display name set by you
        legal_name:
          type: string
          nullable: true
          description: Official legal name from registry or manual entry
        registration_number:
          type: string
          nullable: true
          description: Company registration or incorporation number
        country_code:
          type: string
          nullable: true
          description: Country of incorporation (ISO 3166-1 alpha-2, e.g. `GB`, `US`).
        effective_name:
          type: string
          nullable: true
          description: 'Best available name: display_name if set, otherwise legal_name'
        status:
          type: string
          enum:
            - ACTIVE
            - FLAGGED
            - BLOCKED
          description: >-
            Lifecycle status of the business record (NOT a session status).
            `ACTIVE` is the default, `FLAGGED` marks it for manual attention,
            `BLOCKED` prevents new sessions for this `vendor_data`.
        session_count:
          type: integer
          description: Total number of verification sessions for this business
        approved_count:
          type: integer
          description: Number of approved sessions
        declined_count:
          type: integer
          description: Number of declined sessions
        in_review_count:
          type: integer
          description: Number of sessions in review
        features:
          type: object
          description: >-
            Aggregated per-feature status across all of this business's KYB
            sessions. Currently the only key is `KYB` (the registry company
            check status). Possible values: `Approved`, `Declined`, `In Review`,
            `Not Finished`, `Resub Requested`.
        features_list:
          type: array
          items:
            type: object
            properties:
              feature:
                type: string
              status:
                type: string
          description: >-
            Same data as `features`, as an ordered array of `{feature, status}`
            objects.
        last_session_at:
          type: string
          format: date-time
          nullable: true
          description: Timestamp of the most recent session
        first_session_at:
          type: string
          format: date-time
          nullable: true
          description: Timestamp of the first session
        last_activity_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            Timestamp of the most recent activity (status change, session
            update, etc.)
        tags:
          type: array
          items:
            type: object
            properties:
              uuid:
                type: string
                format: uuid
              name:
                type: string
              color:
                type: string
          description: Tags assigned to this business
        created_at:
          type: string
          format: date-time
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````