> ## 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.

# Create Service Record



## OpenAPI

````yaml /specs/bp-agent-ecosystem.openapi.json post /api/ecosystem/service-records
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/service-records:
    post:
      tags:
        - 生态资源 / Ecosystem
      summary: Create Service Record
      operationId: create_service_record_api_ecosystem_service_records_post
      parameters:
        - name: tenant_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: 管理员创建时必填
            title: Tenant Id
          description: 管理员创建时必填
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EcosystemServiceRecordCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/SuccessResponse_EcosystemServiceRecordResponse_
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    EcosystemServiceRecordCreate:
      properties:
        partner_id:
          type: string
          title: Partner Id
          description: 资源方ID
        connect_request_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Connect Request Id
          description: 关联需求ID
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Project Id
          description: 关联项目ID
        project_name:
          type: string
          maxLength: 100
          title: Project Name
          description: 项目名称
        company_name:
          type: string
          maxLength: 100
          title: Company Name
          description: 企业名称
        service_type:
          $ref: '#/components/schemas/EcosystemServiceType'
          description: 服务类型
        service_detail:
          type: string
          title: Service Detail
          description: 服务详情
        service_date:
          type: string
          format: date
          title: Service Date
          description: 服务日期
        service_amount:
          type: integer
          minimum: 0
          title: Service Amount
          description: 服务金额（分）
        profit_share:
          type: integer
          minimum: 0
          title: Profit Share
          description: 分润金额（分）
        profit_rate:
          anyOf:
            - type: number
              maximum: 1
              minimum: 0
            - type: string
          title: Profit Rate
          description: 分润比例
          default: '0.1500'
        status:
          $ref: '#/components/schemas/EcosystemServiceRecordStatus'
          description: 服务状态
          default: in_progress
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
          description: 备注
      type: object
      required:
        - partner_id
        - project_name
        - company_name
        - service_type
        - service_detail
        - service_date
        - service_amount
        - profit_share
      title: EcosystemServiceRecordCreate
    SuccessResponse_EcosystemServiceRecordResponse_:
      properties:
        code:
          type: integer
          title: Code
          description: 响应码，成功时为0
          default: 0
        message:
          type: string
          title: Message
          description: 成功消息
          default: 操作成功
        data:
          $ref: '#/components/schemas/EcosystemServiceRecordResponse'
          description: 响应数据
        timestamp:
          anyOf:
            - type: integer
            - type: 'null'
          title: Timestamp
          description: 响应时间戳（可选）
      type: object
      title: SuccessResponse[EcosystemServiceRecordResponse]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    EcosystemServiceType:
      type: string
      enum:
        - legal
        - finance_tax
        - policy
        - intellectual
        - order_match
        - fa_consultant
        - brand_pr
        - talent
        - data
        - cloud
      title: EcosystemServiceType
      description: 生态服务类型枚举。
    EcosystemServiceRecordStatus:
      type: string
      enum:
        - in_progress
        - completed
        - canceled
      title: EcosystemServiceRecordStatus
      description: 生态服务记录状态枚举。
    EcosystemServiceRecordResponse:
      properties:
        partner_id:
          type: string
          title: Partner Id
          description: 资源方ID
        connect_request_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Connect Request Id
          description: 关联需求ID
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Project Id
          description: 关联项目ID
        project_name:
          type: string
          maxLength: 100
          title: Project Name
          description: 项目名称
        company_name:
          type: string
          maxLength: 100
          title: Company Name
          description: 企业名称
        service_type:
          $ref: '#/components/schemas/EcosystemServiceType'
          description: 服务类型
        service_detail:
          type: string
          title: Service Detail
          description: 服务详情
        service_date:
          type: string
          format: date
          title: Service Date
          description: 服务日期
        service_amount:
          type: integer
          minimum: 0
          title: Service Amount
          description: 服务金额（分）
        profit_share:
          type: integer
          minimum: 0
          title: Profit Share
          description: 分润金额（分）
        profit_rate:
          type: string
          title: Profit Rate
          description: 分润比例
          default: '0.1500'
        status:
          $ref: '#/components/schemas/EcosystemServiceRecordStatus'
          description: 服务状态
          default: in_progress
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
          description: 备注
        id:
          type: string
          title: Id
        tenant_id:
          type: string
          title: Tenant Id
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        status_label:
          anyOf:
            - type: string
            - type: 'null'
          title: Status Label
          description: 状态中文
        service_type_label:
          anyOf:
            - type: string
            - type: 'null'
          title: Service Type Label
          description: 服务类型中文
        partner_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Partner Name
          description: 资源方名称
      type: object
      required:
        - partner_id
        - project_name
        - company_name
        - service_type
        - service_detail
        - service_date
        - service_amount
        - profit_share
        - id
        - tenant_id
        - created_at
        - updated_at
      title: EcosystemServiceRecordResponse
    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.