Spree Admin SDK
import { createAdminClient } from '@spree/admin-sdk'
const client = createAdminClient({
baseUrl: 'https://your-store.com',
secretKey: 'sk_xxx',
})
const order = await client.orders.update('or_UkLWZg9DAJ', {
email: 'updated@example.com',
internal_note: '<p>VIP — gift wrap on next order</p>',
})spree api patch /orders/{id} -d '{"email":"updated@example.com","internal_note":"<p>VIP — gift wrap on next order</p>"}'{
"id": "or_UkLWZg9DAJ",
"market_id": "mkt_UkLWZg9DAJ",
"withdrawal_period_ends_at": null,
"within_withdrawal_period": false,
"cart_id": null,
"channel_id": "ch_UkLWZg9DAJ",
"company_id": null,
"company_name": null,
"po_document_filename": null,
"po_document_byte_size": null,
"number": "R1001",
"email": "updated@example.com",
"customer_note": null,
"po_number": null,
"currency": "USD",
"locale": "en",
"total_quantity": 0,
"coupon_code": null,
"fulfillment_status": null,
"payment_status": null,
"completed_at": null,
"item_total": "0.0",
"display_item_total": "$0.00",
"adjustment_total": "0.0",
"display_adjustment_total": "$0.00",
"discount_total": "0.0",
"display_discount_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": "0.0",
"display_total": "$0.00",
"gift_card_total": "0.0",
"display_gift_card_total": "$0.00",
"amount_due": "0.0",
"display_amount_due": "$0.00",
"delivery_total": "0.0",
"display_delivery_total": "$0.00",
"fee_total": "0.0",
"display_fee_total": "$0.00",
"store_credit_total": "0.0",
"display_store_credit_total": "$0.00",
"covered_by_store_credit": false,
"gift_card": null,
"market": {
"id": "mkt_UkLWZg9DAJ",
"name": "United States",
"currency": "USD",
"default_locale": "en",
"tax_inclusive": false,
"default": true,
"country_codes": [
"US"
],
"supported_locales": [
"en"
],
"tax_provider": null,
"created_at": "2026-01-15T12:00:00.000Z",
"updated_at": "2026-01-15T12:00:00.000Z"
},
"external_references": {},
"status": "draft",
"last_ip_address": null,
"considered_risky": false,
"confirmation_delivered": false,
"store_owner_notification_delivered": null,
"payment_total": "0.0",
"display_payment_total": "$0.00",
"metadata": {},
"cancel_note": null,
"commission_amount_total": "0.0",
"display_commission_amount_total": "$0.00",
"commission_tax_total": "0.0",
"display_commission_tax_total": "$0.00",
"commission_total": "0.0",
"display_commission_total": "$0.00",
"canceled_at": null,
"approved_at": null,
"created_at": "2026-01-15T12:00:00.000Z",
"updated_at": "2026-01-15T12:00:00.000Z",
"preferred_stock_location_id": null,
"po_document_url": null,
"seller_id": null,
"order_group_id": null,
"tags": [],
"internal_note": null,
"internal_note_html": null,
"approver_id": null,
"approver_type": null,
"canceler_id": null,
"canceler_type": null,
"created_by_id": null,
"created_by_type": null,
"cancel_reason_id": null,
"cancel_reason_name": null,
"customer_id": "cust_UkLWZg9DAJ",
"freight_summary": null
}Updates an order. Supports updating email, addresses, special instructions, and line items.
Required scope: write_orders (for API-key authentication).
PATCH
/
api
/
v3
/
admin
/
orders
/
{id}
Spree Admin SDK
import { createAdminClient } from '@spree/admin-sdk'
const client = createAdminClient({
baseUrl: 'https://your-store.com',
secretKey: 'sk_xxx',
})
const order = await client.orders.update('or_UkLWZg9DAJ', {
email: 'updated@example.com',
internal_note: '<p>VIP — gift wrap on next order</p>',
})spree api patch /orders/{id} -d '{"email":"updated@example.com","internal_note":"<p>VIP — gift wrap on next order</p>"}'{
"id": "or_UkLWZg9DAJ",
"market_id": "mkt_UkLWZg9DAJ",
"withdrawal_period_ends_at": null,
"within_withdrawal_period": false,
"cart_id": null,
"channel_id": "ch_UkLWZg9DAJ",
"company_id": null,
"company_name": null,
"po_document_filename": null,
"po_document_byte_size": null,
"number": "R1001",
"email": "updated@example.com",
"customer_note": null,
"po_number": null,
"currency": "USD",
"locale": "en",
"total_quantity": 0,
"coupon_code": null,
"fulfillment_status": null,
"payment_status": null,
"completed_at": null,
"item_total": "0.0",
"display_item_total": "$0.00",
"adjustment_total": "0.0",
"display_adjustment_total": "$0.00",
"discount_total": "0.0",
"display_discount_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": "0.0",
"display_total": "$0.00",
"gift_card_total": "0.0",
"display_gift_card_total": "$0.00",
"amount_due": "0.0",
"display_amount_due": "$0.00",
"delivery_total": "0.0",
"display_delivery_total": "$0.00",
"fee_total": "0.0",
"display_fee_total": "$0.00",
"store_credit_total": "0.0",
"display_store_credit_total": "$0.00",
"covered_by_store_credit": false,
"gift_card": null,
"market": {
"id": "mkt_UkLWZg9DAJ",
"name": "United States",
"currency": "USD",
"default_locale": "en",
"tax_inclusive": false,
"default": true,
"country_codes": [
"US"
],
"supported_locales": [
"en"
],
"tax_provider": null,
"created_at": "2026-01-15T12:00:00.000Z",
"updated_at": "2026-01-15T12:00:00.000Z"
},
"external_references": {},
"status": "draft",
"last_ip_address": null,
"considered_risky": false,
"confirmation_delivered": false,
"store_owner_notification_delivered": null,
"payment_total": "0.0",
"display_payment_total": "$0.00",
"metadata": {},
"cancel_note": null,
"commission_amount_total": "0.0",
"display_commission_amount_total": "$0.00",
"commission_tax_total": "0.0",
"display_commission_tax_total": "$0.00",
"commission_total": "0.0",
"display_commission_total": "$0.00",
"canceled_at": null,
"approved_at": null,
"created_at": "2026-01-15T12:00:00.000Z",
"updated_at": "2026-01-15T12:00:00.000Z",
"preferred_stock_location_id": null,
"po_document_url": null,
"seller_id": null,
"order_group_id": null,
"tags": [],
"internal_note": null,
"internal_note_html": null,
"approver_id": null,
"approver_type": null,
"canceler_id": null,
"canceler_type": null,
"created_by_id": null,
"created_by_type": null,
"cancel_reason_id": null,
"cancel_reason_name": null,
"customer_id": "cust_UkLWZg9DAJ",
"freight_summary": null
}Authorizations
Secret API key for admin access
JWT token for admin user authentication
Headers
Bearer token for admin authentication
Path Parameters
Order ID
Body
application/json
Channel ID
Stock Location ID to prefer for fulfillment. Re-runs Order Routing's PreferredLocation rule on subsequent shipment rebuilds.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
200 - application/json
order updated
Was this page helpful?
⌘I

