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

# Retrieve an order

> Retrieve information about a specific order



## OpenAPI

````yaml GET /api/v1/orders/{orderId}/detail
openapi: 3.0.1
info:
  title: Meadow Open API
  description: The API to connect to the Meadow platform
  version: 1.0.0
servers:
  - url: https://api-staging.getmeadow.com
  - url: https://api.getmeadow.com
security:
  - meadowConsumer: []
    meadowClient: []
paths:
  /api/v1/orders/{orderId}/detail:
    get:
      description: Retrieve information about a specific order
      parameters:
        - name: orderId
          in: path
          description: ID of order to retrieve
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Orders detail response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
              example:
                data:
                  id: '1471684654'
                  organizationId: 1
                  totalPrice: 4000
                  netPrice: 3140
                  createdAt: '2022-12-15T21:13:14.500Z'
                  packedAt: null
                  fulfilledAt: null
                  customerGrandTotal: 3140
                  type: in-store
                  source: web-admin
                  status: new
                  cancelationReason: null
                  cancelAdminId: null
                  canceledAt: null
                  taxExempt: true
                  refundTotal: 0
                  isMedical: false
                  customerName: null
                  deliveryFee: null
                  deliveryFeeDescription: null
                  apiConsumerName: null
                  lineItems:
                    - id: 1234
                      quantity: 1
                      productId: 398
                      productName: 50 Dose Pen
                      productUnit: item
                      productStrainType: mixed
                      optionId: 1112
                      optionName: Calm
                      optionAmount: 1
                      optionPrice: 4500
                      optionSalesPrice: null
                      productBrandId: 37
                      productBrand: Dosist
                      unitPrice: 4500
                      subtotalPrice: 4500
                      finalPrice: 4000
                      productMovingAverageCostPerUnit: null
                      optionMovingAverageCostPerUnit: 25
                      packageLineCost: null
                      primaryCategory:
                        id: 8
                        name: Flowers
                        cannabisType: non-concentrated
                      fulfillAs:
                        - pkg:
                            unit: Grams
                            label: 1A4FF0300000029000008338
                            costPerUnit: '0'
                          optionSum: -3
                          productOptionId: 1112
                          quantityFulfilled: '3'
                      discounts:
                        - discountId: 29
                          type: flat
                          amount: 500
                          amountUsed: 500
                          description: $ 5 Discount
                  payments:
                    - id: 1547
                      paymentTypeId: 1
                      amount: 3140
                      finalAmount: 3140
                      name: Cash
                      fee: 0
                      feePercent: '0'
                      feeAmount: 0
                      feeDescription: null
                  customer: {}
                  placedBy:
                    id: 1
                    email: rick@getmeadow.com
                    firstName: Rick
                    lastName: Harrison
                  fulfilledBy:
                    id: 2983
                    email: rick+1@getmeadow.com
                    firstName: Rick
                    lastName: Harrison
                  adjustments:
                    - amount: -327
                      description: City Tax Exemption
                      isTaxExemption: true
                      taxId: 134
                  credits:
                    - creditId: 361
                      type: store-credit
                      amountUsed: 133
                      description: Store credit
                  discounts:
                    - discountId: 7
                      type: percent
                      amount: 10
                      amountUsed: 400
                      description: Seniors
                  loyaltyRedemptions:
                    - type: cash-back
                      description: 2% Cash Back
                      pointsRequirement: '1'
                      pointsAmount: '-500.0'
                      discountAmount: '2'
                      amountUsed: 1000
                      productOptionId: null
                  taxes:
                    - taxId: 59
                      amount: 0
                      description: State Sales Tax
                      rate: '9.5'
                      amountBeforeExemption: 311
                      amountExempted: 311
                      included: false
                      exemptable: true
                      tier: '1'
                      type: standard
                      normalRate: '9.5'
                    - taxId: 134
                      amount: 0
                      description: City Tax (Included)
                      rate: '10'
                      amountBeforeExemption: 327
                      amountExempted: 327
                      included: true
                      exemptable: true
                      tier: '1'
                      type: standard
                      normalRate: '10'
                  returns:
                    - id: 364
                      refundType: payment-method
                      refundInitial: -4500
                      refundTotal: -4905
                      creditsTotal: 0
                      discountsTotal: 0
                      adjustmentAmount: 0
                      adjustmentDescription: ''
                      paymentTypeName: Cash
                      loyaltyTotal: 0
                      voidedAt: '2023-05-04T20:48:41.508Z'
                      voidedReason: void reason here
                      createdAt: '2023-05-04T20:34:48.387Z'
                      lineItems:
                        - orderLineItemId: 15368
                          type: return
                          inventoryAction: waste
                          quantity: 1
                          reason: Product was defective
                          fulfillAs: []
                      taxes:
                        - taxId: 59
                          amount: -225
                          description: State Sales Tax
                          refunded: true
                          rate: '5'
                          included: false
                          exemptable: false
                          type: standard
                          tier: '1'
                        - taxId: 134
                          amount: -180
                          description: City Tax (Included)
                          refunded: true
                          rate: '10'
                          included: false
                          exemptable: false
                          type: standard
                          tier: '1'
                      createdBy:
                        id: 1
                        email: rick@getmeadow.com
                        firstName: Rick
                        lastName: Harrison
                      voidedBy:
                        id: 1
                        email: rick@getmeadow.com
                        firstName: Rick
                        lastName: Harrison
                  address: null
                  shift:
                    name: POS Station 3
                  onfleetTask: null
        4XX:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
components:
  schemas:
    Order:
      type: object
      properties:
        id:
          type: string
          description: The ID of the order
        totalPrice:
          type: number
          description: >-
            The subtotal price before discounts, credits, adjustments are taken
            into account.
        netPrice:
          type: number
          description: >-
            The final price of the order before payment & delivery fees.
            Includes taxes
        customerGrandTotal:
          type: number
          description: The final price of the order after all fees
        createdAt:
          type: string
          description: The datetime the order was created
        packedAt:
          type: string
          description: The datetime the order was packed on
          nullable: true
        fulfilledAt:
          type: string
          description: The date the order was fulfilled
          nullable: true
        type:
          type: string
          description: The type of this order
          enum:
            - delivery
            - pickup
            - in-store
        status:
          type: string
          description: >-
            The status of the order.


            - `draft` is an order submitted without inventory taken out

            - `new` is an order that has had inventory associated with it

            - `packed` signifies an order has been processed and is waiting for
            pickup/delivery

            - `fulfilled` is an order that has been fully completed

            - `canceled` is an order that has been canceled
          enum:
            - draft
            - new
            - packed
            - fulfilled
            - canceled
        cancelationReason:
          type: string
          description: A description of why the order was canceled
          nullable: true
        canceledAt:
          type: string
          description: When the order was canceled
          nullable: true
        taxExempt:
          type: boolean
          description: Whether this order was marked as tax exempt or not
        refundTotal:
          type: number
          description: The amount refunded by returns on this order
        isMedical:
          type: boolean
          description: Whether this order was for a medical customer or not
        customerName:
          type: string
          description: The name of the customer for express pickup or kiosk orders.
          nullable: true
        deliveryFee:
          type: number
          description: The delivery fee for the order
        deliveryFeeDescription:
          type: string
          description: A description of the delivery fee that can be shown to the customer
          nullable: true
        apiConsumerName:
          type: string
          description: The name of the integrator that created this order or `null`
          nullable: true
        lineItems:
          type: array
          description: All of the products purchased with this order
          items:
            type: object
            properties:
              id:
                type: number
                description: The ID of this line item
              quantity:
                type: number
                description: The quantity of this line item
              productId:
                type: number
                description: The id of the product purchased
              productName:
                type: string
                description: The name of the product purchased
              optionId:
                type: number
                description: The id of the product option purchased
              optionName:
                type: string
                description: The name of the product option
                nullable: true
              optionPrice:
                type: number
                description: The price of the product option at time of purchase
              optionSalesPrice:
                type: number
                description: >-
                  The sales price of the product option at time of purchase if
                  it was on sale
                nullable: true
              productBrandId:
                type: number
                description: The brand id of the product
                nullable: true
              productBrand:
                type: string
                description: The name of the brand of the product
                nullable: true
              unitPrice:
                type: number
                description: The price per unit of this line item
              subtotalPrice:
                type: number
                description: The subtotal of this line item before discounts
              finalPrice:
                type: number
                description: The final price for this line item after all discounts
              productMovingAverageCostPerUnit:
                type: number
                description: The moving average cost per unit of the product
                nullable: true
              optionMovingAverageCostPerUnit:
                type: string
                description: The moving average cost per unit of the product option
                nullable: true
              packageLineCost:
                type: string
                description: >-
                  The total cost for all metrc packages used to fulfill this
                  line item
                nullable: true
              primaryCategory:
                type: object
                description: The primary category for the product of this line item
                properties:
                  id:
                    type: number
                    description: The ID of this product category
                  name:
                    type: string
                    description: The name of the primary category
              discounts:
                type: array
                description: An array of discounts applied to this line item (may be empty)
                items:
                  type: object
                  properties:
                    discountId:
                      type: number
                      description: >-
                        The ID for this discount. This value will be null for a
                        custom discount added by a budtender
                      nullable: true
                    type:
                      type: string
                      description: >-
                        Either `flat` for a dollar amount or `percent` for a
                        percent amount off
                    amount:
                      type: number
                      description: >-
                        The amount of the discount before being applied. Either
                        in cents or a percent depending on the type.
                    amountUsed:
                      type: number
                      description: >-
                        The amount that was taken off of the line item by this
                        discount, represented in cents
                    description:
                      type: string
                      description: >-
                        The description of the discount, which may be shown to
                        the customer
              fulfillAs:
                type: array
                description: >-
                  An array of objects showing what packages or product options
                  fulfilled this order. Could also be `null` if the line item
                  does not have any packages or substitutions associated with
                  it.
                items:
                  type: object
                  properties:
                    pkg:
                      type: object
                      description: >-
                        An object about the compliance package for this
                        fulfillment. Please handle both `null` and an empty
                        object `{}` for times when there is not a package
                      properties:
                        unit:
                          type: string
                          description: The metrc unit of this package
                        label:
                          type: string
                          description: The metrc package tag
                        costPerUnit:
                          type: string
                          description: The cost per unit of this package
                      nullable: true
                    optionSum:
                      type: number
                      description: >-
                        A negative number showing how much quantity of the
                        underlying product option was used for this fulfillment.
                        For `option` tracking this will be an integer, but for
                        `product` tracking it could be a decimal.
                    productOptionId:
                      type: number
                      description: >-
                        The ID of the product option used for this fulfillment.
                        For most cases, it will be the same as
                        `lineItems[].optionId`, but in cases where another
                        option is substituted to fulfill another (Example: 2
                        eighths fulfilling a quarter option), this
                        `productOptionId` could be different.
                    quantityFulfilled:
                      type: string
                      description: >-
                        The quantity of the underlying `lineItem` that this
                        fulfillment is responsible for
        payments:
          type: array
          description: All of the payments applied to this order
          items:
            type: object
            properties:
              id:
                type: number
                description: The ID of this payment
              paymentTypeId:
                type: number
                description: The ID of the payment type used for this payment
              amount:
                type: number
                description: The amount of the payment before fees in cents
              finalAmount:
                type: number
                description: The final amount of the payment after fees are included
              name:
                type: string
                description: The name of the payment type being used to make this payment
              fee:
                type: number
                description: The amount of a flat fee in cents added to this payment
              feePercent:
                type: string
                description: The % fee that this payment type has for all payments
              feeAmount:
                type: number
                description: >-
                  The fee in cents the customer is paying. This is the flat
                  `fee` + the `feePercent` multiplied by the payment amount.
              feeDescription:
                type: string
                description: The description of the fee that was shown to the customer.
                nullable: true
        customer:
          type: object
          description: >-
            The customer attached to this order. Will be an empty object `{}` if
            there is no customer associated with this order (i.e. it is an
            anonymous order)
          properties:
            id:
              type: number
              description: The ID of the customer
            firstName:
              type: string
              description: The first name of the customer
            lastName:
              type: string
              description: The last name of the customer
            email:
              type: string
              description: The email of the customer
              nullable: true
            phone:
              type: string
              description: The phone of the customer
              nullable: true
            birthday:
              type: string
              description: The birthday of the customer
              nullable: true
            hashId:
              type: string
              description: >-
                An ID used to display to the customer and dispensary instead of
                the `id` number
            sex:
              type: string
              description: One of `male`, `female`, `tertiary`
            zip:
              type: string
              description: The postal code for the customer
              nullable: true
            licenseExpiry:
              type: string
              description: >-
                The expiration date of this customer’s drivers license or `null`
                if it is not recorded.
              nullable: true
            medicalExpiration:
              type: string
              description: >-
                The expiration date of this customer’s medical recommendation or
                `null` if they are an adult use customer
              nullable: true
        placedBy:
          type: object
          description: >-
            The employee that created this order. Will be an empty object `{}`
            if this order was created by a customer and not an employee.
          properties:
            id:
              type: number
              description: The ID of the employee who created this order
            email:
              type: string
              description: The email of the employee
            firstName:
              type: string
              description: The first name of the employee
            lastName:
              type: string
              description: The last name of the employee
        fulfilledBy:
          type: object
          description: >-
            The employee that fulfilled this order. Will be an empty object `{}`
            if there is no employee that fulfilled it.
          properties:
            id:
              type: number
              description: The ID of the employee who fulfilled this order
            email:
              type: string
              description: The email of the employee
            firstName:
              type: string
              description: The first name of the employee
            lastName:
              type: string
              description: The last name of the employee
        adjustments:
          type: array
          description: >-
            Adjustments either made automatically such as even dollar rounding
            or custom adjustments by an employee
          items:
            type: object
            properties:
              amount:
                type: number
                description: >-
                  The amount of the adjustment in cents. May be either negative
                  or positive.
              description:
                type: string
                description: A description for the adjustment
              isTaxExemption:
                type: boolean
                description: >-
                  Set to `true` if this adjustment was automatically added to
                  offset taxes that were included in the price of a product when
                  a customer is tax exempt
              taxid:
                type: number
                description: The ID of the tax exempted or `null`
        credits:
          type: array
          description: Credits used on this order
          items:
            type: object
            properties:
              creditId:
                type: number
                description: The ID for the credit applied
              type:
                type: string
                description: Either `promo-code` or `store-credit`
              amountUsed:
                type: number
                description: The credit amount applied to the order in cents
              description:
                type: string
                description: A description of the credit
        discounts:
          type: array
          description: The discounts applied to this order
          items:
            type: object
            properties:
              discountId:
                type: number
                description: >-
                  The ID for this discount. This value will be null for a custom
                  discount added by a budtender.
              type:
                type: string
                description: >-
                  Either `flat` for a dollar amount or `percent` for a percent
                  amount off
              amount:
                type: number
                description: >-
                  The amount of the discount before being applied. Either in
                  cents or a percent depending on the type.
              amountUsed:
                type: number
                description: >-
                  The amount of the discount that was applied to the order
                  represented in cents.
              description:
                type: string
                description: >-
                  The description of the discount, which may be shown to the
                  customer
        loyaltyRedemptions:
          type: array
          description: The loyalty redemptions used on this order
          items:
            type: object
            properties:
              type:
                type: string
                description: One of `cash-back`, `flat`, `percent`, or `free-product`
              description:
                type: string
                description: A description of the reward that was redeemed
              pointsRequirement:
                type: string
                description: >-
                  The minimum number of loyalty points required to redeem this
                  reward
              pointsAmount:
                type: string
                description: The amount of points used in this redemption
              discountAmount:
                type: string
                description: >-
                  The discount amount of the reward. For `cash-back` this is the
                  amount in cents per point used. For `flat` it is a flat amount
                  in cents, `percent` would be a percent off
              amountUsed:
                type: number
                description: The amount of the discount applied to the order in cents
              productOptionId:
                type: number
                description: The product option id for a `free-product` redemption
                nullable: true
        taxes:
          type: array
          description: The taxes applied to this order
          items:
            type: object
            properties:
              taxId:
                type: number
                description: The ID for this tax
              amount:
                type: number
                description: The amount applied to the order in cents
              description:
                type: string
                description: A description of the tax
              rate:
                type: string
                description: A numeric value for the percentage of a tax
              amountBeforeExemption:
                type: number
                description: >-
                  The amount of the tax as calculated before determining what
                  was exempted in cents
              amountExempted:
                type: number
                description: The amount of the tax reduction due to an exemption in cents
              included:
                type: boolean
                description: >-
                  Whether the amount of this tax was already included in the
                  product of the line items
              exemptable:
                type: boolean
                description: Whether this tax is able to be exempted
              tier:
                type: string
                description: >-
                  The order of tax compounding. Will be a value between 1 and 5
                  indicating the order the tax was applied. Each tier may have
                  multiple taxes in it.
              type:
                type: string
                description: Either `standard` or `california-excise`
              normalRate:
                type: string
                description: The rate of this tax before it was overriden by an employee
        returns:
          type: array
          description: The returns applied to this order
          items:
            $ref: '#/components/schemas/OrderReturn'
        address:
          type: object
          description: The address if this order is a delivery order. Otherwise, `null`
          nullable: true
          properties:
            street1:
              type: string
              description: ''
            street2:
              type: string
              description: ''
              nullable: true
            city:
              type: string
              description: ''
            state:
              type: string
              description: ''
            postalCode:
              type: string
              description: ''
        shift:
          type: object
          description: The shift this order is attached to. Otherwise `null`
          nullable: true
          properties:
            name:
              type: string
              description: >-
                The name of the shift. This will most commonly be attributed to
                the name of the iPad station.
              nullable: true
        onfleetTask:
          type: object
          description: The Onfleet task information for this order if it has one or `null`.
          nullable: true
          properties:
            taskId:
              type: string
              description: >-
                The full ID of the Onfleet task. See Onfleet's documentation for
                more information.
            shortId:
              type: string
              description: >-
                The short ID of the Onfleet task. See Onfleet's documentation
                for more information.
    APIError:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: A description of the error code
            code:
              type: string
              example: CODE_OF_ERROR_WILL_BE_HERE
    OrderReturn:
      type: object
      properties:
        id:
          type: number
          description: The ID of this return
        refundType:
          type: string
          description: One of `payment-method`, `store-credit` or `none`
        refundInitial:
          type: number
          description: >-
            The initial refund before taxes, credits, adjustments, loyalty, and
            discounts
        refundTotal:
          type: number
          description: The final refund total of the return
        creditsTotal:
          type: number
          description: The amount of credits refunded from the order
        discountsTotal:
          type: number
          description: The amount of discounts refunded from the order
        adjustmentAmount:
          type: number
          description: A manual adjustment of the refund for this return
        adjustmentDescription:
          type: string
          description: A description for the adjustment if there is one
          nullable: true
        paymentTypeName:
          type: string
          description: The name of the payment type this refund was processed as
        loyaltyTotal:
          type: number
          description: The amount of a loyalty redemption returned
        voidedAt:
          type: string
          description: >-
            The date that this return was voided or `null`. If there is a value
            here, it means the return was canceled and is no longer applicable
          nullable: true
        voidedReason:
          type: string
          description: The reason this return was voided
          nullable: true
        createdAt:
          type: string
          description: The date this return was created
        lineItems:
          type: array
          description: An array of line items for this return
          items:
            type: object
            properties:
              orderLineItemId:
                type: number
                description: The ID of the `lineItems[].id` that is being returned
              type:
                type: string
                description: Either `return` or `exchange`
              inventoryAction:
                type: string
                description: One of `waste`, `inventory` , or `vendor`.
              quantity:
                type: number
                description: The quantity of the order line item being returned
              reason:
                type: string
                description: A reason this line item is being returned
              fulfillAs:
                type: array
                description: >-
                  Fulfillment information for the packages on this return. See
                  `lineItems[].fulfillAs` for possible properties
                items:
                  type: object
        taxes:
          type: array
          description: An array of tax information about this return
          items:
            type: object
            properties:
              amount:
                type: number
                description: The amount of tax proportionally applied to this return
              description:
                type: string
                description: A description of the tax
              refunded:
                type: boolean
                description: >-
                  A boolean of whether this tax was refunded to the customer or
                  not
              rate:
                type: number
                description: The tax rate
              included:
                type: boolean
                description: Whether this tax was included in the price of the products
              exemptable:
                type: boolean
                description: Whether this tax was exemptable or not
        createdBy:
          type: object
          description: The employee that created this return
          properties:
            id:
              type: number
              description: The id of the employee who created this return
            email:
              type: string
              description: The email of the employee
            firstName:
              type: string
              description: The first name of the employee
            lastName:
              type: string
              description: The last name of the employee
        voidedBy:
          type: object
          description: The employee that voided this return (or `{}` if it is not voided)
          properties:
            id:
              type: number
              description: The id of the employee who voided this return
            email:
              type: string
              description: The email of the employee
            firstName:
              type: string
              description: The first name of the employee
            lastName:
              type: string
              description: The last name of the employee
  securitySchemes:
    meadowConsumer:
      type: apiKey
      name: X-Consumer-Key
      description: The key assigned to your company and provided via Meadow
      in: header
    meadowClient:
      type: apiKey
      name: X-Client-Key
      description: The key generated and provided by our mutual client
      in: header

````