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

# 注文と作成時の配送業者詳細を取得する

> 認証済みアカウントに属する注文 1 件を、ラベル作成時に指定された配送業者依存の詳細情報とあわせて返します。ラベル文書のみを返す GET /labels/:id を補完するエンドポイントです。



## OpenAPI

````yaml /flex-forward-ja.yaml get /orders/{orderId}
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://sandbox.flexforwardship.com
    description: Sandbox
security: []
tags:
  - name: Labels
    description: 配送ラベルとラベルドキュメントを取得する。
  - name: Tracking
    description: 出荷状況と追跡チェックポイント。
  - name: Products
    description: 利用可能な配送プロダクト一覧。
  - name: Couriers
    description: 利用可能な配送業者一覧。
paths:
  /orders/{orderId}:
    get:
      tags:
        - Orders
      summary: 注文と作成時の配送業者詳細を取得する
      description: >-
        認証済みアカウントに属する注文 1 件を、ラベル作成時に指定された配送業者依存の詳細情報とあわせて返します。ラベル文書のみを返す GET
        /labels/:id を補完するエンドポイントです。
      operationId: getOrder
      parameters:
        - schema:
            format: uuid
            type: string
          example: f47ac10b-58cc-4372-a567-0e02b2c3d479
          in: path
          name: orderId
          required: true
          description: 注文識別子。
      responses:
        '200':
          description: 既定のレスポンス
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderDetailResponse'
        '401':
          description: x-rr-apikey / x-rr-apitoken が欠落しているか無効です。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: 認証情報は有効ですが、このリソースへのアクセス権がありません。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: このアカウントに識別子に一致する注文がありません。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: >-
            このアカウントのリクエストレート上限を超えました。Retry-After
            ヘッダーで示された秒数だけ待ってから再試行してください。レート制限は、適用開始前にクライアントが処理を実装できるよう、ここで明示しています。
          headers:
            Retry-After:
              schema:
                type: integer
                minimum: 1
              description: 再試行までに待機する秒数。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: 予期しないサーバーエラーです。指数バックオフで再試行してください。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
          apiToken: []
components:
  schemas:
    OrderDetailResponse:
      additionalProperties: false
      type: object
      required:
        - order
        - carrierDetails
      properties:
        order:
          $ref: '#/components/schemas/Order'
        carrierDetails:
          $ref: '#/components/schemas/OrderCarrierDetails'
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          description: 人間が読めるエラーメッセージ。
          type: string
          example: Shipping account not found
        code:
          description: 機械可読なエラーコード。
          type: string
          example: COURIER_ERROR
    Order:
      additionalProperties: false
      description: 注文とその貨物の状態。
      type: object
      required:
        - id
        - status
        - exceptionState
        - exceptionStateAt
        - exceptionReason
        - courier
        - customerOrderNumber
        - courierOrderNumber
        - courierTrackingNumber
        - serviceProductCode
        - shipToCountryCode
        - shipToPostalCode
        - shipFromCountryCode
        - parcelMeasurements
        - maskedRecipientName
        - error
        - createdAt
      properties:
        id:
          format: uuid
          description: 注文識別子。
          type: string
          example: f47ac10b-58cc-4372-a567-0e02b2c3d479
        status:
          description: >-
            貨物の輸送段階（進行順）。現在の値:
            created、fetched、first_mile_received、transit_to_consolidation、arrive_consolidation、in_transit_last_mile、shipping_to_destination、delivered、failed。今後、新しい値が追加される場合があります。
          type: string
          example: created
        exceptionState:
          description: 通常は null で、例外状態は発生していません。
          anyOf:
            - description: >-
                `status` とは独立した注文の商業上の状態。現在の値:
                trashed、hold、carrier_hold、refund_requested、returned、refund_rejected。今後、新しい値が追加される場合があります。
              type: string
            - type: 'null'
          example: null
        exceptionStateAt:
          description: '`exceptionState` が最後に変更された日時。`exceptionState` が null の場合は null。'
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
        exceptionReason:
          description: 現在の例外状態について、顧客が指定した理由またはシステムによる理由。
          anyOf:
            - type: string
            - type: 'null'
        courier:
          description: この注文で使用したシッピングアカウントの配送業者。
          type: string
          example: yunexpress-tw
        customerOrderNumber:
          minLength: 1
          description: 顧客注文番号。order.customerOrderNumber に指定した値、または指定がない場合はシステム生成値。
          type: string
          example: N2026-05-13-TEST-01
        courierOrderNumber:
          description: 配送業者が付与した注文番号（付与後）。
          anyOf:
            - type: string
            - type: 'null'
        courierTrackingNumber:
          description: ラストマイルの追跡番号（付与後）。
          anyOf:
            - type: string
            - type: 'null'
        serviceProductCode:
          description: 配送業者のサービスプロダクトコード。
          anyOf:
            - type: string
            - type: 'null'
        shipToCountryCode:
          description: 仕向国コード（ISO 3166-1 alpha-2）。
          anyOf:
            - type: string
            - type: 'null'
        shipToPostalCode:
          description: 仕向地の郵便番号。
          anyOf:
            - type: string
            - type: 'null'
        shipFromCountryCode:
          description: 発送元の国コード（ISO 3166-1 alpha-2）。
          anyOf:
            - type: string
            - type: 'null'
        parcelMeasurements:
          description: ラベル作成時に申告された荷物の重量と寸法。
          anyOf:
            - additionalProperties: false
              type: object
              required:
                - weightUnit
                - dimensionUnit
                - parcels
              properties:
                weightUnit:
                  anyOf:
                    - type: string
                    - type: 'null'
                dimensionUnit:
                  anyOf:
                    - type: string
                    - type: 'null'
                parcels:
                  type: array
                  items:
                    additionalProperties: false
                    type: object
                    required:
                      - parcelId
                      - weight
                      - dimension
                    properties:
                      parcelId:
                        anyOf:
                          - type: string
                          - type: 'null'
                      weight:
                        type: number
                      dimension:
                        anyOf:
                          - additionalProperties: false
                            type: object
                            required:
                              - length
                              - width
                              - height
                            properties:
                              length:
                                type: number
                              width:
                                type: number
                              height:
                                type: number
                          - type: 'null'
            - type: 'null'
        maskedRecipientName:
          description: 受取人名（一部マスク済み）。
          anyOf:
            - type: string
            - type: 'null'
        error:
          description: 配送業者への注文送信が失敗した場合に含まれます。`message` は配送業者の文言をそのまま返します。
          anyOf:
            - additionalProperties: false
              type: object
              required:
                - code
                - message
              properties:
                code:
                  type: string
                message:
                  type: string
            - type: 'null'
        createdAt:
          format: date-time
          description: 注文が作成された日時。
          type: string
    OrderCarrierDetails:
      additionalProperties: false
      type: object
      required:
        - integration
        - orderNumbers
        - customs
        - iossApplied
        - serviceOptions
        - courierOptions
      properties:
        integration:
          type: string
          enum:
            - yunexpress
        orderNumbers:
          additionalProperties: false
          description: ラベル作成時に指定された注文識別子。
          type: object
          required:
            - platformOrderNumber
            - trackingNumber
            - referenceNumbers
          properties:
            platformOrderNumber:
              anyOf:
                - type: string
                - type: 'null'
            trackingNumber:
              anyOf:
                - type: string
                - type: 'null'
            referenceNumbers:
              type: array
              items:
                type: string
        customs:
          additionalProperties: false
          description: 顧客が指定した通関用識別番号。
          type: object
          required:
            - taxNumber
            - ioss
            - vat
            - eori
          properties:
            taxNumber:
              anyOf:
                - type: string
                - type: 'null'
            ioss:
              anyOf:
                - type: string
                - type: 'null'
            vat:
              anyOf:
                - type: string
                - type: 'null'
            eori:
              anyOf:
                - type: string
                - type: 'null'
        iossApplied:
          anyOf:
            - type: string
            - type: 'null'
        serviceOptions:
          type: array
          items:
            additionalProperties: false
            type: object
            required:
              - code
              - value
              - cost
            properties:
              code:
                type: string
              value:
                anyOf:
                  - type: string
                  - type: 'null'
              cost:
                anyOf:
                  - type: number
                  - type: 'null'
        courierOptions:
          additionalProperties: false
          description: 顧客が指定した配送業者固有のオプション。
          type: object
          required:
            - sourceCode
            - platformAccountCode
            - sensitiveType
            - signatureService
            - houseNumber
            - packageCount
            - senderUsci
            - platformName
            - platformState
            - platformAddress
            - platformPostalCode
            - platformPhone
            - platformEmail
            - platformSalesUrl
            - cargoType
            - paymentPlatform
            - paymentPlatformAccount
            - paymentTransactionNumber
            - labelUrl
          properties:
            sourceCode:
              anyOf:
                - type: string
                - type: 'null'
            platformAccountCode:
              anyOf:
                - type: string
                - type: 'null'
            sensitiveType:
              anyOf:
                - type: string
                - type: 'null'
            signatureService:
              anyOf:
                - type: string
                - type: 'null'
            houseNumber:
              anyOf:
                - type: string
                - type: 'null'
            packageCount:
              anyOf:
                - type: integer
                - type: 'null'
            senderUsci:
              anyOf:
                - type: string
                - type: 'null'
            platformName:
              anyOf:
                - type: string
                - type: 'null'
            platformState:
              anyOf:
                - type: string
                - type: 'null'
            platformAddress:
              anyOf:
                - type: string
                - type: 'null'
            platformPostalCode:
              anyOf:
                - type: string
                - type: 'null'
            platformPhone:
              anyOf:
                - type: string
                - type: 'null'
            platformEmail:
              anyOf:
                - type: string
                - type: 'null'
            platformSalesUrl:
              anyOf:
                - type: string
                - type: 'null'
            cargoType:
              anyOf:
                - type: string
                - type: 'null'
            paymentPlatform:
              anyOf:
                - type: string
                - type: 'null'
            paymentPlatformAccount:
              anyOf:
                - type: string
                - type: 'null'
            paymentTransactionNumber:
              anyOf:
                - type: string
                - type: 'null'
            labelUrl:
              anyOf:
                - type: string
                - type: 'null'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-rr-apikey
    apiToken:
      type: apiKey
      in: header
      name: x-rr-apitoken

````