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

# Unarchive vendor

> Reactivate a previously archived vendor



## OpenAPI

````yaml POST /v1/platform/businesses/{business_id}/vendors/{vendor_id}/unarchive/
openapi: 3.0.3
info:
  title: Thredfi Accounting Platform API
  version: 1.0.0
  description: >-
    Comprehensive API for accounting, invoice management, open banking, and
    intelligence services.
servers: []
security: []
paths:
  /v1/platform/businesses/{business_id}/vendors/{vendor_id}/unarchive/:
    post:
      tags:
        - Vendors
      summary: Unarchive vendor
      description: Reactivate a previously archived vendor
      operationId: unarchive_vendor
      parameters:
        - in: path
          name: business_id
          schema:
            type: string
            pattern: ^[0-9a-f-]+$
          required: true
        - in: path
          name: vendor_id
          schema:
            type: string
            format: uuid
          description: A UUID string identifying this vendor.
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VendorRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/VendorRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/VendorRequest'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Vendor'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
          description: Validation errors in request data
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Authentication required - missing or invalid API key
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Permission denied - insufficient privileges
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Resource not found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Conflict - resource already exists or invalid state transition
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable entity - business logic validation failed
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal server error
      security:
        - PartnerJWT: []
        - BusinessScopedJWT: []
        - BasicAuth: []
        - BearerUnscoped: []
        - BearerBusinessScoped: []
components:
  schemas:
    VendorRequest:
      type: object
      description: Serializer for vendor objects returned by the vendors list endpoint
      properties:
        external_id:
          type: string
          description: Your unique identifier for this vendor (used for idempotency)
          maxLength: 255
        individual_name:
          type: string
          description: Vendor individual name (for sole traders/freelancers)
          maxLength: 255
        company_name:
          type: string
          description: Registered company name (for limited companies)
          maxLength: 255
        email:
          type: string
          format: email
          description: Primary email address for vendor communications
          maxLength: 254
    Vendor:
      type: object
      description: Serializer for vendor objects returned by the vendors list endpoint
      properties:
        type:
          type: string
          readOnly: true
          description: Resource type (always 'VendorData')
        id:
          type: string
          format: uuid
          readOnly: true
          description: Unique vendor identifier
        external_id:
          type: string
          description: Your unique identifier for this vendor (used for idempotency)
          maxLength: 255
        individual_name:
          type: string
          description: Vendor individual name (for sole traders/freelancers)
          maxLength: 255
        company_name:
          type: string
          description: Registered company name (for limited companies)
          maxLength: 255
        email:
          type: string
          format: email
          description: Primary email address for vendor communications
          maxLength: 254
        mobile_phone:
          type: string
          readOnly: true
          description: Mobile phone number (E.164 format, e.g., +44 7700 900123)
        office_phone:
          type: string
          readOnly: true
          description: Office phone number (E.164 format, e.g., +44 20 7946 0958)
        address_string:
          type: string
          readOnly: true
          description: Full formatted address (read-only, auto-generated)
        memo:
          type: string
          readOnly: true
          description: Internal notes or description for this vendor
        status:
          type: string
          readOnly: true
          description: Vendor status (ACTIVE, INACTIVE, ARCHIVED, BLOCKED)
        transaction_tags:
          type: array
          items: {}
          readOnly: true
          description: List of tags for categorization
        documents:
          type: array
          items:
            $ref: '#/components/schemas/DocumentFileUrl'
          readOnly: true
          description: All documents linked to this vendor with presigned URLs
      required:
        - address_string
        - documents
        - id
        - memo
        - mobile_phone
        - office_phone
        - status
        - transaction_tags
        - type
    ValidationErrorResponse:
      type: object
      description: Validation error response with field-specific errors
      properties:
        error_code:
          type: string
          description: Error code (e.g., 'validation_error')
        message:
          type: string
          nullable: true
          description: Human-readable error message
        detail:
          type: object
          additionalProperties: {}
          description: Contains field_errors and additional context
        request_id:
          type: string
          description: Request ID for tracing
      required:
        - detail
        - error_code
        - message
    ErrorResponse:
      type: object
      description: Standard error response format
      properties:
        error_code:
          type: string
          description: Error code for programmatic handling
        message:
          type: string
          nullable: true
          description: Human-readable error message
        detail:
          type: object
          additionalProperties: {}
          description: Additional error details including field_errors and debug info
        request_id:
          type: string
          description: Request ID for tracing
      required:
        - error_code
        - message
    DocumentFileUrl:
      type: object
      description: Serializer for document file URL with metadata.
      properties:
        url:
          type: string
          format: uri
          description: Presigned URL for document download
        expires_in:
          type: integer
          description: Seconds until URL expires
        document_id:
          type: string
          format: uuid
          description: Document UUID
        file_name:
          type: string
          description: Original document filename
        file_size:
          type: integer
          description: File size in bytes
        mime_type:
          type: string
          description: MIME type of the document
      required:
        - document_id
        - expires_in
        - file_name
        - file_size
        - mime_type
        - url
  securitySchemes:
    PartnerJWT:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Partner-level JWT token (unscoped). Token payload includes `partner_id`.
        Business access is validated via partner ownership. Format: `Bearer
        <your-jwt-token>`


        **Use this for**: Multi-business operations where the business_id is
        specified in the URL and partner has access to multiple businesses.
    BusinessScopedJWT:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Business-scoped JWT token. Token payload includes `business_id` to
        automatically scope requests. Format: `Bearer <your-jwt-token>`


        **Use this for**: Business-specific operations where the business
        context is embedded in the token.
    BasicAuth:
      type: http
      scheme: basic
      description: >-
        Basic authentication for OAuth2 token endpoint. Use partner_uuid:api_key
        as username:password. Example: Authorization: Basic
        base64(partner_uuid:api_key)
    BearerUnscoped:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Partner (unscoped) JWT Bearer token. Obtain via POST
        /v1/platform/oauth2/token with Basic auth (partner_uuid:api_key). Use
        header: Authorization: Bearer {access_token}
    BearerBusinessScoped:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Business-scoped JWT Bearer token. Obtain via POST
        /v1/platform/{business_id}/oauth2/token/ using a partner Bearer token.
        Only valid for endpoints whose URL contains that business_id.

````