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

````