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

# 获取物流商的配送产品列表

> 返回指定物流商的可用配送产品列表。创建标签时请使用返回的产品代码。



## OpenAPI

````yaml /flex-forward-zh-Hans.yaml get /products
openapi: 3.1.0
info:
  title: Flex Forward Shipping API
  description: >-
    > **翻译说明：** 此 API
    参考文档由英文翻译而成。[英文版](/api-reference/labels/create-label)为官方权威来源。如翻译内容有任何不一致之处，请以英文版为准。


    Flex Forward 提供统一的 API，用于创建配送标签、获取标签文件，以及追踪多个物流商的货件。
  version: 1.0.0
servers:
  - url: https://api.flexforwardship.com
    description: Production
  - url: https://api-staging.flexforwardship.com
    description: Staging
security: []
tags:
  - name: CreateLabels
    description: 创建配送标签。
  - name: Labels
    description: 获取配送标签与标签文件。
  - name: Tracking
    description: 追踪货件状态与检查点。
  - name: Products
    description: 列出可用的配送产品。
paths:
  /products:
    get:
      tags:
        - Products
      summary: 获取物流商的配送产品列表
      description: 返回指定物流商的可用配送产品列表。创建标签时请使用返回的产品代码。
      operationId: listProducts
      parameters:
        - schema:
            minLength: 1
            type: string
          in: query
          name: courier
          required: true
        - schema:
            minLength: 1
            type: string
          in: query
          name: shipperAccountId
          required: false
        - schema:
            minLength: 2
            maxLength: 10
            type: string
          in: query
          name: locale
          required: false
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductsListResponse'
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ValidationErrorResponse'
                  - $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
        - apiKey: []
          apiToken: []
components:
  schemas:
    ProductsListResponse:
      additionalProperties: false
      type: object
      required:
        - products
      properties:
        products:
          type: array
          items:
            additionalProperties: false
            type: object
            required:
              - code
              - name
            properties:
              code:
                type: string
              name:
                type: string
    ValidationErrorResponse:
      additionalProperties: false
      description: 当请求体未通过模式验证时返回。
      type: object
      required:
        - error
        - details
      properties:
        error:
          description: 错误摘要消息。
          type: string
          enum:
            - Validation failed
        details:
          description: 字段级验证错误列表。
          type: array
          items:
            additionalProperties: false
            type: object
            required:
              - field
              - message
            properties:
              field:
                description: 指向无效字段的点分隔路径。
                type: string
                example: service.productCode
              message:
                description: 人类可读的验证消息。
                type: string
                example: service.productCode is required
    ErrorResponse:
      additionalProperties: false
      type: object
      required:
        - error
      properties:
        error:
          description: 人类可读的错误消息。
          type: string
          example: Shipping account not found
        code:
          description: 机器可读的错误代码。
          type: string
          example: COURIER_ERROR
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    apiKey:
      type: apiKey
      in: header
      name: x-rr-apikey
    apiToken:
      type: apiKey
      in: header
      name: x-rr-apitoken

````