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

# 顾客门户 API 认证

> 顾客门户 API 认证



## OpenAPI

````yaml openapi/v1-zh.yaml POST /api/v1/customer_portal/auth
openapi: 3.0.3
info:
  title: Subotiz API
  description: Subotiz OpenAPI
  version: 1.0.0
servers:
  - url: https://{api}.subotiz.com
    variables:
      api:
        default: api
security:
  - sec0: []
tags:
  - name: 折扣
    description: 折扣
  - name: 发票
    description: 发票
  - name: 退款
    description: 退款
  - name: 商品管理
    description: 商品管理
  - name: 订阅
    description: 订阅
  - name: 商品定价
    description: 商品定价方案
  - name: 交易单
    description: 交易单
  - name: 支付流水
    description: 支付流水
  - name: 结账会话
    description: 结账会话
  - name: 顾客
    description: 顾客
  - name: 顾客门户
    description: 顾客门户
  - name: Webhook
    description: Webhook
  - name: 争议
    description: 争议订单
paths:
  /api/v1/customer_portal/auth:
    post:
      tags:
        - 顾客门户
      summary: 顾客门户 API 认证
      description: 顾客门户 API 认证
      operationId: v1-customer-portal-api-auth
      parameters:
        - $ref: '#/components/parameters/HeaderRequestID'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiAuthCustomerPortalRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiAuthCustomerPortalResponse'
components:
  parameters:
    HeaderRequestID:
      name: Request-Id
      in: header
      description: 请求的唯一标识符
      required: true
      schema:
        type: string
        default: 008e3967-a1b5-48bb-be14-d5bff5092e61
  schemas:
    ApiAuthCustomerPortalRequest:
      required:
        - customer_id
      type: object
      properties:
        customer_id:
          type: string
          description: Subotiz 顾客唯一标识符
        locale:
          type: string
          description: 门户语言
        landing:
          allOf:
            - $ref: '#/components/schemas/Landing'
          description: 定向落地（可选）
    ApiAuthCustomerPortalResponse:
      type: object
      properties:
        code:
          type: string
          description: error code
        message:
          type: string
          description: error message
        data:
          $ref: '#/components/schemas/ApiAuthCustomerPortalResponse_Data'
    Landing:
      type: object
      properties:
        page:
          type: string
          description: >-
            落地页类型：subscriptions / payment_methods / invoices / profile /
            subscription_detail
        subscription_id:
          type: string
          description: 二级页参数：订阅 ID（page=subscription_detail 时必填）
        mode:
          type: string
          description: 二级页参数：操作模式（page=subscription_detail 时必填，本期仅 change_payment_method）
    ApiAuthCustomerPortalResponse_Data:
      type: object
      properties:
        customer_portal_link:
          type: string
          description: Subotiz 顾客门户链接
  securitySchemes:
    sec0:
      type: http
      description: 'Bearer API Key 鉴权。格式：Authorization: Bearer {your_api_key}'
      scheme: bearer

````