openapi: "3.1.0"
info:
  title: "白鲸出海 - 泛互联网出海服务平台 — Bilarna Provider API"
  version: "1.0.0"
  description: |
    Machine-readable API for interacting with 白鲸出海 - 泛互联网出海服务平台 on the Bilarna B2B network.
    白鲸出海是一家致力于服务中国泛互联网企业走向海外的综合服务平台，目前白鲸出海涵盖资讯（快讯、7×24h、问答和话题等）、数据（公司、产品、资本、榜单、专辑和投放等）、服务（合作、招聘、活动、投融资和众创空间等）以及社群社区等共四大模块。自2014年7月开始运营以来，白鲸出海已成长为中国泛互联网出海媒体领域的领先品牌，在行业中家喻户晓。白鲸出海在2014年7月、2015年6月以及2017年11月分别完成百万人民币级天使投资、千万人民币级A轮融资和千万人民币级A+轮融资。
    Services offered: Market Entry Consulting.
  contact:
    name: "白鲸出海 - 泛互联网出海服务平台"
    url: "https://bilarna.com/provider/baijingapp"
  x-provider:
    slug: "baijingapp"
    verified: true
    accepts_meetings: false
    logo: "https://www.baijingapp.com/static/css/default/img/favicon.ico?v=8820231017"


servers:
  - url: "https://api.bilarna.com/api"
    description: Bilarna API

paths:
  /agent/match:
    post:
      operationId: bilarna_match
      summary: Find matching providers by service need
      description: |
        Returns a ranked list of providers (business_id, score, description).
        Use the returned business_id with /agent/request to submit a
        service request to 白鲸出海 - 泛互联网出海服务平台 (business_id from match results).
      parameters:
        - name: api-version
          in: query
          required: true
          schema:
            type: string
            default: "1.0"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [need]
              properties:
                need:
                  type: string
                  description: Free-text service description
                  example: "Market Entry Consulting"
      responses:
        "200":
          description: Matched providers
          content:
            application/json:
              schema:
                type: object
                properties:
                  matchRequestId:
                    type: integer
                  candidates:
                    type: array
                    items:
                      type: object
                      properties:
                        business_id:
                          type: integer
                        score:
                          type: number
                        description:
                          type: string

  /agent/request:
    post:
      operationId: bilarna_request
      summary: Submit a service request to a provider
      description: |
        Sends a service request. When business_id is provided the request
        goes directly to that provider; otherwise Bilarna matches the
        request to relevant providers automatically.
      parameters:
        - name: api-version
          in: query
          required: true
          schema:
            type: string
            default: "1.0"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [need, contact_name, email]
              properties:
                business_id:
                  type: integer
                  description: Target provider ID (from bilarna_match)
                  nullable: true
                need:
                  type: string
                  description: Free-text description of the service need
                contact_name:
                  type: string
                  description: Full name of the decision-maker
                email:
                  type: string
                  format: email
                  description: Business email for lead routing
                phone:
                  type: string
                  description: Business phone number (optional)
                category:
                  type: string
                  description: Service category
                country:
                  type: string
                  description: Provider country preference
                budget_max:
                  type: number
                  description: Maximum project budget in USD
      responses:
        "200":
          description: Request created
          content:
            application/json:
              schema:
                type: object
                properties:
                  matchRequestId:
                    type: integer
                  business_id:
                    type: integer
                  lead:
                    type: object
                    properties:
                      contactName:
                        type: string
                      email:
                        type: string
                      phone:
                        type: string
