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

# Upload Provider Document



## OpenAPI

````yaml /specs/bp-agent-ecosystem.openapi.json post /api/ecosystem/providers/{provider_id}/documents
openapi: 3.1.0
info:
  title: BP-Agent Ecosystem API
  description: BP-Agent 账号态生态服务接口：生态对接需求、服务商档案、上架状态、成员、服务、评价与资料文件。接口使用账号 JWT 鉴权，并按租户隔离。
  contact:
    name: BP Agent 开发团队
    email: support@bpagent.com
  license:
    name: MIT License
    url: https://opensource.org/licenses/MIT
  version: 1.0.0
servers:
  - url: https://bptest.mapleai.cc
    description: 测试环境（仅 relay 上传）
  - url: https://project.mapleai.cc
    description: 生产环境（OSS；STS 直传需服务端启用）
security: []
paths:
  /api/ecosystem/providers/{provider_id}/documents:
    post:
      tags:
        - 生态资源 / Ecosystem
      summary: Upload Provider Document
      operationId: >-
        upload_provider_document_api_ecosystem_providers__provider_id__documents_post
      parameters:
        - name: provider_id
          in: path
          required: true
          schema:
            type: string
            title: Provider Id
        - name: category
          in: query
          required: true
          schema:
            type: string
            pattern: ^(honor|qualification)$
            title: Category
        - name: tenant_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Tenant Id
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/Body_upload_provider_document_api_ecosystem_providers__provider_id__documents_post
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/SuccessResponse_EcosystemProviderDocumentResponse_
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    Body_upload_provider_document_api_ecosystem_providers__provider_id__documents_post:
      properties:
        file:
          type: string
          format: binary
          title: File
      type: object
      required:
        - file
      title: >-
        Body_upload_provider_document_api_ecosystem_providers__provider_id__documents_post
    SuccessResponse_EcosystemProviderDocumentResponse_:
      properties:
        code:
          type: integer
          title: Code
          description: 响应码，成功时为0
          default: 0
        message:
          type: string
          title: Message
          description: 成功消息
          default: 操作成功
        data:
          $ref: '#/components/schemas/EcosystemProviderDocumentResponse'
          description: 响应数据
        timestamp:
          anyOf:
            - type: integer
            - type: 'null'
          title: Timestamp
          description: 响应时间戳（可选）
      type: object
      title: SuccessResponse[EcosystemProviderDocumentResponse]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    EcosystemProviderDocumentResponse:
      properties:
        category:
          type: string
          enum:
            - honor
            - qualification
          title: Category
          description: 文档分类
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
          description: 展示名称
        issuer:
          anyOf:
            - type: string
              maxLength: 100
            - type: 'null'
          title: Issuer
          description: 发证/来源单位
        number:
          anyOf:
            - type: string
              maxLength: 100
            - type: 'null'
          title: Number
          description: 文档编号
        uploaded_at:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Uploaded At
          description: 登记日期
        id:
          type: string
          title: Id
        file_name:
          anyOf:
            - type: string
            - type: 'null'
          title: File Name
        content_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Type
        size_bytes:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Size Bytes
        download_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Download Url
      type: object
      required:
        - category
        - name
        - id
      title: EcosystemProviderDocumentResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.