Order

An order is a customer's request to purchase one or more products from a shop. You can create, retrieve, update, and delete orders using the Order resource.

  • When you create an order through the API, no payment information is collected, and no transaction is performed.
  • After an order is created, you can change only a few of its attributes using the API. You can't change the items or the quantities in an order using the REST API, but you can change them using the GraphQL Admin API.
  • You can add metafields to the Order resource.
  • You can allow merchants to create orders manually by using the DraftOrder resource.

The Order resource

Properties

app_idintegerread-only

The ID of the app that created the order.


billing_addressCustomerAddress

The mailing address associated with the payment method. This address is an optional field that won't be available on orders that do not require a payment method. It has the following properties:

billing_address properties
  • address1: The street address of the billing address.
  • address2: An optional additional field for the street address of the billing address.
  • city: The city, town, or village of the billing address.
  • company: The company of the person associated with the billing address.
  • country: The name of the country of the billing address.

browser_ipstringIPread-only

The IP address of the browser used by the customer when they placed the order. Both IPv4 and IPv6 are supported.


buyer_accepts_marketingboolean

Whether the customer agreed to receive email updates from the shop.


cancel_reasonstring

The reason why the order was canceled. Valid values:

cancel_reason properties
  • customer: The customer canceled the order.
  • fraud: The order was fraudulent.
  • inventory: Items in the order were not in inventory.
  • declined: The payment was declined.
  • other: A reason not in this list.

cancelled_atstringISO 8601read-only

The date and time when the order was canceled. Returns null if the order isn't canceled.


3 hidden fields
created_atstringISO 8601read-only

The autogenerated date and time (ISO 8601 format) when the order was created in Shopify. The value for this property cannot be changed.


currencystringISO 4217read-only

The three-letter code (ISO 4217 format) for the currency used for the payment.


gatewaystringdeprecated

The payment gateway used for the order.


{} The Order resource
1
{
2
"app_id": 1966818,
3
"billing_address": {
4
"address1": "2259 Park Ct",
5
"address2": "Apartment 5",
6
"city": "Drayton Valley",
7
"company": null,
8
"country": "Canada",
9
"first_name": "Christopher",
10
"last_name": "Gorski",
11
"phone": "(555)555-5555",
12
"province": "Alberta",
13
"zip": "T0E 0M0",
14
"name": "Christopher Gorski",
15
"province_code": "AB",
16
"country_code": "CA",
17
"latitude": "45.41634",
18
"longitude": "-75.6868"
19
},
20
"browser_ip": "216.191.105.146",
21
"buyer_accepts_marketing": false,
22
"cancel_reason": "customer",
23
"cancelled_at": null,
24
"cart_token": "68778783ad298f1c80c3bafcddeea",
25
"checkout_token": "bd5a8aa1ecd019dd3520ff791ee3a24c",
26
"client_details": {
27
"accept_language": "en-US,en;q=0.9",
28
"browser_height": 1320,
29
"browser_ip": "216.191.105.146",
30
"browser_width": 1280,
31
"session_hash": "9ad4d1f4e6a8977b9dd98eed1e477643",
32
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36"
33
},
34
"closed_at": "2008-01-10T11:00:00-05:00",
35
"company": {
36
"id": 182772,
37
"location_id": 753095
38
},
39
"confirmation_number": "TLQDA3NN9",
40
"created_at": "2008-01-10T11:00:00-05:00",
41
"currency": "USD",
42
"current_total_additional_fees_set": {
43
"shop_money": {
44
"amount": "1.23",
45
"currency_code": "CAD"
46
},
47
"presentment_money": {
48
"amount": "0.85",
49
"currency_code": "EUR"
50
}
51
},
52
"current_total_discounts": "10.00",
53
"current_total_discounts_set": {
54
"current_total_discounts_set": {
55
"shop_money": {
56
"amount": "10.00",
57
"currency_code": "CAD"
58
},
59
"presentment_money": {
60
"amount": "5.00",
61
"currency_code": "EUR"
62
}
63
}
64
},
65
"current_total_duties_set": {
66
"current_total_duties_set": {
67
"shop_money": {
68
"amount": "164.86",
69
"currency_code": "CAD"
70
},
71
"presentment_money": {
72
"amount": "105.31",
73
"currency_code": "EUR"
74
}
75
}
76
},
77
"current_total_price": "10.00",
78
"current_total_price_set": {
79
"current_total_price_set": {
80
"shop_money": {
81
"amount": "30.00",
82
"currency_code": "CAD"
83
},
84
"presentment_money": {
85
"amount": "20.00",
86
"currency_code": "EUR"
87
}
88
}
89
},
90
"current_subtotal_price": "10.00",
91
"current_subtotal_price_set": {
92
"current_subtotal_price_set": {
93
"shop_money": {
94
"amount": "30.00",
95
"currency_code": "CAD"
96
},
97
"presentment_money": {
98
"amount": "20.00",
99
"currency_code": "EUR"
100
}
101
}
102
},
103
"current_total_tax": "10.00",
104
"current_total_tax_set": {
105
"current_total_tax_set": {
106
"shop_money": {
107
"amount": "30.00",
108
"currency_code": "CAD"
109
},
110
"presentment_money": {
111
"amount": "20.00",
112
"currency_code": "EUR"
113
}
114
}
115
},
116
"customer": {
117
"id": 207119551,
118
"email": "bob.norman@mail.example.com",
119
"accepts_marketing": false,
120
"created_at": "2012-03-13T16:09:55-04:00",
121
"updated_at": "2012-03-13T16:09:55-04:00",
122
"first_name": "Bob",
123
"last_name": "Norman",
124
"state": "disabled",
125
"note": null,
126
"verified_email": true,
127
"multipass_identifier": null,
128
"tax_exempt": false,
129
"tax_exemptions": {},
130
"phone": "+13125551212",
131
"tags": "loyal",
132
"currency": "USD",
133
"addresses": {},
134
"admin_graphql_api_id": "gid://shopify/Customer/207119551",
135
"default_address": {}
136
},
137
"customer_locale": "en-CA",
138
"discount_applications": {
139
"discount_applications": [
140
{
141
"type": "manual",
142
"title": "custom discount",
143
"description": "customer deserved it",
144
"value": "2.0",
145
"value_type": "fixed_amount",
146
"allocation_method": "across",
147
"target_selection": "explicit",
148
"target_type": "line_item"
149
},
150
{
151
"type": "script",
152
"description": "my scripted discount",
153
"value": "5.0",
154
"value_type": "fixed_amount",
155
"allocation_method": "across",
156
"target_selection": "explicit",
157
"target_type": "shipping_line"
158
},
159
{
160
"type": "discount_code",
161
"code": "SUMMERSALE",
162
"value": "10.0",
163
"value_type": "fixed_amount",
164
"allocation_method": "across",
165
"target_selection": "all",
166
"target_type": "line_item"
167
}
168
]
169
},
170
"discount_codes": [
171
{
172
"code": "SPRING30",
173
"amount": "30.00",
174
"type": "fixed_amount"
175
}
176
],
177
"email": "bob.norman@mail.example.com",
178
"estimated_taxes": false,
179
"financial_status": "authorized",
180
"fulfillments": [
181
{
182
"created_at": "2012-03-13T16:09:54-04:00",
183
"id": 255858046,
184
"order_id": 450789469,
185
"status": "failure",
186
"tracking_company": "USPS",
187
"tracking_number": "1Z2345",
188
"updated_at": "2012-05-01T14:22:25-04:00"
189
}
190
],
191
"fulfillment_status": "partial",
192
"gateway": "shopify_payments",
193
"id": 450789469,
194
"landing_site": "http://www.example.com?source=abc",
195
"line_items": [
196
{
197
"attributed_staffs": [
198
{
199
"id": "gid://shopify/StaffMember/2108187",
200
"quantity": 1
201
}
202
],
203
"fulfillable_quantity": 1,
204
"fulfillment_service": "amazon",
205
"fulfillment_status": "fulfilled",
206
"grams": 500,
207
"id": 669751112,
208
"price": "199.99",
209
"product_id": 7513594,
210
"quantity": 1,
211
"current_quantity": 1,
212
"requires_shipping": true,
213
"sku": "IPOD-342-N",
214
"title": "IPod Nano",
215
"variant_id": 4264112,
216
"variant_title": "Pink",
217
"vendor": "Apple",
218
"name": "IPod Nano - Pink",
219
"gift_card": false,
220
"price_set": {
221
"shop_money": {
222
"amount": "199.99",
223
"currency_code": "USD"
224
},
225
"presentment_money": {
226
"amount": "173.30",
227
"currency_code": "EUR"
228
}
229
},
230
"properties": [
231
{
232
"name": "custom engraving",
233
"value": "Happy Birthday Mom!"
234
}
235
],
236
"taxable": true,
237
"tax_lines": [
238
{
239
"title": "HST",
240
"price": "25.81",
241
"price_set": {
242
"shop_money": {
243
"amount": "25.81",
244
"currency_code": "USD"
245
},
246
"presentment_money": {
247
"amount": "20.15",
248
"currency_code": "EUR"
249
}
250
},
251
"channel_liable": true,
252
"rate": 0.13
253
}
254
],
255
"total_discount": "5.00",
256
"total_discount_set": {
257
"shop_money": {
258
"amount": "5.00",
259
"currency_code": "USD"
260
},
261
"presentment_money": {
262
"amount": "4.30",
263
"currency_code": "EUR"
264
}
265
},
266
"discount_allocations": [
267
{
268
"amount": "5.00",
269
"discount_application_index": 2,
270
"amount_set": {
271
"shop_money": {
272
"amount": "5.00",
273
"currency_code": "USD"
274
},
275
"presentment_money": {
276
"amount": "3.96",
277
"currency_code": "EUR"
278
}
279
}
280
}
281
],
282
"origin_location": {
283
"id": 1390592786454,
284
"country_code": "CA",
285
"province_code": "ON",
286
"name": "Apple",
287
"address1": "700 West Georgia Street",
288
"address2": "1500",
289
"city": "Toronto",
290
"zip": "V7Y 1G5"
291
},
292
"duties": [
293
{
294
"id": "2",
295
"harmonized_system_code": "520300",
296
"country_code_of_origin": "CA",
297
"shop_money": {
298
"amount": "164.86",
299
"currency_code": "CAD"
300
},
301
"presentment_money": {
302
"amount": "105.31",
303
"currency_code": "EUR"
304
},
305
"tax_lines": [
306
{
307
"title": "VAT",
308
"price": "16.486",
309
"rate": 0.1,
310
"price_set": {
311
"shop_money": {
312
"amount": "16.486",
313
"currency_code": "CAD"
314
},
315
"presentment_money": {
316
"amount": "10.531",
317
"currency_code": "EUR"
318
}
319
},
320
"channel_liable": true
321
}
322
],
323
"admin_graphql_api_id": "gid://shopify/Duty/2"
324
}
325
]
326
}
327
],
328
"location_id": 49202758,
329
"merchant_of_record_app_id": 123456,
330
"name": "#1001",
331
"note": "Customer changed their mind.",
332
"note_attributes": [
333
{
334
"name": "custom name",
335
"value": "custom value"
336
}
337
],
338
"number": 1,
339
"order_number": 1001,
340
"original_total_additional_fees_set": {
341
"shop_money": {
342
"amount": "1.23",
343
"currency_code": "CAD"
344
},
345
"presentment_money": {
346
"amount": "0.85",
347
"currency_code": "EUR"
348
}
349
},
350
"original_total_duties_set": {
351
"original_total_duties_set": {
352
"shop_money": {
353
"amount": "164.86",
354
"currency_code": "CAD"
355
},
356
"presentment_money": {
357
"amount": "105.31",
358
"currency_code": "EUR"
359
}
360
}
361
},
362
"payment_terms": {
363
"amount": 70,
364
"currency": "CAD",
365
"payment_terms_name": "NET_30",
366
"payment_terms_type": "NET",
367
"due_in_days": 30,
368
"payment_schedules": [
369
{
370
"amount": 70,
371
"currency": "CAD",
372
"issued_at": "2020-07-29T13:02:43-04:00",
373
"due_at": "2020-08-29T13:02:43-04:00",
374
"completed_at": "null",
375
"expected_payment_method": "shopify_payments"
376
}
377
]
378
},
379
"payment_gateway_names": ["authorize_net", "Cash on Delivery (COD)"],
380
"phone": "+557734881234",
381
"po_number": "PO#123456789",
382
"presentment_currency": "CAD",
383
"processed_at": "2008-01-10T11:00:00-05:00",
384
"referring_site": "http://www.anexample.com",
385
"refunds": [
386
{
387
"id": 18423447608,
388
"order_id": 394481795128,
389
"created_at": "2018-03-06T09:35:37-05:00",
390
"note": null,
391
"user_id": null,
392
"processed_at": "2018-03-06T09:35:37-05:00",
393
"refund_line_items": [],
394
"transactions": [],
395
"order_adjustments": []
396
}
397
],
398
"shipping_address": {
399
"address1": "123 Amoebobacterieae St",
400
"address2": "",
401
"city": "Ottawa",
402
"company": null,
403
"country": "Canada",
404
"first_name": "Bob",
405
"last_name": "Bobsen",
406
"latitude": "45.41634",
407
"longitude": "-75.6868",
408
"phone": "555-625-1199",
409
"province": "Ontario",
410
"zip": "K2P0V6",
411
"name": "Bob Bobsen",
412
"country_code": "CA",
413
"province_code": "ON"
414
},
415
"shipping_lines": [
416
{
417
"code": "INT.TP",
418
"price": "4.00",
419
"price_set": {
420
"shop_money": {
421
"amount": "4.00",
422
"currency_code": "USD"
423
},
424
"presentment_money": {
425
"amount": "3.17",
426
"currency_code": "EUR"
427
}
428
},
429
"discounted_price": "4.00",
430
"discounted_price_set": {
431
"shop_money": {
432
"amount": "4.00",
433
"currency_code": "USD"
434
},
435
"presentment_money": {
436
"amount": "3.17",
437
"currency_code": "EUR"
438
}
439
},
440
"source": "canada_post",
441
"title": "Small Packet International Air",
442
"tax_lines": [],
443
"carrier_identifier": "third_party_carrier_identifier",
444
"requested_fulfillment_service_id": "third_party_fulfillment_service_id"
445
}
446
],
447
"source_name": "instagram",
448
"source_identifier": "ORDERID-123",
449
"source_url": "{URL_to_order}",
450
"subtotal_price": "398.00",
451
"subtotal_price_set": {
452
"shop_money": {
453
"amount": "141.99",
454
"currency_code": "CAD"
455
},
456
"presentment_money": {
457
"amount": "90.95",
458
"currency_code": "EUR"
459
}
460
},
461
"tags": "imported, vip",
462
"tax_lines": [
463
{
464
"price": 11.94,
465
"rate": 0.06,
466
"title": "State Tax",
467
"channel_liable": true
468
}
469
],
470
"taxes_included": false,
471
"test": true,
472
"token": "b1946ac92492d2347c6235b4d2611184",
473
"total_discounts": "0.00",
474
"total_discounts_set": {
475
"shop_money": {
476
"amount": "0.00",
477
"currency_code": "CAD"
478
},
479
"presentment_money": {
480
"amount": "0.00",
481
"currency_code": "EUR"
482
}
483
},
484
"total_line_items_price": "398.00",
485
"total_line_items_price_set": {
486
"shop_money": {
487
"amount": "141.99",
488
"currency_code": "CAD"
489
},
490
"presentment_money": {
491
"amount": "90.95",
492
"currency_code": "EUR"
493
}
494
},
495
"total_outstanding": "5.00",
496
"total_price": "409.94",
497
"total_price_set": {
498
"shop_money": {
499
"amount": "164.86",
500
"currency_code": "CAD"
501
},
502
"presentment_money": {
503
"amount": "105.31",
504
"currency_code": "EUR"
505
}
506
},
507
"total_shipping_price_set": {
508
"shop_money": {
509
"amount": "30.00",
510
"currency_code": "USD"
511
},
512
"presentment_money": {
513
"amount": "0.00",
514
"currency_code": "USD"
515
}
516
},
517
"total_tax": "11.94",
518
"total_tax_set": {
519
"shop_money": {
520
"amount": "18.87",
521
"currency_code": "CAD"
522
},
523
"presentment_money": {
524
"amount": "11.82",
525
"currency_code": "EUR"
526
}
527
},
528
"total_tip_received": "4.87",
529
"total_weight": 300,
530
"updated_at": "2012-08-24T14:02:15-04:00",
531
"user_id": 31522279
532
}
533

POST
Create an order


Creates an order.

By default, product inventory is not claimed when creating an order.

There are additional optional parameters that can be specified in the body of the request when creating an order:

  • inventory_behaviour: The behaviour to use when updating inventory. (default: bypass)
    • bypass: Do not claim inventory.
    • decrement_ignoring_policy: Ignore the product's inventory policy and claim inventory.
    • decrement_obeying_policy: Follow the product's inventory policy and claim inventory, if possible.
  • send_receipt: Whether to send an order confirmation to the customer. (default: `false`)
Parameters

api_versionstringrequired

Examples

POST
/admin/api/2024-01/orders.json
1
// Session is built by the OAuth process
2
3
const order = new shopify.rest.Order({ session: session })
4
order.line_items = [
5
{
6
title: "Big Brown Bear Boots",
7
price: 74.99,
8
grams: "1300",
9
quantity: 3,
10
tax_lines: [
11
{
12
price: 13.5,
13
rate: 0.06,
14
title: "State tax",
15
},
16
],
17
},
18
]
19
order.transactions = [
20
{
21
kind: "sale",
22
status: "success",
23
amount: 238.47,
24
},
25
]
26
order.total_tax = 13.5
27
order.currency = "EUR"
28
await order.save({
29
update: true,
30
})
31
{}ResponseJSON
1
HTTP/1.1 201 Created
2
{
3
"order": {
4
"id": 1073459963,
5
"admin_graphql_api_id": "gid://shopify/Order/1073459963",
6
"app_id": 755357713,
7
"browser_ip": null,
8
"buyer_accepts_marketing": false,
9
"cancel_reason": null,
10
"cancelled_at": null,
11
"cart_token": null,
12
"checkout_id": null,
13
"checkout_token": null,
14
"client_details": null,
15
"closed_at": null,
16
"confirmation_number": "Z5NDCZ8N0",
17
"confirmed": true,
18
"contact_email": null,
19
"created_at": "2024-01-09T13:56:01-05:00",
20
"currency": "EUR",
21
"current_subtotal_price": "224.97",
22
"current_subtotal_price_set": {
23
"shop_money": {
24
"amount": "224.97",
25
"currency_code": "EUR"
26
},
27
"presentment_money": {
28
"amount": "224.97",
29
"currency_code": "EUR"
30
}
31
},
32
"current_total_additional_fees_set": null,
33
"current_total_discounts": "0.00",
34
"current_total_discounts_set": {
35
"shop_money": {
36
"amount": "0.00",
37
"currency_code": "EUR"
38
},
39
"presentment_money": {
40
"amount": "0.00",
41
"currency_code": "EUR"
42
}
43
},
44
"current_total_duties_set": null,
45
"current_total_price": "238.47",
46
"current_total_price_set": {
47
"shop_money": {
48
"amount": "238.47",
49
"currency_code": "EUR"
50
},
51
"presentment_money": {
52
"amount": "238.47",
53
"currency_code": "EUR"
54
}
55
},
56
"current_total_tax": "13.50",
57
"current_total_tax_set": {
58
"shop_money": {
59
"amount": "13.50",
60
"currency_code": "EUR"
61
},
62
"presentment_money": {
63
"amount": "13.50",
64
"currency_code": "EUR"
65
}
66
},
67
"customer_locale": null,
68
"device_id": null,
69
"discount_codes": [],
70
"email": "",
71
"estimated_taxes": false,
72
"financial_status": "paid",
73
"fulfillment_status": null,
74
"landing_site": null,
75
"landing_site_ref": null,
76
"location_id": null,
77
"merchant_of_record_app_id": null,
78
"name": "#1002",
79
"note": null,
80
"note_attributes": [],
81
"number": 2,
82
"order_number": 1002,
83
"original_total_additional_fees_set": null,
84
"original_total_duties_set": null,
85
"payment_gateway_names": [
86
""
87
],
88
"phone": null,
89
"po_number": null,
90
"presentment_currency": "EUR",
91
"processed_at": "2024-01-09T13:56:01-05:00",
92
"reference": null,
93
"referring_site": null,
94
"source_identifier": null,
95
"source_name": "755357713",
96
"source_url": null,
97
"subtotal_price": "224.97",
98
"subtotal_price_set": {
99
"shop_money": {
100
"amount": "224.97",
101
"currency_code": "EUR"
102
},
103
"presentment_money": {
104
"amount": "224.97",
105
"currency_code": "EUR"
106
}
107
},
108
"tags": "",
109
"tax_exempt": false,
110
"tax_lines": [
111
{
112
"price": "13.50",
113
"rate": 0.06,
114
"title": "State tax",
115
"price_set": {
116
"shop_money": {
117
"amount": "13.50",
118
"currency_code": "EUR"
119
},
120
"presentment_money": {
121
"amount": "13.50",
122
"currency_code": "EUR"
123
}
124
},
125
"channel_liable": false
126
}
127
],
128
"taxes_included": false,
129
"test": false,
130
"token": "8800b154fc486b0c822b5002c3ed32cf",
131
"total_discounts": "0.00",
132
"total_discounts_set": {
133
"shop_money": {
134
"amount": "0.00",
135
"currency_code": "EUR"
136
},
137
"presentment_money": {
138
"amount": "0.00",
139
"currency_code": "EUR"
140
}
141
},
142
"total_line_items_price": "224.97",
143
"total_line_items_price_set": {
144
"shop_money": {
145
"amount": "224.97",
146
"currency_code": "EUR"
147
},
148
"presentment_money": {
149
"amount": "224.97",
150
"currency_code": "EUR"
151
}
152
},
153
"total_outstanding": "0.00",
154
"total_price": "238.47",
155
"total_price_set": {
156
"shop_money": {
157
"amount": "238.47",
158
"currency_code": "EUR"
159
},
160
"presentment_money": {
161
"amount": "238.47",
162
"currency_code": "EUR"
163
}
164
},
165
"total_shipping_price_set": {
166
"shop_money": {
167
"amount": "0.00",
168
"currency_code": "EUR"
169
},
170
"presentment_money": {
171
"amount": "0.00",
172
"currency_code": "EUR"
173
}
174
},
175
"total_tax": "13.50",
176
"total_tax_set": {
177
"shop_money": {
178
"amount": "13.50",
179
"currency_code": "EUR"
180
},
181
"presentment_money": {
182
"amount": "13.50",
183
"currency_code": "EUR"
184
}
185
},
186
"total_tip_received": "0.00",
187
"total_weight": 0,
188
"updated_at": "2024-01-09T13:56:01-05:00",
189
"user_id": null,
190
"billing_address": null,
191
"customer": null,
192
"discount_applications": [],
193
"fulfillments": [],
194
"line_items": [
195
{
196
"id": 1071823173,
197
"admin_graphql_api_id": "gid://shopify/LineItem/1071823173",
198
"current_quantity": 3,
199
"fulfillable_quantity": 3,
200
"fulfillment_service": "manual",
201
"fulfillment_status": null,
202
"gift_card": false,
203
"grams": 1300,
204
"name": "Big Brown Bear Boots",
205
"price": "74.99",
206
"price_set": {
207
"shop_money": {
208
"amount": "74.99",
209
"currency_code": "EUR"
210
},
211
"presentment_money": {
212
"amount": "74.99",
213
"currency_code": "EUR"
214
}
215
},
216
"product_exists": false,
217
"product_id": null,
218
"properties": [],
219
"quantity": 3,
220
"requires_shipping": true,
221
"sku": null,
222
"taxable": true,
223
"title": "Big Brown Bear Boots",
224
"total_discount": "0.00",
225
"total_discount_set": {
226
"shop_money": {
227
"amount": "0.00",
228
"currency_code": "EUR"
229
},
230
"presentment_money": {
231
"amount": "0.00",
232
"currency_code": "EUR"
233
}
234
},
235
"variant_id": null,
236
"variant_inventory_management": null,
237
"variant_title": null,
238
"vendor": null,
239
"tax_lines": [
240
{
241
"channel_liable": false,
242
"price": "13.50",
243
"price_set": {
244
"shop_money": {
245
"amount": "13.50",
246
"currency_code": "EUR"
247
},
248
"presentment_money": {
249
"amount": "13.50",
250
"currency_code": "EUR"
251
}
252
},
253
"rate": 0.06,
254
"title": "State tax"
255
}
256
],
257
"duties": [],
258
"discount_allocations": []
259
}
260
],
261
"payment_terms": null,
262
"refunds": [],
263
"shipping_address": null,
264
"shipping_lines": []
265
}
266
}

POST
Cancel an order


Cancels an order. Orders that are paid and have fulfillments can't be canceled.

Parameters

api_versionstringrequired

order_idstringrequired

amountstring

The amount to refund. If set, Shopify attempts to refund the specified amount, depending on its status. Shopify refunds through a manual gateway in cases where the original transaction was not made in Shopify. Refunds through a manual gateway are recorded as a refund on Shopify, but the customer is not refunded.


emailbooleandefault false

Whether to send an email to the customer notifying them of the cancellation.


Examples

POST
/admin/api/2024-01/orders/450789469/cancel.json
1
// Session is built by the OAuth process
2
await shopify.rest.Order.count({
3
session: session,
4
status: "any",
5
})
{}ResponseJSON
1
{
2
"order": {
3
"id": 450789469,
4
"email": ""
5
}
6
}

GET
Retrieve a list of orders


Retrieves a list of orders that meet the specified criteria. Usage notes:
This endpoint implements pagination by using links that are provided in the response header. To learn more, see Make paginated requests to the REST Admin API.

Parameters

api_versionstringrequired

attribution_app_idstring

Show orders attributed to a certain app, specified by the app's ID.


financial_statusstringdefault any

Filter orders by their financial status.

financial_status properties
  • authorized: Show only authorized orders
  • pending: Show only pending orders
  • paid: Show only paid orders
  • partially_paid: Show only partially paid orders
  • refunded: Show only refunded orders
  • voided: Show only voided orders
  • partially_refunded: Show only partially refunded orders
  • any: Show orders of any financial status.
  • unpaid: Show authorized and partially paid orders.

since_idintegerISO 8601

Show orders after the specified ID.


Examples

GET
/admin/api/2024-01/orders.json?status=any
1
// Session is built by the OAuth process
2
await shopify.rest.Order.count({
3
session: session,
4
status: "any",
5
})
{}ResponseJSON
1
{
2
"order": {
3
"id": 450789469,
4
"email": ""
5
}
6
}

PUT
Update an order


This operation allows for updating properties of an order including `buyer_accepts_marketing`, `email`, `phone`, `note`, `tags`, `metafields` and `shipping_address_attributes`. It is not for editing the items of an order.

Parameters

api_versionstringrequired

order_idstringrequired

Examples

PUT
/admin/api/2024-01/orders/450789469.json
1
// Session is built by the OAuth process
2
await shopify.rest.Order.count({
3
session: session,
4
status: "any",
5
})
{}ResponseJSON
1
{
2
"order": {
3
"id": 450789469,
4
"email": ""
5
}
6
}

DEL
Delete an order


Deletes an order. Orders that interact with an online gateway can't be deleted.

Parameters

api_versionstringrequired

order_idstringrequired

Examples

DEL
/admin/api/2024-01/orders/450789469.json
1
// Session is built by the OAuth process
2
await shopify.rest.Order.count({
3
session: session,
4
status: "any",
5
})
{}ResponseJSON
1
{
2
"order": {
3
"id": 450789469,
4
"email": ""
5
}
6
}