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

# Get an order and the carrier details it was created with

> Returns one order scoped to the authenticated account, together with the carrier-dependent details supplied at label creation. Complementary to GET /labels/:id, which returns only the label document.



## OpenAPI

````yaml /flex-forward.yaml get /orders/{orderId}
openapi: 3.1.0
info:
  title: Flex Forward Shipping API
  description: >-
    Flex Forward provides a unified API for creating shipping labels, retrieving
    label documents, and tracking shipments across multiple courier services.
  version: 1.0.0
servers:
  - url: https://api.flexforwardship.com
    description: Production
  - url: https://sandbox.flexforwardship.com
    description: Sandbox
security: []
tags:
  - name: Labels
    description: Retrieve shipping labels and label documents.
  - name: Tracking
    description: Track shipment status and checkpoints.
  - name: Products
    description: List available shipping products.
  - name: Couriers
    description: List available couriers.
paths:
  /orders/{orderId}:
    get:
      tags:
        - Orders
      summary: Get an order and the carrier details it was created with
      description: >-
        Returns one order scoped to the authenticated account, together with the
        carrier-dependent details supplied at label creation. Complementary to
        GET /labels/:id, which returns only the label document.
      operationId: getOrder
      parameters:
        - schema:
            format: uuid
            type: string
          example: f47ac10b-58cc-4372-a567-0e02b2c3d479
          in: path
          name: orderId
          required: true
          description: Order identifier.
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderDetailResponse'
        '401':
          description: Missing or invalid x-rr-apikey / x-rr-apitoken.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Credentials are valid but do not grant access to this resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: No order matches the identifier for this account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: >-
            Request rate for this account was exceeded. Wait for the number of
            seconds given in the Retry-After header, then retry. Rate limits are
            declared here so clients implement handling ahead of enforcement.
          headers:
            Retry-After:
              schema:
                type: integer
                minimum: 1
              description: Seconds to wait before retrying.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Unexpected server error. Retry with exponential backoff.
          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: Human-readable error message.
          type: string
          example: Shipping account not found
        code:
          description: Machine-readable error code.
          type: string
          example: COURIER_ERROR
    Order:
      additionalProperties: false
      description: An order and the state of its shipment.
      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: Order identifier.
          type: string
          example: f47ac10b-58cc-4372-a567-0e02b2c3d479
        status:
          description: >-
            The shipment's movement stage, in ladder order. Current values:
            created, fetched, first_mile_received, transit_to_consolidation,
            arrive_consolidation, in_transit_last_mile, shipping_to_destination,
            delivered, failed. New values may be added.
          type: string
          example: created
        exceptionState:
          description: Null is the normal case — no exception is in effect.
          anyOf:
            - description: >-
                The order's commercial state, independent of `status`. Current
                values: trashed, hold, carrier_hold, refund_requested, returned,
                refund_rejected. New values may be added.
              type: string
            - type: 'null'
          example: null
        exceptionStateAt:
          description: >-
            When `exceptionState` last changed. Null when `exceptionState` is
            null.
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
        exceptionReason:
          description: Customer-supplied or system reason for the current exception state.
          anyOf:
            - type: string
            - type: 'null'
        courier:
          description: The shipping account courier used for this order.
          type: string
          example: yunexpress-tw
        customerOrderNumber:
          minLength: 1
          description: >-
            Customer order number: the value supplied in
            order.customerOrderNumber, or a system-generated value when none was
            supplied.
          type: string
          example: N2026-05-13-TEST-01
        courierOrderNumber:
          description: The courier's own order number, once assigned.
          anyOf:
            - type: string
            - type: 'null'
        courierTrackingNumber:
          description: Last-mile tracking number, once assigned.
          anyOf:
            - type: string
            - type: 'null'
        serviceProductCode:
          description: Courier service product code.
          anyOf:
            - type: string
            - type: 'null'
        shipToCountryCode:
          description: Destination country code (ISO 3166-1 alpha-2).
          anyOf:
            - type: string
            - type: 'null'
        shipToPostalCode:
          description: Destination postal code.
          anyOf:
            - type: string
            - type: 'null'
        shipFromCountryCode:
          description: Origin country code (ISO 3166-1 alpha-2).
          anyOf:
            - type: string
            - type: 'null'
        parcelMeasurements:
          description: Declared parcel weight and dimensions as supplied at label creation.
          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: Recipient name, partially masked.
          anyOf:
            - type: string
            - type: 'null'
        error:
          description: >-
            Present when the courier's own order submission failed. `message` is
            carrier wording, passed through verbatim.
          anyOf:
            - additionalProperties: false
              type: object
              required:
                - code
                - message
              properties:
                code:
                  type: string
                message:
                  type: string
            - type: 'null'
        createdAt:
          format: date-time
          description: When the order was created.
          type: string
    OrderCarrierDetails:
      additionalProperties: false
      type: object
      required:
        - integration
        - orderNumbers
        - customs
        - iossApplied
        - serviceOptions
        - courierOptions
      properties:
        integration:
          type: string
          enum:
            - yunexpress
        orderNumbers:
          additionalProperties: false
          description: Order identifiers supplied at label creation.
          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: Customs identifiers as supplied by the customer.
          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: Carrier-specific options as supplied by the customer.
          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

````