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

# Get Order

> Get details about a specific order.



## OpenAPI

````yaml get /orders/{id}
openapi: 3.1.0
info:
  title: Orders API
  version: v1
  description: >-
    The Orders API allows managing your shop's orders within the Loop Platform.


    ### Resource identifier format


    Resource identifiers (the `id` field and related global-identifier fields)
    are returned as JSON

    integers by default. To receive them as strings instead, send the

    `X-Loop-Global-Identifier-Type: string` request header.
  contact:
    name: Loop Returns
    url: https://loopreturns.com/
servers:
  - url: https://api.loopreturns.com/api/v1
security: []
tags:
  - name: Orders
paths:
  /orders/{id}:
    get:
      tags:
        - Orders
      summary: Get Order
      description: Get details about a specific order.
      operationId: get-order
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          required: true
          description: Identifier of the order.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  order:
                    $ref: '#/components/schemas/OrderResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - read: []
components:
  schemas:
    OrderResponse:
      title: OrderResponse
      type: object
      properties:
        id:
          type: integer
          format: int64
          minimum: 1
          examples:
            - 810772123123123
          readOnly: true
        external_id:
          type:
            - string
            - 'null'
          examples:
            - 564400c7-7a6b-4f29-b6a5-7bb580b2992c
        name:
          type: string
        secondary_identifier:
          type:
            - string
            - 'null'
        source:
          type:
            - string
            - 'null'
        sales_channel:
          type:
            - string
            - 'null'
          description: The name of the channel.
          examples:
            - shopify
        customer:
          type: object
          properties:
            id:
              type: integer
              description: The global identifier of the customer.
              examples:
                - 123123123123123
            external_id:
              type:
                - string
                - 'null'
              examples:
                - 564400c7-7a6b-4f29-b6a5-7bb580b2992c
            sales_channel:
              type:
                - string
                - 'null'
              description: The name of the channel associated with the customer.
              examples:
                - shopify
            first_name:
              type: string
            last_name:
              type: string
            email:
              type: string
            phone:
              type: string
        status:
          type: string
          enum:
            - active
            - archived
            - cancelled
            - unknown
          description: Status of the Order.
        shipping_address:
          $ref: '#/components/schemas/Address'
        billing_address:
          $ref: '#/components/schemas/Address'
        taxes_included:
          type: boolean
        total_price:
          $ref: '#/components/schemas/MoneySet'
          description: >
            The price of the order in minor units, such as cents, with its
            corresponding currency.
        total_price_presentment:
          $ref: '#/components/schemas/MoneySet'
          description: >
            The price of the order in minor units, such as cents. This is
            included if the price was shown to the customer in an alternate
            currency.
        total_discounts:
          $ref: '#/components/schemas/MoneySet'
          description: >
            The deduction from the original order price as a way to promote
            sales, special offers, or customer loyalty rewards.
        total_discounts_presentment:
          $ref: '#/components/schemas/MoneySet'
          description: >
            The deduction from the original order price as a way to promote
            sales, special offers, or customer loyalty rewards. This price is
            discounted from the original price according to the customer's local
            currency.
        shipping_lines:
          $ref: '#/components/schemas/ShippingLines'
          description: The shipping lines for the order.
        order_discounts:
          $ref: '#/components/schemas/OrderDiscounts'
          description: The discounts for the order.
        total_taxes:
          $ref: '#/components/schemas/MoneySet'
          description: The tax amount for the order.
        total_taxes_presentment:
          $ref: '#/components/schemas/MoneySet'
          description: >-
            The tax amount for the order according to the customer's local
            currency.
        tags:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/TagRequestData'
        refunds:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/RefundData'
        line_items:
          type: array
          items:
            $ref: '#/components/schemas/LineItem'
        fulfillments:
          type: array
          items:
            $ref: '#/components/schemas/Fulfillment'
        created_at:
          oneOf:
            - $ref: '#/components/schemas/Date'
            - type: 'null'
        updated_at:
          oneOf:
            - $ref: '#/components/schemas/Date'
            - type: 'null'
        financial_status:
          type:
            - string
            - 'null'
          enum:
            - pending
            - authorized
            - partially_paid
            - paid
            - partially_refunded
            - refunded
            - voided
            - null
          description: The financial status of the order.
        cancel_reason:
          type:
            - string
            - 'null'
          enum:
            - customer
            - declined
            - fraud
            - inventory
            - other
            - staff
            - null
          description: The reason the order was cancelled, if applicable.
        processed_at:
          oneOf:
            - $ref: '#/components/schemas/Date'
            - type: 'null'
          description: The date and time when the order was processed in the source system.
        browser_ip:
          oneOf:
            - type: string
              format: ipv4
            - type: string
              format: ipv6
            - type: 'null'
          maxLength: 45
          description: The IP address of the browser used to place the order.
        client_details_user_agent:
          type:
            - string
            - 'null'
          maxLength: 1000
          description: The user agent string of the browser used to place the order.
        total_tip_received:
          anyOf:
            - $ref: '#/components/schemas/MoneySet'
            - type: 'null'
          description: The total tip amount received for the order.
        warnings:
          type:
            - array
            - 'null'
          description: >-
            Non-fatal warnings about the order, surfaced after a successful
            write.
          items:
            type: object
            required:
              - code
              - message
            properties:
              code:
                type: string
              message:
                type: string
    Address:
      type: object
      properties:
        name:
          type:
            - string
            - 'null'
          maxLength: 100
          description: Recipient name.
        company:
          type:
            - string
            - 'null'
          maxLength: 100
          description: Recipient company.
        address1:
          type: string
          maxLength: 125
          description: Address line 1.
        address2:
          type:
            - string
            - 'null'
          maxLength: 125
          description: Address line 2.
        city:
          type:
            - string
          maxLength: 100
          description: City.
        region:
          type:
            - string
            - 'null'
          maxLength: 100
          description: State or Region.
        postal_code:
          type:
            - string
            - 'null'
          maxLength: 16
          description: Postal Code.
        country_code:
          type: string
          maxLength: 2
          description: Must be a valid 2 character country code.
      required:
        - address1
        - city
        - country_code
      examples:
        - name: John Smith
          company: Acme, Co
          address1: 123 Example St
          address2: Box 123
          city: Columbus
          region: OH
          postal_code: 12345
          country_code: US
    MoneySet:
      type: object
      examples:
        - amount: 50000
          currency_code: USD
        - amount: 25000
        - amount: 1500
          currency_code: EUR
      properties:
        amount:
          type: integer
          format: int32
          examples:
            - 25000
        currency_code:
          type:
            - string
          default: USD
          examples:
            - EUR
      required:
        - amount
        - currency_code
    ShippingLines:
      title: ShippingLines
      type: array
      items:
        $ref: '#/components/schemas/ShippingLine'
    OrderDiscounts:
      title: OrderDiscounts
      type: array
      items:
        $ref: '#/components/schemas/OrderDiscount'
    TagRequestData:
      type: string
      description: A tag used to classify and group orders.
      examples:
        - VIP
    RefundData:
      title: RefundData
      type: array
      items:
        $ref: '#/components/schemas/RefundItems'
    LineItem:
      type: object
      properties:
        id:
          type: integer
          format: int64
          minimum: 1
          examples:
            - 810772123123125
          readOnly: true
        external_id:
          type:
            - string
            - 'null'
          maxLength: 64
          examples:
            - 564400c7-7a6b-4f29-b6a5-7bb580b2992c
        product:
          $ref: '#/components/schemas/Product'
        product_variant:
          anyOf:
            - $ref: '#/components/schemas/ProductVariant'
            - type: 'null'
        quantity:
          type:
            - integer
            - 'null'
        unit_price:
          $ref: '#/components/schemas/MoneySet'
          description: >
            The price of the order line item in minor units, such as cents, with
            its corresponding currency.
        unit_price_presentment:
          anyOf:
            - $ref: '#/components/schemas/MoneySet'
            - type: 'null'
          description: >
            The price of the order line item in minor units, such as cents. This
            is included if the price was shown to the customer in an alternate
            currency.
        unit_discounts:
          anyOf:
            - $ref: '#/components/schemas/MoneySet'
            - type: 'null'
          description: >
            The deduction from the original order line item price as a way to
            promote sales, special offers, or customer loyalty rewards.
        unit_discounts_presentment:
          anyOf:
            - $ref: '#/components/schemas/MoneySet'
            - type: 'null'
          description: >
            The deduction from the original order line item price as a way to
            promote sales, special offers, or customer loyalty rewards. This
            price is discounted from the original price according to the
            customer's local currency.
        taxable:
          type:
            - boolean
            - 'null'
        tax_lines:
          oneOf:
            - $ref: '#/components/schemas/TaxLines'
            - type: 'null'
        refunds:
          oneOf:
            - $ref: '#/components/schemas/RefundItems'
            - type: 'null'
        discounts:
          oneOf:
            - $ref: '#/components/schemas/OrderLineItemDiscounts'
            - type: 'null'
        duties:
          oneOf:
            - $ref: '#/components/schemas/Duties'
            - type: 'null'
      examples:
        - external_id: 564400c7-7a6b-4f29-b6a5-7bb580b2992c
          product:
            id: 1073741824
          product_variant:
            id: 1073741824
          quantity: 500
          unit_price:
            amount: 50000,
            currency_code: USD,
          unit_price_presentment:
            amount: 50000,
            currency_code: USD,
          unit_discounts:
            amount: 50000,
            currency_code: USD,
          unit_discounts_presentment:
            amount: 50000,
            currency_code: USD,
          taxable: true
          tax_lines:
            title: OH State Tax
            rate: 2.5
            price:
              amount: 50000
              currency_code: USD
          refunds:
            external_id: refund-external-id
            type: line_item
            amount: 1000
            currency_code: USD
            line_item:
              quantity: 1
              restock: true
            created_at: '2023-04-25T13:25:00-05:00'
            updated_at: '2023-04-25T13:25:00-05:00'
          discounts:
            external_id: refund-external-id
            name: Discount Name
            discount_type: amount
            code: AB123
            reason: This is a discount reason.
            rate: 1.4
            discount_relation: x
            tax_adjustment_money:
              amount: 50000
              currency_code: USD
            net_adjustment_money:
              amount: 50000
              currency_code: USD
          duties:
            hs_code: HS1234
            country_of_origin: USA
            price:
              amount: 50000
              currency_code: USD
            tax_lines:
              title: OH Municipal Tax
              rate: 1.8
              price:
                amount: 50000
                currency_code: USD
    Fulfillment:
      type: object
      required:
        - status
      properties:
        external_id:
          type:
            - string
            - 'null'
          maxLength: 64
          examples:
            - 564400c7-7a6b-4f29-b6a5-7bb580b2992c
        status:
          type: string
          enum:
            - success
            - failure
            - cancelled
            - pending
            - open
            - error
          description: >
            Status of the fulfillment:

            - `success` - The fulfillment was successful.

            - `failure` - The fulfillment request failed.

            - `cancelled` - The fulfillment was cancelled.

            - `pending` - Loop has created the fulfillment and is waiting for
            the fulfillment
              service to transition it to `open` or `success`.

            - `open` - The fulfillment has been acknowledged by the fulfillment
            service and is being processed.

            - `error` - There was an error with the fulfillment request.
        fulfilled_at:
          type:
            - string
            - 'null'
          format: date-time
          examples:
            - '2023-04-25T13:25:00-05:00'
          description: >-
            Set this field to indicate that the line item has been fulfilled, so
            it is returnable.
        shipping_carrier:
          type: string
        location:
          type:
            - object
            - 'null'
          properties:
            id:
              type: integer
              format: int64
              description: >
                Set to null to remove a location relationship or provide an
                existing location id. The id provided must belong to the
                authenticated users shop.
        fulfillment_line_items:
          $ref: '#/components/schemas/FulfillmentLineItems'
        tracking_numbers:
          type:
            - array
            - 'null'
          items:
            type: string
    Date:
      type: string
      format: date-time
      examples:
        - '2023-04-25T13:25:00-05:00'
    ShippingLine:
      title: ShippingLine
      type: object
      properties:
        title:
          type:
            - string
        price:
          $ref: '#/components/schemas/MoneySet'
        discounts:
          $ref: '#/components/schemas/ShippingLineDiscount'
        tax_lines:
          $ref: '#/components/schemas/TaxLines'
    OrderDiscount:
      title: OrderDiscount
      type: object
      properties:
        external_id:
          type:
            - string
            - 'null'
          maxLength: 100
          examples:
            - 564400c7-7a6b-4f29-b6a5-7bb580b2992c
        name:
          type:
            - string
          maxLength: 64
        discount_type:
          type: string
          description: Type of discount.
          enum:
            - amount
            - bonus
            - bonus_choice
            - fixed_price
            - free
            - percentage
            - percentage_off_options
            - price_book_price
            - total_fixed_price
        code:
          type:
            - string
          maxLength: 100
        reason:
          type:
            - string
          maxLength: 512
        rate:
          type:
            - number
        tax_adjustment_money:
          $ref: '#/components/schemas/MoneySet'
        net_adjustment_money:
          $ref: '#/components/schemas/MoneySet'
    RefundItems:
      title: RefundItems
      type: array
      items:
        type: object
        required:
          - type
          - amount
        properties:
          external_id:
            type:
              - string
              - 'null'
          type:
            type:
              - string
              - 'null'
            description: Type of refund.
            enum:
              - line_item
              - shipping
              - other
          amount:
            $ref: '#/components/schemas/MoneySet'
          line_item:
            anyOf:
              - $ref: '#/components/schemas/RefundLineItem'
              - type: 'null'
          created_at:
            oneOf:
              - $ref: '#/components/schemas/Date'
              - type: 'null'
          updated_at:
            oneOf:
              - $ref: '#/components/schemas/Date'
              - type: 'null'
    Product:
      type: object
      required:
        - id
      properties:
        id:
          type: integer
          format: int64
          description: The global identifier for an existing product.
    ProductVariant:
      type: object
      properties:
        id:
          type: integer
          format: int64
          description: The global identifier for an existing product.
    TaxLines:
      title: TaxLines
      type: array
      items:
        $ref: '#/components/schemas/TaxLine'
    OrderLineItemDiscounts:
      title: OrderLineItemDiscounts
      type: array
      items:
        $ref: '#/components/schemas/OrderLineItemDiscount'
    Duties:
      title: Duties
      type: array
      items:
        $ref: '#/components/schemas/Duty'
    FulfillmentLineItems:
      title: FulfillmentLineItems
      type: array
      items:
        $ref: '#/components/schemas/FulfillmentLineItem'
    ShippingLineDiscount:
      title: ShippingLineDiscount
      type: object
      properties:
        external_id:
          type:
            - string
            - 'null'
          maxLength: 64
          examples:
            - 564400c7-7a6b-4f29-b6a5-7bb580b2992c
        name:
          type:
            - string
        discount_type:
          type:
            - string
            - 'null'
          description: Type of discount.
          enum:
            - amount
            - bonus
            - bonus_choice
            - fixed_price
            - free
            - percentage
            - percentage_off_options
            - price_book_price
            - total_fixed_price
        code:
          type:
            - string
        reason:
          type:
            - string
        rate:
          type:
            - number
        net_adjustment_money:
          $ref: '#/components/schemas/MoneySet'
        tax_adjustment_money:
          $ref: '#/components/schemas/MoneySet'
    RefundLineItem:
      title: RefundLineItem
      type: object
      properties:
        id:
          type:
            - integer
            - 'null'
        quantity:
          type:
            - integer
            - 'null'
        restock:
          type:
            - boolean
            - 'null'
    TaxLine:
      title: TaxLine
      type: object
      properties:
        title:
          type:
            - string
          maxLength: 100
        rate:
          type:
            - number
            - 'null'
        price:
          $ref: '#/components/schemas/MoneySet'
    OrderLineItemDiscount:
      title: OrderLineItemDiscount
      type: object
      properties:
        external_id:
          type:
            - string
            - 'null'
          maxLength: 100
          examples:
            - 564400c7-7a6b-4f29-b6a5-7bb580b2992c
        discount_type:
          type: string
          description: Type of discount.
          enum:
            - amount
            - bonus
            - bonus_choice
            - fixed_price
            - free
            - percentage
            - percentage_off_options
            - price_book_price
            - total_fixed_price
        discount_relation:
          type:
            - string
            - 'null'
          description: Discount Relation.
          enum:
            - prereq
            - entitled
            - x
            - 'y'
        name:
          type:
            - string
          maxLength: 64
        code:
          type:
            - string
          maxLength: 100
        reason:
          type:
            - string
          maxLength: 512
        rate:
          type:
            - number
        tax_adjustment_money:
          $ref: '#/components/schemas/MoneySet'
        net_adjustment_money:
          $ref: '#/components/schemas/MoneySet'
    Duty:
      title: Duty
      type: object
      properties:
        hs_code:
          type:
            - string
            - 'null'
          maxLength: 10
        country_of_origin:
          type:
            - string
            - 'null'
          maxLength: 2
          examples:
            - US
            - CA
        price:
          $ref: '#/components/schemas/MoneySet'
        tax_lines:
          $ref: '#/components/schemas/TaxLines'
    FulfillmentLineItem:
      title: FulfillmentLineItem
      type: object
      properties:
        external_id:
          type:
            - string
            - 'null'
          maxLength: 64
          examples:
            - 564400c7-7a6b-4f29-b6a5-7bb580b2992c
        order_line_item_external_id:
          type: string
          maxLength: 64
          examples:
            - 564400c7-7a6b-4f29-b6a5-7bb580b2992c
        quantity:
          type: integer
  responses:
    Unauthorized:
      description: >-
        Example response if request submitted without a valid API Key in
        X-Authorization.
      content:
        application/json:
          schema:
            type: object
            required:
              - errors
            properties:
              errors:
                type: string
                examples:
                  - Unauthorized.
      headers:
        X-Loop-Request-ID:
          schema:
            type: string
            examples:
              - 5a748e7c-5fcc-4fb0-a777-6a4d28e60d4c
            format: uuid
          description: UUID to aid in debugging API issues.
    NotFound:
      description: The requested entity could not be found.
      content:
        application/json:
          schema:
            type: object
            required:
              - message
            properties:
              message:
                type: string
                examples:
                  - Resource not found.
      headers:
        X-Loop-Request-ID:
          schema:
            type: string
          description: UUID to aid in debugging API issues.
  securitySchemes:
    read:
      type: apiKey
      in: header
      name: X-Authorization
      description: 'API Scope: "Order (read)"'
      x-scope: Order (Read)

````