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

# 以标签 ID 或客户订单编号获取物流商托管的标签 URL

> 获取先前创建的标签文件 URL。可接受标签 UUID、customerOrderNumber 或以逗号分隔的标识符作为路径参数。批量请求会省略找不到或失败的标签。



## OpenAPI

````yaml /flex-forward-zh-Hans.yaml get /labels/{id}
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:
  /labels/{id}:
    get:
      tags:
        - Labels
      summary: 以标签 ID 或客户订单编号获取物流商托管的标签 URL
      description: >-
        获取先前创建的标签文件 URL。可接受标签 UUID、customerOrderNumber
        或以逗号分隔的标识符作为路径参数。批量请求会省略找不到或失败的标签。
      operationId: getLabel
      parameters:
        - schema:
            minLength: 1
            type: string
          example: f47ac10b-58cc-4372-a567-0e02b2c3d479
          in: path
          name: id
          required: true
          description: 标签 UUID、客户订单编号或以逗号分隔的标识符。
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/GetLabelResponse'
                  - $ref: '#/components/schemas/GetLabelsResponse'
        '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'
        '422':
          description: 当标签已创建但物流商提交失败时返回。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LabelFailedResponse'
        '502':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
        - apiKey: []
          apiToken: []
components:
  schemas:
    GetLabelResponse:
      additionalProperties: false
      description: 标签文件获取结果。
      type: object
      required:
        - id
        - customerOrderNumber
        - url
        - labelFormat
      properties:
        id:
          format: uuid
          description: 标签标识符。
          type: string
          example: f47ac10b-58cc-4372-a567-0e02b2c3d479
        customerOrderNumber:
          minLength: 1
          description: 与此标签关联的客户订单编号。
          type: string
          example: N2026-05-13-TEST-01
        url:
          format: uri
          description: 标签文件下载 URL。
          type: string
          example: https://label-cdn.yunexpress.cn/labels/YT2503010001.pdf
        labelFormat:
          minLength: 1
          description: 文件格式（pdf 或 png）。
          type: string
          example: pdf
    GetLabelsResponse:
      additionalProperties: false
      description: 批量标签文件获取结果。
      type: object
      required:
        - labels
      properties:
        labels:
          description: 成功解析的标签文件 URL。找不到或失败的标签会被省略。
          type: array
          items:
            additionalProperties: false
            type: object
            required:
              - id
              - customerOrderNumber
              - url
              - labelFormat
            properties:
              id:
                format: uuid
                description: 标签标识符。
                type: string
                example: f47ac10b-58cc-4372-a567-0e02b2c3d479
              customerOrderNumber:
                minLength: 1
                description: 与此标签关联的客户订单编号。
                type: string
                example: N2026-05-13-TEST-01
              url:
                format: uri
                description: 标签文件下载 URL。
                type: string
                example: https://label-cdn.yunexpress.cn/labels/YT2503010001.pdf
              labelFormat:
                minLength: 1
                description: 文件格式（pdf 或 png）。
                type: string
                example: pdf
    ErrorResponse:
      additionalProperties: false
      type: object
      required:
        - error
      properties:
        error:
          description: 人类可读的错误消息。
          type: string
          example: Shipping account not found
        code:
          description: 机器可读的错误代码。
          type: string
          example: COURIER_ERROR
    LabelFailedResponse:
      additionalProperties: false
      description: 当标签已创建但物流商提交失败时返回。
      type: object
      required:
        - error
      properties:
        error:
          description: 错误摘要。
          type: string
          enum:
            - Label creation failed
        errorCode:
          description: 物流商专属错误代码。
          type: string
          example: COURIER_ERROR
        errorMessage:
          description: 人类可读的错误消息。
          type: string
          example: Address validation failed
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    apiKey:
      type: apiKey
      in: header
      name: x-rr-apikey
    apiToken:
      type: apiKey
      in: header
      name: x-rr-apitoken

````