- Customers
- Customer Address
- Retrieves a list of addresses for a customer
- Creates a new address for a customer
- Retrieves details for a single customer address
- Updates an existing customer address
- Removes an address from a customer’s address list
- Performs bulk operations for multiple customer addresses
- Sets the default address for a customer
- CustomerSavedSearch
- Customer
- Retrieves a list of customers
- Creates a customer
- Searches for customers that match a supplied query
- Retrieves a single customer
- Updates a customer
- Deletes a customer
- Creates an account activation URL for a customer
- Sends an account invite to a customer
- Retrieves a count of customers
- Retrieves all orders that belong to a customer
- Sales channels
- Checkout
- CollectionListing
- Retrieve collection listings that are published to your app
- Retrieve product_ids that are published to a collection_id
- Retrieve a specific collection listing that is published to your app
- Create a collection listing to publish a collection to your app
- Delete a collection listing to unpublish a collection from your app
- Product ResourceFeedback
- MobilePlatformApplication
- ProductListing
- Retrieve product listings that are published to your app
- Retrieve product_ids that are published to your app
- Retrieve a count of products that are published to your app
- Retrieve a specific product listing that is published to your app
- Create a product listing to publish a product to your app
- Delete a product listing to unpublish a product from your app
- ResourceFeedback
- Payment
- Products
- Collect
- Collection
- CustomCollection
- Product
- Product Image
- Product Variant
- SmartCollection
- Orders
- Abandoned checkouts
- DraftOrder
- Order Risk
- Transaction
- Order
- Refund
- Access
- Billing
- Online store
- Asset
- Blog
- Article
- Retrieves a list of all articles from a blog
- Creates an article for a blog
- Retrieves a count of all articles from a blog
- Receive a single Article
- Updates an article
- Deletes an article
- Retrieves a list of all article authors
- Retrieves a list of all article tags
- Retrieves a list of all article tags from a specific blog
- Redirect
- Comment
- ScriptTag
- Page
- Theme
- Shipping and fulfillment
- CancellationRequest
- CarrierService
- AssignedFulfillmentOrder
- FulfillmentEvent
- Fulfillment
- Retrieves fulfillments associated with an order
- Retrieves fulfillments associated with a fulfillment order
- Retrieves a count of fulfillments associated with a specific order
- Receive a single Fulfillment
- Creates a fulfillment for one or many fulfillment orders
- Updates the tracking information for a fulfillment
- Cancels a fulfillment
- FulfillmentOrder
- Retrieves a list of fulfillment orders for a specific order
- Retrieves a specific fulfillment order
- Cancel a fulfillment order
- Marks a fulfillment order as incomplete
- Moves a fulfillment order to a new location
- Marks the fulfillment order as open
- Reschedules the fulfill_at time of a scheduled fulfillment order
- Applies a fulfillment hold on an open fulfillment order
- Sets deadline for fulfillment orders
- Releases the fulfillment hold on a fulfillment order
- LocationsForMove
- FulfillmentRequest
- FulfillmentService
- Shopify Payments
- Analytics
- Deprecated API calls
- Discounts
- DiscountCode
- Creates a discount code
- Retrieves a list of discount codes
- Updates an existing discount code
- Retrieves a single discount code
- Deletes a discount code
- Retrieves the location of a discount code
- Retrieves a count of discount codes for a shop
- Creates a discount code creation job
- Retrieves a discount code creation job
- Retrieves a list of discount codes for a discount code creation job
- PriceRule
- DiscountCode
- Inventory
- Events
- MarketingEvent
- Metafield
- Plus
- Store properties
- TenderTransaction
Retrieves a list of draft orders
GET
/admin/api/{api_version}/draft_orders.json
/admin/api/{api_version}/draft_orders.json
page
parameter will return an error. To learn more, see Make paginated requests to the REST Admin API.请求参数
Path 参数
api_version
string
必需
Query 参数
fields
string
可选
ids
string
可选
limit
string
可选
since_id
string
可选
status
string
可选
示例值:
open
updated_at_max
string
可选
updated_at_min
string
可选
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://demo.myshopify.com//admin/api//draft_orders.json'
返回响应
🟢200Retrieves a list of draft orders
application/json
Body
draft_orders
array [object {27}]
可选
id
number
必需
note
string
必需
email
string
必需
taxes_included
boolean
必需
currency
string
必需
invoice_sent_at
null | string
必需
created_at
string
必需
updated_at
string
必需
tax_exempt
boolean
必需
completed_at
null | string
必需
name
string
必需
status
string
必需
line_items
array [object {20}]
必需
shipping_address
object | null
必需
billing_address
object | null
必需
invoice_url
string
必需
applied_discount
object | null
必需
order_id
number | null
必需
shipping_line
object | null
必需
tax_lines
array
必需
tags
string
必需
note_attributes
array
必需
total_price
string
必需
subtotal_price
string
必需
total_tax
string
必需
admin_graphql_api_id
string
必需
customer
object
必需
示例
{
"draft_orders": [
{
"id": 72885271,
"note": "rush order",
"email": "bob.norman@mail.example.com",
"taxes_included": true,
"currency": "USD",
"invoice_sent_at": null,
"created_at": "2023-01-03T12:56:35-05:00",
"updated_at": "2023-01-03T12:56:35-05:00",
"tax_exempt": false,
"completed_at": null,
"name": "#D4",
"status": "completed",
"line_items": [
{
"id": 498266019,
"variant_id": 39072856,
"product_id": 632910392,
"title": "IPod Nano - 8gb",
"variant_title": "green",
"sku": "IPOD2008GREEN",
"vendor": null,
"quantity": 2,
"requires_shipping": true,
"taxable": true,
"gift_card": false,
"fulfillment_service": "manual",
"grams": 567,
"tax_lines": [],
"applied_discount": null,
"name": "IPod Nano - 8gb - green",
"properties": [],
"custom": false,
"price": "199.00",
"admin_graphql_api_id": "gid://shopify/DraftOrderLineItem/498266019"
}
],
"shipping_address": {
"first_name": "Bob",
"address1": "Chestnut Street 92",
"phone": "+1(502)-459-2181",
"city": "Louisville",
"zip": "40202",
"province": "Kentucky",
"country": "United States",
"last_name": "Norman",
"address2": "",
"company": null,
"latitude": 45.41634,
"longitude": -75.6868,
"name": "Bob Norman",
"country_code": "US",
"province_code": "KY"
},
"billing_address": {
"first_name": "Bob",
"address1": "Chestnut Street 92",
"phone": "+1(502)-459-2181",
"city": "Louisville",
"zip": "40202",
"province": "Kentucky",
"country": "United States",
"last_name": "Norman",
"address2": "",
"company": null,
"latitude": 45.41634,
"longitude": -75.6868,
"name": "Bob Norman",
"country_code": "US",
"province_code": "KY"
},
"invoice_url": "https://jsmith.myshopify.com/548380009/invoices/f945c7e2b158dbb69fa642cb8d79171f",
"applied_discount": null,
"order_id": 450789469,
"shipping_line": null,
"tax_lines": [],
"tags": "",
"note_attributes": [],
"total_price": "409.94",
"subtotal_price": "398.00",
"total_tax": "11.94",
"admin_graphql_api_id": "gid://shopify/DraftOrder/72885271",
"customer": {
"id": 207119551,
"email": "bob.norman@mail.example.com",
"accepts_marketing": false,
"created_at": "2023-01-03T12:56:35-05:00",
"updated_at": "2023-01-03T12:56:35-05:00",
"first_name": "Bob",
"last_name": "Norman",
"orders_count": 1,
"state": "disabled",
"total_spent": "199.65",
"last_order_id": 450789469,
"note": null,
"verified_email": true,
"multipass_identifier": null,
"tax_exempt": false,
"tags": "",
"last_order_name": "#1001",
"currency": "USD",
"phone": "+16136120707",
"accepts_marketing_updated_at": "2005-06-12T11:57:11-04:00",
"marketing_opt_in_level": null,
"tax_exemptions": [],
"admin_graphql_api_id": "gid://shopify/Customer/207119551",
"default_address": {
"id": 207119551,
"customer_id": 207119551,
"first_name": null,
"last_name": null,
"company": null,
"address1": "Chestnut Street 92",
"address2": "",
"city": "Louisville",
"province": "Kentucky",
"country": "United States",
"zip": "40202",
"phone": "555-625-1199",
"name": "",
"province_code": "KY",
"country_code": "US",
"country_name": "United States",
"default": true
}
}
},
{
"id": 622762746,
"note": "rush order",
"email": "bob.norman@mail.example.com",
"taxes_included": false,
"currency": "USD",
"invoice_sent_at": null,
"created_at": "2023-01-03T12:56:35-05:00",
"updated_at": "2023-01-03T12:56:35-05:00",
"tax_exempt": false,
"completed_at": null,
"name": "#D1",
"status": "open",
"line_items": [
{
"id": 466157049,
"variant_id": 39072856,
"product_id": 632910392,
"title": "IPod Nano - 8gb",
"variant_title": "green",
"sku": "IPOD2008GREEN",
"vendor": null,
"quantity": 1,
"requires_shipping": true,
"taxable": true,
"gift_card": false,
"fulfillment_service": "manual",
"grams": 567,
"tax_lines": [],
"applied_discount": null,
"name": "IPod Nano - 8gb - green",
"properties": [],
"custom": false,
"price": "199.00",
"admin_graphql_api_id": "gid://shopify/DraftOrderLineItem/466157049"
},
{
"id": 605833968,
"variant_id": null,
"product_id": null,
"title": "IPod Nano Engraving",
"variant_title": null,
"sku": "IPODENGRAVING",
"vendor": null,
"quantity": 1,
"requires_shipping": false,
"taxable": true,
"gift_card": false,
"fulfillment_service": "manual",
"grams": 0,
"tax_lines": [],
"applied_discount": null,
"name": "IPod Nano Engraving",
"properties": [],
"custom": true,
"price": "30.00",
"admin_graphql_api_id": "gid://shopify/DraftOrderLineItem/605833968"
},
{
"id": 783764327,
"variant_id": 457924702,
"product_id": 632910392,
"title": "IPod Nano - 8gb",
"variant_title": "black",
"sku": "IPOD2008BLACK",
"vendor": null,
"quantity": 3,
"requires_shipping": true,
"taxable": true,
"gift_card": false,
"fulfillment_service": "manual",
"grams": 567,
"tax_lines": [],
"applied_discount": null,
"name": "IPod Nano - 8gb - black",
"properties": [],
"custom": false,
"price": "199.00",
"admin_graphql_api_id": "gid://shopify/DraftOrderLineItem/783764327"
}
],
"shipping_address": {
"first_name": "Bob",
"address1": "Chestnut Street 92",
"phone": "+1(502)-459-2181",
"city": "Louisville",
"zip": "40202",
"province": "Kentucky",
"country": "United States",
"last_name": "Norman",
"address2": "",
"company": null,
"latitude": 45.41634,
"longitude": -75.6868,
"name": "Bob Norman",
"country_code": "US",
"province_code": "KY"
},
"billing_address": {
"first_name": "Bob",
"address1": "Chestnut Street 92",
"phone": "+1(502)-459-2181",
"city": "Louisville",
"zip": "40202",
"province": "Kentucky",
"country": "United States",
"last_name": "Norman",
"address2": "",
"company": null,
"latitude": 45.41634,
"longitude": -75.6868,
"name": "Bob Norman",
"country_code": "US",
"province_code": "KY"
},
"invoice_url": "https://jsmith.myshopify.com/548380009/invoices/f1df1a91d10a6d7704cf2f0315461api",
"applied_discount": null,
"order_id": null,
"shipping_line": {
"title": "custom shipping",
"custom": true,
"handle": null,
"price": "10.00"
},
"tax_lines": [],
"tags": "",
"note_attributes": [],
"total_price": "836.00",
"subtotal_price": "826.00",
"total_tax": "0.00",
"admin_graphql_api_id": "gid://shopify/DraftOrder/622762746",
"customer": {
"id": 207119551,
"email": "bob.norman@mail.example.com",
"accepts_marketing": false,
"created_at": "2023-01-03T12:56:35-05:00",
"updated_at": "2023-01-03T12:56:35-05:00",
"first_name": "Bob",
"last_name": "Norman",
"orders_count": 1,
"state": "disabled",
"total_spent": "199.65",
"last_order_id": 450789469,
"note": null,
"verified_email": true,
"multipass_identifier": null,
"tax_exempt": false,
"tags": "",
"last_order_name": "#1001",
"currency": "USD",
"phone": "+16136120707",
"accepts_marketing_updated_at": "2005-06-12T11:57:11-04:00",
"marketing_opt_in_level": null,
"tax_exemptions": [],
"admin_graphql_api_id": "gid://shopify/Customer/207119551",
"default_address": {
"id": 207119551,
"customer_id": 207119551,
"first_name": null,
"last_name": null,
"company": null,
"address1": "Chestnut Street 92",
"address2": "",
"city": "Louisville",
"province": "Kentucky",
"country": "United States",
"zip": "40202",
"phone": "555-625-1199",
"name": "",
"province_code": "KY",
"country_code": "US",
"country_name": "United States",
"default": true
}
}
},
{
"id": 691042898,
"note": "rush order",
"email": "bob.norman@mail.example.com",
"taxes_included": true,
"currency": "USD",
"invoice_sent_at": "2016-12-31T19:00:00-05:00",
"created_at": "2023-01-03T12:56:35-05:00",
"updated_at": "2023-01-03T12:56:35-05:00",
"tax_exempt": false,
"completed_at": "2016-12-31T19:00:00-05:00",
"name": "#D4",
"status": "completed",
"line_items": [
{
"id": 158115779,
"variant_id": 39072856,
"product_id": 632910392,
"title": "IPod Nano - 8gb",
"variant_title": "green",
"sku": "IPOD2008GREEN",
"vendor": null,
"quantity": 1,
"requires_shipping": true,
"taxable": true,
"gift_card": false,
"fulfillment_service": "manual",
"grams": 567,
"tax_lines": [],
"applied_discount": null,
"name": "IPod Nano - 8gb - green",
"properties": [],
"custom": false,
"price": "199.00",
"admin_graphql_api_id": "gid://shopify/DraftOrderLineItem/158115779"
}
],
"shipping_address": {
"first_name": "Bob",
"address1": "Chestnut Street 92",
"phone": "+1(502)-459-2181",
"city": "Louisville",
"zip": "40202",
"province": "Kentucky",
"country": "United States",
"last_name": "Norman",
"address2": "",
"company": null,
"latitude": 45.41634,
"longitude": -75.6868,
"name": "Bob Norman",
"country_code": "US",
"province_code": "KY"
},
"billing_address": {
"first_name": "Bob",
"address1": "Chestnut Street 92",
"phone": "+1(502)-459-2181",
"city": "Louisville",
"zip": "40202",
"province": "Kentucky",
"country": "United States",
"last_name": "Norman",
"address2": "",
"company": null,
"latitude": 45.41634,
"longitude": -75.6868,
"name": "Bob Norman",
"country_code": "US",
"province_code": "KY"
},
"invoice_url": "https://jsmith.myshopify.com/548380009/invoices/56dd92fb7adc1a2c38402b1aab15b2f4",
"applied_discount": null,
"order_id": 450789469,
"shipping_line": {
"title": "UPS Ground",
"custom": false,
"handle": "ups-3-12.25",
"price": "12.25"
},
"tax_lines": [],
"tags": "",
"note_attributes": [],
"total_price": "409.94",
"subtotal_price": "398.00",
"total_tax": "11.94",
"admin_graphql_api_id": "gid://shopify/DraftOrder/691042898",
"customer": {
"id": 207119551,
"email": "bob.norman@mail.example.com",
"accepts_marketing": false,
"created_at": "2023-01-03T12:56:35-05:00",
"updated_at": "2023-01-03T12:56:35-05:00",
"first_name": "Bob",
"last_name": "Norman",
"orders_count": 1,
"state": "disabled",
"total_spent": "199.65",
"last_order_id": 450789469,
"note": null,
"verified_email": true,
"multipass_identifier": null,
"tax_exempt": false,
"tags": "",
"last_order_name": "#1001",
"currency": "USD",
"phone": "+16136120707",
"accepts_marketing_updated_at": "2005-06-12T11:57:11-04:00",
"marketing_opt_in_level": null,
"tax_exemptions": [],
"admin_graphql_api_id": "gid://shopify/Customer/207119551",
"default_address": {
"id": 207119551,
"customer_id": 207119551,
"first_name": null,
"last_name": null,
"company": null,
"address1": "Chestnut Street 92",
"address2": "",
"city": "Louisville",
"province": "Kentucky",
"country": "United States",
"zip": "40202",
"phone": "555-625-1199",
"name": "",
"province_code": "KY",
"country_code": "US",
"country_name": "United States",
"default": true
}
}
},
{
"id": 994118539,
"note": "rush order",
"email": "bob.norman@mail.example.com",
"taxes_included": false,
"currency": "USD",
"invoice_sent_at": null,
"created_at": "2023-01-03T12:56:35-05:00",
"updated_at": "2023-01-03T12:56:35-05:00",
"tax_exempt": false,
"completed_at": null,
"name": "#D2",
"status": "open",
"line_items": [
{
"id": 994118539,
"variant_id": 39072856,
"product_id": 632910392,
"title": "IPod Nano - 8gb",
"variant_title": "green",
"sku": "IPOD2008GREEN",
"vendor": null,
"quantity": 1,
"requires_shipping": false,
"taxable": true,
"gift_card": false,
"fulfillment_service": "manual",
"grams": 567,
"tax_lines": [],
"applied_discount": null,
"name": "IPod Nano - 8gb - green",
"properties": [],
"custom": false,
"price": "199.00",
"admin_graphql_api_id": "gid://shopify/DraftOrderLineItem/994118539"
}
],
"shipping_address": {
"first_name": "Bob",
"address1": "Chestnut Street 92",
"phone": "+1(502)-459-2181",
"city": "Louisville",
"zip": "40202",
"province": "Kentucky",
"country": "United States",
"last_name": "Norman",
"address2": "",
"company": null,
"latitude": 45.41634,
"longitude": -75.6868,
"name": "Bob Norman",
"country_code": "US",
"province_code": "KY"
},
"billing_address": {
"first_name": "Bob",
"address1": "Chestnut Street 92",
"phone": "+1(502)-459-2181",
"city": "Louisville",
"zip": "40202",
"province": "Kentucky",
"country": "United States",
"last_name": "Norman",
"address2": "",
"company": null,
"latitude": 45.41634,
"longitude": -75.6868,
"name": "Bob Norman",
"country_code": "US",
"province_code": "KY"
},
"invoice_url": "https://jsmith.myshopify.com/548380009/invoices/ba8dcf6c022ccad3d47e3909e378e33f",
"applied_discount": {
"description": "$5promo",
"value": "5.0",
"title": null,
"amount": "5.00",
"value_type": "fixed_amount"
},
"order_id": null,
"shipping_line": {
"title": "UPS Ground",
"custom": false,
"handle": "ups-3-12.25",
"price": "12.25"
},
"tax_lines": [],
"tags": "Wholesale",
"note_attributes": [],
"total_price": "206.25",
"subtotal_price": "194.00",
"total_tax": "0.00",
"admin_graphql_api_id": "gid://shopify/DraftOrder/994118539",
"customer": {
"id": 207119551,
"email": "bob.norman@mail.example.com",
"accepts_marketing": false,
"created_at": "2023-01-03T12:56:35-05:00",
"updated_at": "2023-01-03T12:56:35-05:00",
"first_name": "Bob",
"last_name": "Norman",
"orders_count": 1,
"state": "disabled",
"total_spent": "199.65",
"last_order_id": 450789469,
"note": null,
"verified_email": true,
"multipass_identifier": null,
"tax_exempt": false,
"tags": "",
"last_order_name": "#1001",
"currency": "USD",
"phone": "+16136120707",
"accepts_marketing_updated_at": "2005-06-12T11:57:11-04:00",
"marketing_opt_in_level": null,
"tax_exemptions": [],
"admin_graphql_api_id": "gid://shopify/Customer/207119551",
"default_address": {
"id": 207119551,
"customer_id": 207119551,
"first_name": null,
"last_name": null,
"company": null,
"address1": "Chestnut Street 92",
"address2": "",
"city": "Louisville",
"province": "Kentucky",
"country": "United States",
"zip": "40202",
"phone": "555-625-1199",
"name": "",
"province_code": "KY",
"country_code": "US",
"country_name": "United States",
"default": true
}
}
},
{
"id": 1012750869,
"note": "rush order",
"email": "bob.norman@mail.example.com",
"taxes_included": false,
"currency": "USD",
"invoice_sent_at": null,
"created_at": "2023-01-03T12:56:35-05:00",
"updated_at": "2023-01-03T12:56:35-05:00",
"tax_exempt": false,
"completed_at": null,
"name": "#D2",
"status": "open",
"line_items": [
{
"id": 294997122,
"variant_id": 39072856,
"product_id": 632910392,
"title": "IPod Nano - 8gb",
"variant_title": "green",
"sku": "IPOD2008GREEN",
"vendor": null,
"quantity": 1,
"requires_shipping": true,
"taxable": true,
"gift_card": false,
"fulfillment_service": "manual",
"grams": 567,
"tax_lines": [],
"applied_discount": null,
"name": "IPod Nano - 8gb - green",
"properties": [],
"custom": false,
"price": "199.00",
"admin_graphql_api_id": "gid://shopify/DraftOrderLineItem/294997122"
}
],
"shipping_address": null,
"billing_address": null,
"invoice_url": "https://jsmith.myshopify.com/548380009/invoices/f1df1a91d10a6d7704cf2f0315461noaddressapi",
"applied_discount": null,
"order_id": null,
"shipping_line": null,
"tax_lines": [],
"tags": "",
"note_attributes": [],
"total_price": "836.00",
"subtotal_price": "826.00",
"total_tax": "0.00",
"admin_graphql_api_id": "gid://shopify/DraftOrder/1012750869"
}
]
}
修改于 2023-01-29 12:00:32