DashForDevsDocs
DocsNewsAPI v1
dashfordevs.comSign in

© 2026 DashForDevs

DocsNewsdashfordevs.comLegalStatus
DocsCustomersCustomer Orders
Introduction
Getting Started
Authentication
Products
Categories
Cart
Checkout
Blog
Reviews
Webhooks
Customers
Get CustomerUpdate CustomerCustom FieldsTags & SegmentsCustomer PointsCustomer AddressesCustomer Orders
Orders
Inventory
Shipping
Discounts
Affiliates
Email
Media & Files
Analytics & Tracking
Locations
Tax
Global Data
SEO
Error Handling
Geography
Finance
Automations
Page Types
Surveys
Billing & Subscriptions
Storefront Payments
SDK Reference
REST API
Storefront Architecture
Notifications
Security
Team & Permissions
Migrations & Import
Calendar & Appointments
Contact Forms
AI Bots
Dashboard API
Deployment
Changelog
Troubleshooting
Recipes
CLI & Deployment
Image Pipeline
White-label Platforms
Records Engine
Platform Modules
Platform Security
Site Keys & Client Sites
Use Cases
Operations

Customer Orders

Retrieve order history for a customer.

Updated March 29, 2026

On this page
  • Overview
  • List Orders
  • Get Single Order
  • Order History Page
  • REST API
  • Next Steps

Overview

Retrieve the authenticated customer's order history and individual order details.

List Orders

typescript
import dash from "@/lib/dash"

const { orders, pagination } = await dash.auth.getOrders({
  limit: 10,
  offset: 0,
})

orders.forEach(order => {
  console.log(order.order_number, order.status, order.total, order.created_at)
})

Get Single Order

typescript
const { order } = await dash.auth.getOrder("ord_abc123")

// order = {
//   id: "ord_abc123",
//   order_number: "ORD-1042",
//   status: "shipped",
//   subtotal: "59.98",
//   shipping: "12.50",
//   tax: "5.25",
//   total: "77.73",
//   items: [...],
//   shipping_address: {...},
//   tracking_number: "1Z999...",
//   created_at: "2025-01-15T10:30:00Z"
// }

Order History Page

typescript
// app/account/orders/page.tsx
import dash from "@/lib/dash"

export default async function OrderHistory() {
  const { orders } = await dash.auth.getOrders({ limit: 20 })

  return (
    <div>
      <h1>Order History</h1>
      {orders.length === 0 ? (
        <p>No orders yet. <a href="/products">Start shopping</a></p>
      ) : (
        orders.map(order => (
          <a key={order.id} href={`/account/orders/${order.id}`}
             className="block border rounded p-4 mb-3">
            <div className="flex justify-between">
              <span className="font-semibold">{order.order_number}</span>
              <span>${order.total}</span>
            </div>
            <div className="flex justify-between text-sm text-gray-400">
              <span>{order.status}</span>
              <span>{new Date(order.created_at).toLocaleDateString()}</span>
            </div>
          </a>
        ))
      )}
    </div>
  )
}

REST API

shell
# List orders
GET /storefront/auth/orders?limit=10&offset=0
Authorization: Bearer {access_token}

# Get single order
GET /storefront/auth/orders/ord_abc123
Authorization: Bearer {access_token}

Next Steps

  • Order Statuses — Understanding the order lifecycle
  • Tracking — Shipment tracking
  • Recipe: Customer Account Page — Full account page walkthrough
PreviousCustomer AddressesNextList Orders

On this page

  • Overview
  • List Orders
  • Get Single Order
  • Order History Page
  • REST API
  • Next Steps