Skip to main content
PATCH
/
api
/
v3
/
store
/
orders
/
{id}
Spree SDK
import { createSpreeClient } from '@spree/sdk'

const client = createSpreeClient({
  baseUrl: 'https://your-store.com',
  publishableKey: '<api-key>',
})

const order = await client.store.orders.update('or_abc123', {
  email: 'customer@example.com',
  special_instructions: 'Leave at door',
  bill_address: {
    firstname: 'John',
    lastname: 'Doe',
    address1: '123 Main St',
    city: 'New York',
    zipcode: '10001',
    country_iso: 'US',
    state_abbr: 'NY',
  },
}, {
  bearerToken: '<token>',
})
{
  "id": "or_UkLWZg9DAJ",
  "number": "R983107413",
  "state": "cart",
  "checkout_steps": [
    "address",
    "delivery",
    "payment",
    "complete"
  ],
  "token": "tbGu2hNzUX8CjC2uQ7bJM1j4L3aXRgc3wtC",
  "email": "noella@bruen.info",
  "special_instructions": null,
  "currency": "USD",
  "locale": "en",
  "item_count": 1,
  "state_lock_version": 1,
  "shipment_state": null,
  "payment_state": null,
  "item_total": "10.0",
  "display_item_total": "$10.00",
  "ship_total": "100.0",
  "display_ship_total": "$100.00",
  "adjustment_total": "0.0",
  "display_adjustment_total": "$0.00",
  "promo_total": "0.0",
  "display_promo_total": "$0.00",
  "tax_total": "0.0",
  "display_tax_total": "$0.00",
  "included_tax_total": "0.0",
  "display_included_tax_total": "$0.00",
  "additional_tax_total": "0.0",
  "display_additional_tax_total": "$0.00",
  "total": "110.0",
  "display_total": "$110.00",
  "completed_at": null,
  "created_at": "2026-03-05T20:52:19.745Z",
  "updated_at": "2026-03-05T20:52:19.830Z",
  "order_promotions": [],
  "line_items": [
    {
      "id": "li_UkLWZg9DAJ",
      "variant_id": "variant_UkLWZg9DAJ",
      "quantity": 1,
      "currency": "USD",
      "name": "Product 374845",
      "slug": "product-374845",
      "options_text": "",
      "price": "10.0",
      "display_price": "$10.00",
      "total": "10.0",
      "display_total": "$10.00",
      "adjustment_total": "0.0",
      "display_adjustment_total": "$0.00",
      "additional_tax_total": "0.0",
      "display_additional_tax_total": "$0.00",
      "included_tax_total": "0.0",
      "display_included_tax_total": "$0.00",
      "promo_total": "0.0",
      "display_promo_total": "$0.00",
      "pre_tax_amount": "10.0",
      "display_pre_tax_amount": "$10.00",
      "discounted_amount": "10.0",
      "display_discounted_amount": "$10.00",
      "display_compare_at_amount": "$0.00",
      "created_at": "2026-03-05T20:52:19.787Z",
      "updated_at": "2026-03-05T20:52:19.787Z",
      "compare_at_amount": null,
      "thumbnail_url": null,
      "option_values": [],
      "digital_links": []
    }
  ],
  "shipments": [
    {
      "id": "ship_UkLWZg9DAJ",
      "number": "H03158757154",
      "state": "pending",
      "tracking": "U10000",
      "tracking_url": null,
      "cost": "100.0",
      "display_cost": "$100.00",
      "shipped_at": null,
      "created_at": "2026-03-05T20:52:19.793Z",
      "updated_at": "2026-03-05T20:52:19.808Z",
      "shipping_method": {
        "id": "shpm_UkLWZg9DAJ",
        "name": "UPS Ground",
        "code": "UPS_GROUND"
      },
      "stock_location": {
        "id": "sloc_UkLWZg9DAJ",
        "state_abbr": "STATE_ABBR_178",
        "name": "Elvera Douglas",
        "address1": "1600 Pennsylvania Ave NW",
        "city": "Washington",
        "zipcode": "20500",
        "country_iso": "US",
        "country_name": "United States of America",
        "state_text": "STATE_ABBR_178"
      },
      "shipping_rates": [
        {
          "id": "shpr_UkLWZg9DAJ",
          "shipping_method_id": "shpm_UkLWZg9DAJ",
          "name": "UPS Ground",
          "selected": true,
          "cost": "100.0",
          "display_cost": "$100.00",
          "shipping_method": {
            "id": "shpm_UkLWZg9DAJ",
            "name": "UPS Ground",
            "code": "UPS_GROUND"
          }
        }
      ]
    }
  ],
  "payments": [],
  "bill_address": {
    "id": "addr_EfhxLZ9ck8",
    "firstname": "John",
    "lastname": "Doe",
    "full_name": "John Doe",
    "address1": "180 Lovely Street",
    "address2": "Northwest",
    "city": "Herndon",
    "zipcode": "35005",
    "phone": "555-555-0199",
    "company": "Company",
    "country_name": "United States of America",
    "country_iso": "US",
    "state_text": "STATE_ABBR_180",
    "state_abbr": "STATE_ABBR_180",
    "quick_checkout": false,
    "state_name": "STATE_NAME_180"
  },
  "ship_address": {
    "id": "addr_VqXmZF31wY",
    "firstname": "John",
    "lastname": "Doe",
    "full_name": "John Doe",
    "address1": "181 Lovely Street",
    "address2": "Northwest",
    "city": "Herndon",
    "zipcode": "35005",
    "phone": "555-555-0199",
    "company": "Company",
    "country_name": "United States of America",
    "country_iso": "US",
    "state_text": "STATE_ABBR_181",
    "state_abbr": "STATE_ABBR_181",
    "quick_checkout": false,
    "state_name": "STATE_NAME_181"
  },
  "payment_methods": []
}

Authorizations

x-spree-api-key
string
header
required

Publishable API key for store access

Authorization
string
header
required

JWT token for authenticated customers

Headers

x-spree-api-key
string
required
Authorization
string
x-spree-order-token
string
Idempotency-Key
string

Unique key for request idempotency. Duplicate requests with the same key return the cached response.

Path Parameters

id
string
required

Body

application/json
email
string<email>
Example:

"customer@example.com"

locale
string
Example:

"en"

special_instructions
string
Example:

"Leave at door"

metadata
object

Arbitrary key-value metadata (merged with existing)

Example:
{ "source": "mobile_app" }
bill_address
object
ship_address
object

Response

order updated with metadata

id
string
required
number
string
required
state
string
required
checkout_steps
string[]
required
token
string
required
email
string | null
required
special_instructions
string | null
required
currency
string
required
locale
string | null
required
item_count
number
required
state_lock_version
number
required
shipment_state
string | null
required
payment_state
string | null
required
item_total
string
required
display_item_total
string
required
ship_total
string
required
display_ship_total
string
required
adjustment_total
string
required
display_adjustment_total
string
required
promo_total
string
required
display_promo_total
string
required
tax_total
string
required
display_tax_total
string
required
included_tax_total
string
required
display_included_tax_total
string
required
additional_tax_total
string
required
display_additional_tax_total
string
required
total
string
required
display_total
string
required
completed_at
string | null
required
created_at
string
required
updated_at
string
required
order_promotions
object[]
required
line_items
object[]
required
shipments
object[]
required
payments
object[]
required
bill_address
object
required
ship_address
object
required
payment_methods
object[]
required