- 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
Cancel an order
POST
/admin/api/{api_version}/orders/{order_id}/cancel.json
请求参数
Path 参数
api_version
string
必需
order_id
string
必需
Query 参数
amount
string
可选
currency
string
可选
amount
property is provided.email
string
可选
reason
string
可选
customer
, inventory
, fraud
, declined
, and other
.)refund
string
可选
restock
string
可选
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://demo.myshopify.com//admin/api//orders//cancel.json'
返回响应
🟢200Cancel an order
application/json
Body
order
object (Order)
可选
app_id
string
只读可选
billing_address
object (Customer Address)
可选
- 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.
- country_code: The two-letter code (ISO 3166-1 format) for the country of the billing address.
- first_name: The first name of the person associated with the payment method.
- last_name: The last name of the person associated with the payment method.
- latitude: The latitude of the billing address.
- longitude: The longitude of the billing address.
- name: The full name of the person associated with the payment method.
- phone: The phone number at the billing address.
- province: The name of the region (for example, province, state, or prefecture) of the billing address.
- province_code: The two-letter abbreviation of the region of the billing address.
- zip: The postal code (for example, zip, postcode, or Eircode) of the billing address.
browser_ip
string <ip>
只读可选
buyer_accepts_marketing
string
可选
cancel_reason
string
可选
- 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_at
string <ISO_8601>
只读可选
null
if the order isn't canceled.cart_token
string
只读可选
checkout_token
string
只读可选
client_details
string
只读可选
- accept_language: The languages and locales that the browser understands.
- browser_height: The browser screen height in pixels, if available.
- browser_ip: The browser IP address.
- browser_width: The browser screen width in pixels, if available.
- session_hash: A hash of the session.
- user_agent: Details of the browsing client, including software and operating versions.
closed_at
string <ISO_8601>
只读可选
null
if the order isn't closed.company
string
只读可选
null
will be returned if there is no purchasing company.created_at
string <ISO_8601>
只读可选
(ISO 8601 format)
when the order was created in Shopify.
The value for this property cannot be changed.
currency
string <ISO_4217>
只读可选
current_total_discounts
string
只读可选
current_total_discounts_set
string
只读可选
amount
values associated with this field reflect order edits, returns, and refunds.current_total_duties_set
string
只读可选
amount
values associated with this field reflect order edits, returns, and refunds.current_total_price
string
只读可选
current_total_price_set
string
只读可选
amount
values associated with this field reflect order edits, returns, and refunds.current_subtotal_price
string
只读可选
current_subtotal_price_set
string
只读可选
amount
values associated with this field reflect order edits, returns, and refunds.current_total_tax
string
只读可选
current_total_tax_set
string
只读可选
amount
values associated with this field reflect order edits, returns, and refunds.customer
object (Customer)
可选
customer
object. This value might be null
if the order was created through Shopify POS. For more information about the customer
object, see the Customer resource.customer_locale
string
只读可选
discount_applications
enum<string>
只读可选
An ordered list of stacked discount applications.
The discount_applications
property includes 3 types: discount_code
, manual
, and script
. All 3 types share a common structure and have some type specific attributes.
-
allocation_method: The method by which the discount application value has been allocated to entitled lines. Valid values:
across
: The value is spread across all entitled lines.each
: The value is applied onto every entitled line.one
: The value is applied onto a single line.
Caution
As of version 2020-07,
across
is returned instead ofone
as the meaning is the same for explicit discounts. - code: The discount code that was used to apply the discount. Available only for discount code applications.
- description: The description of the discount application, as defined by the merchant or the Shopify Script. Available only for manual and script discount applications.
-
target_selection: The lines on the order, of the type defined by
target_type
, that the discount is allocated over. Valid values:all
: The discount is allocated onto all lines,entitled
: The discount is allocated only onto lines it is entitled for.explicit
: The discount is allocated onto explicitly selected lines.
-
target_type: The type of line on the order that the discount is applicable on. Valid values:
line_item
: The discount applies to line items.shipping_line
: The discount applies to shipping lines.
- title: The title of the discount application, as defined by the merchant. Available only for manual discount applications.
-
type: The discount application type. Valid values:
automatic
: The discount was applied automatically, such as by a Buy X Get Y automatic discount.discount_code
: The discount was applied by a discount code.manual
: The discount was manually applied by the merchant (for example, by using an app or creating a draft order).script
: The discount was applied by a Shopify Script.
-
value: The value of the discount application as a decimal. This represents the intention of the discount application. For example, if the intent was to apply a 20% discount, then the value will be
20.0
. If the intent was to apply a $15 discount, then the value will be15.0
. - value_type: The type of the value.
枚举值:
acrosseachoneallentitledexplicitline_itemshipping_lineautomaticdiscount_codemanualscriptfixed_amountpercentage
discount_codes
enum<string>
可选
A list of discounts applied to the order. Each discount object includes the following properties:
- amount: The amount that's deducted from the order total. When you create an order, this value is the percentage or monetary amount to deduct. After the order is created, this property returns the calculated amount.
- code: When the associated discount application is of type
code
, this property returns the discount code that was entered at checkout. Otherwise this property returns the title of the discount that was applied. -
type: The type of discount. Default value:
fixed_amount
.
枚举值:
amountcodefixed_amount</code>: Applies <code>amount</code> as a unit of the store's currency. For example, if <code>amountpercentage</code>: Applies a discount of <code>amountshipping</code>: Applies a free shipping discount on orders that have a shipping rate less than or equal to <code>amount</code>. For example, if <code>amount
示例值:
{"code":"SPRING30","amount":"30.00","type":"fixed_amount"}
email
string <email>
可选
estimated_taxes
string
可选
time a customer places an order and the time the order is shipped, which could affect the calculation
of taxes. This property returns
false
when taxes on the order are finalized and aren't subjectto any changes.
financial_status
string
可选
- pending: The payments are pending. Payment might fail in this state. Check again to confirm whether the payments have been paid successfully.
- authorized: The payments have been authorized.
- partially_paid: The order has been partially paid.
- paid: The payments have been paid.
- partially_refunded: The payments have been partially refunded.
- refunded: The payments have been refunded.
- voided: The payments have been voided.
fulfillments
string
可选
示例值:
{"created_at":"2012-03-13T16:09:54-04:00","id":255858046,"order_id":450789469,"status":"failure","tracking_company":"USPS","tracking_number":"1Z2345","updated_at":"2012-05-01T14:22:25-04:00"}
fulfillment_status
string
可选
- fulfilled: Every line item in the order has been fulfilled.
- null: None of the line items in the order have been fulfilled.
- partial: At least one line item in the order has been fulfilled.
- restocked: Every line item in the order has been restocked and the order canceled.
gateway
string
已废弃
id
string
只读可选
This is different from the
order_number
property, which is the IDused by the shop owner and customer.'
landing_site
string <url>
只读可选
line_items
string
必需
A list of line item objects, each containing information about an item in the order. Each object has the following properties:
- fulfillable_quantity: The amount available to fulfill, calculated as follows:
quantity - max(refunded_quantity, fulfilled_quantity) - pending_fulfilled_quantity - open_fulfilled_quantity
- fulfillment_service: The service provider that's fulfilling the item. Valid values:
manual
, or the name of the provider, such asamazon
orshipwire
. Multi-managed inventory introduced a breaking change to this field. Fulfillment services will all be opted into SKU sharing in 2023-04. This field is due to be deprecated. Consider using ' "FulfillmentOrder#assigned_location instead. - fulfillment_status: How far along an order is in terms line items fulfilled. Valid values:
null
,fulfilled
,partial
, andnot_eligible
. - grams: The weight of the item in grams.
- id: The ID of the line item.
- price: The price of the item before discounts have been applied in the shop currency.
- price_set: The price of the line item in shop and presentment currencies.
- product_id: The ID of the product that the line item belongs to. Can be
null
if the original product associated with the order is deleted at a later date. - quantity: The number of items that were purchased.
- requires_shipping: Whether the item requires shipping.
- sku: The item's SKU (stock keeping unit).
- title: The title of the product.
- variant_id: The ID of the product variant.
- variant_title: The title of the product variant.
- vendor: The name of the item's supplier.
- name: The name of the product variant.
- gift_card: Whether the item is a gift card. If
true
, then the item is not taxed or considered for shipping charges. - properties: An array of custom information for the item that has been added to the cart. Often used to provide product customization options.
- taxable: Whether the item was taxable.
- tax_lines: A list of tax line objects, each of which details a tax applied to the item.
title
: The name of the tax.price
: The amount added to the order for this tax in the shop currency.price_set
: The amount added to the order for this tax in shop and presentment currencies.rate
: The tax rate applied to the order to calculate the tax price.channel_liable
: Whether the channel that submitted the tax line is liable for remitting. A value ofnull
indicates unknown liability for the tax line.
- tip_payment_gateway: The payment gateway used to tender the tip, such as
shopify_payments
. Present only on tips. - tip_payment_method: The payment method used to tender the tip, such as
Visa
. Present only on tips. - total_discount: The total amount of the discount allocated to the line item in the shop currency. This field must be explicitly set using draft orders, Shopify scripts, or the API. Instead of using this field, Shopify recommends using
discount_allocations
, which provides the same information. - total_discount_set: The total amount allocated to the line item in the presentment currency. Instead of using this field, Shopify recommends using
discount_allocations
, which provides the same information. -
discount_allocations: An ordered list of amounts allocated by discount applications. Each discount allocation is associated with a particular discount application.
amount
: The discount amount allocated to the line in the shop currency.discount_application_index
: The index of the associated discount application in the order'sdiscount_applications
list.amount_set
: The discount amount allocated to the line item in shop and presentment currencies.
-
origin_location: The location of the line item’s fulfillment origin. This field is due to be deprecated. Consider using ' "FulfillmentOrder#assigned_location_id instead.
id
: The location ID of the line item’s fulfillment origin. Used by Shopify to calculate applicable taxes. This is not the ID of the location where the order was placed. You can use the FulfillmentOrder resource to determine the location an item will be sourced from.country_code
: The two-letter code (ISO 3166-1 format) for the country of the item's supplier.province_code
: The two-letter abbreviation for the region of the item's supplier.name
: The name of the item's supplier.address1
: The street address of the item's supplier.address2
: The suite number of the item's supplier.city
: The city of the item's supplier.zip
: The zip of the item's supplier.
- duties: A list of duty objects, each containing information about a duty on the line item.
示例值:
{"fulfillable_quantity":1,"fulfillment_service":"amazon","fulfillment_status":"fulfilled","grams":500,"id":669751112,"price":"199.99","product_id":7513594,"quantity":1,"requires_shipping":true,"sku":"IPOD-342-N","title":"IPod Nano","variant_id":4264112,"variant_title":"Pink","vendor":"Apple","name":"IPod Nano - Pink","gift_card":false,"price_set":{"shop_money":{"amount":"199.99","currency_code":"USD"},"presentment_money":{"amount":"173.30","currency_code":"EUR"}},"properties":[{"name":"custom engraving","value":"Happy Birthday Mom!"}],"taxable":true,"tax_lines":[{"title":"HST","price":"25.81","price_set":{"shop_money":{"amount":"25.81","currency_code":"USD"},"presentment_money":{"amount":"20.15","currency_code":"EUR"}},"channel_liable":true,"rate":0.13}],"total_discount":"5.00","total_discount_set":{"shop_money":{"amount":"5.00","currency_code":"USD"},"presentment_money":{"amount":"4.30","currency_code":"EUR"}},"discount_allocations":[{"amount":"5.00","discount_application_index":2,"amount_set":{"shop_money":{"amount":"5.00","currency_code":"USD"},"presentment_money":{"amount":"3.96","currency_code":"EUR"}}}],"origin_location":{"id":1390592786454,"country_code":"CA","province_code":"ON","name":"Apple","address1":"700 West Georgia Street","address2":"1500","city":"Toronto","zip":"V7Y 1G5"},"duties":[{"id":"2","harmonized_system_code":"520300","country_code_of_origin":"CA","shop_money":{"amount":"164.86","currency_code":"CAD"},"presentment_money":{"amount":"105.31","currency_code":"EUR"},"tax_lines":[{"title":"VAT","price":"16.486","rate":0.1,"price_set":{"shop_money":{"amount":"16.486","currency_code":"CAD"},"presentment_money":{"amount":"10.531","currency_code":"EUR"}},"channel_liable":true}],"admin_graphql_api_id":"gid://shopify/Duty/2"}]}
location_id
string
可选
merchant_of_record_app_id
string
可选
name
string
可选
order_number
property with the order prefix and suffix that are set in the merchant's general settings. This is different from the id
property, which is the ID of the order used by the API. This field can also be set by the API to be any string value.note
string
可选
note_attributes
string
可选
name
and value
keys.示例值:
{"name":"custom name","value":"custom value"}
number
string
只读可选
order_number
string
只读可选
original_total_duties_set
string
只读可选
payment_details
string
已废弃
- avs_result_code: The response code from the address verification system (AVS). The code is a single letter. See this chart for the codes and their definitions.
- credit_card_bin: The issuer identification number (IIN), formerly known as the bank identification number (BIN), of the customer's credit card. This is made up of the first few digits of the credit card number.
- credit_card_company: The name of the company who issued the customer's credit card.
- credit_card_number: The customer's credit card number, with most of the leading digits redacted.
- cvv_result_code: The response code from the credit card company indicating whether the customer entered the card security code (card verification value) correctly. The code is a single letter or empty string. See this chart for the codes and their definitions.
payment_terms
string
只读可选
- amount: The amount that is owed according to the payment terms.
- currency: The presentment currency for the payment.
- payment_terms_name: The name of the selected payment terms template for the order.
- payment_terms_type: The type of selected payment terms template for the order.
- due_in_days: The number of days between the invoice date and due date that is defined in the selected payment terms template.
- payment_schedules: An array of schedules associated to the payment terms.
- amount: The amount that is owed according to the payment terms.
- currency: The presentment currency for the payment.
- issued_at: The date and time when the payment terms were initiated.
- due_at: The date and time when the payment is due. Calculated based on
issued_at
anddue_in_days
or a customized fixed date if the type is fixed. - completed_at: The date and time when the purchase is completed. Returns null initially and updates when the payment is captured.
- expected_payment_method: The name of the payment method gateway.
payment_gateway_names
string
只读可选
示例值:
authorize_netCash on Delivery (COD)
phone
string
可选
presentment_currency
string <ISO_4217>
可选
processed_at
string <ISO_8601>
可选
when an order was processed. This value is the date that appears on your orders and that's used in the
analytic reports. If you're importing
orders from an app or another platform, then you can set
processed_at
to a date and timein the past to match when the original order was created.
processing_method
string
只读可选
- checkout: The order was processed using the Shopify checkout.
- direct: The order was processed using a direct payment provider.
- manual: The order was processed using a manual payment method.
- offsite: The order was processed by an external payment provider to the Shopify checkout.
- express: The order was processed using PayPal Express Checkout.
- free: The order was processed as a free order using a discount code.
referring_site
string <url>
可选
refunds
string
只读可选
示例值:
{"id":18423447608,"order_id":394481795128,"created_at":"2018-03-06T09:35:37-05:00","note":null,"user_id":null,"processed_at":"2018-03-06T09:35:37-05:00","refund_line_items":[],"transactions":[],"order_adjustments":[]}
shipping_address
object (Customer Address)
可选
- address1: The street address of the shipping address.
- address2: An optional additional field for the street address of the shipping address.
- city: The city, town, or village of the shipping address.
- company: The company of the person associated with the shipping address.
- country: The name of the country of the shipping address.
- country_code: The two-letter code (ISO 3166-1 format) for the country of the shipping address.
- first_name: The first name of the person associated with the shipping address.
- last_name: The last name of the person associated with the shipping address.
- latitude: The latitude of the shipping address.
- longitude: The longitude of the shipping address.
- name: The full name of the person associated with the payment method.
- phone: The phone number at the shipping address.
- province: The name of the region (for example, province, state, or prefecture) of the shipping address.
- province_code: The two-letter abbreviation of the region of the shipping address.
- zip: The postal code (for example, zip, postcode, or Eircode) of the shipping address.
shipping_lines
string
可选
An array of objects, each of which details a shipping method used. Each object has the following properties:
- code: A reference to the shipping method.
- discounted_price: The price of the shipping method after line-level discounts have been applied. Doesn't reflect cart-level or order-level discounts.
- discounted_price_set: The price of the shipping method in both shop and presentment currencies after line-level discounts have been applied.
- price: The price of this shipping method in the shop currency. Can't be negative.
- price_set: The price of the shipping method in shop and presentment currencies.
- source: The source of the shipping method.
- title: The title of the shipping method.
- tax_lines: A list of tax line objects, each of which details a tax applicable to this shipping line.
- carrier_identifier: A reference to the carrier service that provided the rate. Present when the rate was computed by a third-party carrier service.
- requested_fulfillment_service_id: A reference to the fulfillment service that is being requested for the shipping method. Present if the shipping method requires processing by a third party fulfillment service;
null
otherwise.
示例值:
{"code":"INT.TP","price":"4.00","price_set":{"shop_money":{"amount":"4.00","currency_code":"USD"},"presentment_money":{"amount":"3.17","currency_code":"EUR"}},"discounted_price":"4.00","discounted_price_set":{"shop_money":{"amount":"4.00","currency_code":"USD"},"presentment_money":{"amount":"3.17","currency_code":"EUR"}},"source":"canada_post","title":"Small Packet International Air","tax_lines":[],"carrier_identifier":"third_party_carrier_identifier","requested_fulfillment_service_id":"third_party_fulfillment_service_id"}
source_name
string
可选
source_name
value in your request.source_identifier
string
可选
This value doesn't correspond to the Shopify ID that's generated from a completed draft.
source_url
string
可选
This URL is displayed to merchants on the Order Details page.
If the URL is invalid, then it won't be displayed.
subtotal_price
string
可选
subtotal_price_set
string
可选
tags
string
可选
tax_lines
string
可选
- price: The amount of tax to be charged in the shop currency.
- rate: The rate of tax to be applied.
- title: The name of the tax.
- channel_liable: Whether the channel that submitted the tax line is liable for remitting. A value of
null
indicates unknown liability for the tax line.
示例值:
{"price":11.94,"rate":0.06,"title":"State Tax","channel_liable":true}
taxes_included
string
可选
test
string
只读可选
token
string
只读可选
total_discounts
string
可选
total_discounts_set
string
可选
total_line_items_price
string
可选
total_line_items_price_set
string
可选
total_outstanding
string
可选
total_price
string <price>
可选
total_price_set
string
可选
total_shipping_price_set
string
可选
taxes_included
is set to true
, then total_shipping_price_set
includes taxes.total_tax
string <price>
可选
total_tax_set
string
可选
total_tip_received
string
只读可选
total_weight
string
可选
updated_at
string <ISO_8601>
只读可选
user_id
string
可选
order_status_url
string <url>
只读可选
notice
string
可选
示例
{
"order": {
"id": 450789469,
"admin_graphql_api_id": "gid://shopify/Order/450789469",
"app_id": null,
"browser_ip": "0.0.0.0",
"buyer_accepts_marketing": false,
"cancel_reason": null,
"cancelled_at": null,
"cart_token": "68778783ad298f1c80c3bafcddeea02f",
"checkout_id": 901414060,
"checkout_token": "bd5a8aa1ecd019dd3520ff791ee3a24c",
"client_details": {
"accept_language": null,
"browser_height": null,
"browser_ip": "0.0.0.0",
"browser_width": null,
"session_hash": null,
"user_agent": null
},
"closed_at": null,
"confirmed": true,
"contact_email": "bob.norman@mail.example.com",
"created_at": "2008-01-10T11:00:00-05:00",
"currency": "USD",
"current_subtotal_price": "195.67",
"current_subtotal_price_set": {
"shop_money": {
"amount": "195.67",
"currency_code": "USD"
},
"presentment_money": {
"amount": "195.67",
"currency_code": "USD"
}
},
"current_total_discounts": "3.33",
"current_total_discounts_set": {
"shop_money": {
"amount": "3.33",
"currency_code": "USD"
},
"presentment_money": {
"amount": "3.33",
"currency_code": "USD"
}
},
"current_total_duties_set": null,
"current_total_price": "199.65",
"current_total_price_set": {
"shop_money": {
"amount": "199.65",
"currency_code": "USD"
},
"presentment_money": {
"amount": "199.65",
"currency_code": "USD"
}
},
"current_total_tax": "3.98",
"current_total_tax_set": {
"shop_money": {
"amount": "3.98",
"currency_code": "USD"
},
"presentment_money": {
"amount": "3.98",
"currency_code": "USD"
}
},
"customer_locale": null,
"device_id": null,
"discount_codes": [
{
"code": "TENOFF",
"amount": "10.00",
"type": "fixed_amount"
}
],
"email": "bob.norman@mail.example.com",
"estimated_taxes": false,
"financial_status": "partially_refunded",
"fulfillment_status": null,
"gateway": "authorize_net",
"landing_site": "http://www.example.com?source=abc",
"landing_site_ref": "abc",
"location_id": null,
"merchant_of_record_app_id": null,
"name": "#1001",
"note": null,
"note_attributes": [
{
"name": "custom engraving",
"value": "Happy Birthday"
},
{
"name": "colour",
"value": "green"
}
],
"number": 1,
"order_number": 1001,
"order_status_url": "https://jsmith.myshopify.com/548380009/orders/b1946ac92492d2347c6235b4d2611184/authenticate?key=imasecretipod",
"original_total_duties_set": null,
"payment_gateway_names": [
"bogus"
],
"phone": "+557734881234",
"presentment_currency": "USD",
"processed_at": "2008-01-10T11:00:00-05:00",
"processing_method": "direct",
"reference": "fhwdgads",
"referring_site": "http://www.otherexample.com",
"source_identifier": "fhwdgads",
"source_name": "web",
"source_url": null,
"subtotal_price": "597.00",
"subtotal_price_set": {
"shop_money": {
"amount": "597.00",
"currency_code": "USD"
},
"presentment_money": {
"amount": "597.00",
"currency_code": "USD"
}
},
"tags": "",
"tax_lines": [
{
"price": "11.94",
"rate": 0.06,
"title": "State Tax",
"price_set": {
"shop_money": {
"amount": "11.94",
"currency_code": "USD"
},
"presentment_money": {
"amount": "11.94",
"currency_code": "USD"
}
},
"channel_liable": null
}
],
"taxes_included": false,
"test": false,
"token": "b1946ac92492d2347c6235b4d2611184",
"total_discounts": "10.00",
"total_discounts_set": {
"shop_money": {
"amount": "10.00",
"currency_code": "USD"
},
"presentment_money": {
"amount": "10.00",
"currency_code": "USD"
}
},
"total_line_items_price": "597.00",
"total_line_items_price_set": {
"shop_money": {
"amount": "597.00",
"currency_code": "USD"
},
"presentment_money": {
"amount": "597.00",
"currency_code": "USD"
}
},
"total_outstanding": "0.00",
"total_price": "598.94",
"total_price_set": {
"shop_money": {
"amount": "598.94",
"currency_code": "USD"
},
"presentment_money": {
"amount": "598.94",
"currency_code": "USD"
}
},
"total_shipping_price_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "USD"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "USD"
}
},
"total_tax": "11.94",
"total_tax_set": {
"shop_money": {
"amount": "11.94",
"currency_code": "USD"
},
"presentment_money": {
"amount": "11.94",
"currency_code": "USD"
}
},
"total_tip_received": "0.00",
"total_weight": 0,
"updated_at": "2008-01-10T11:00:00-05:00",
"user_id": null,
"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"
},
"customer": {
"id": 207119551,
"email": "bob.norman@mail.example.com",
"accepts_marketing": false,
"created_at": "2023-01-03T12:21:36-05:00",
"updated_at": "2023-01-03T12:21:36-05:00",
"first_name": "Bob",
"last_name": "Norman",
"state": "disabled",
"note": null,
"verified_email": true,
"multipass_identifier": null,
"tax_exempt": false,
"tags": "",
"currency": "USD",
"phone": "+16136120707",
"accepts_marketing_updated_at": "2005-06-12T11:57:11-04:00",
"marketing_opt_in_level": null,
"tax_exemptions": [],
"email_marketing_consent": {
"state": "not_subscribed",
"opt_in_level": null,
"consent_updated_at": "2004-06-13T11:57:11-04:00"
},
"sms_marketing_consent": {
"state": "not_subscribed",
"opt_in_level": "single_opt_in",
"consent_updated_at": "2023-01-03T12:21:36-05:00",
"consent_collected_from": "OTHER"
},
"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
}
},
"discount_applications": [
{
"target_type": "line_item",
"type": "discount_code",
"value": "10.0",
"value_type": "fixed_amount",
"allocation_method": "across",
"target_selection": "all",
"code": "TENOFF"
}
],
"fulfillments": [
{
"id": 255858046,
"admin_graphql_api_id": "gid://shopify/Fulfillment/255858046",
"created_at": "2023-01-03T12:21:36-05:00",
"location_id": 655441491,
"name": "#1001.0",
"order_id": 450789469,
"origin_address": {},
"receipt": {
"testcase": true,
"authorization": "123456"
},
"service": "manual",
"shipment_status": null,
"status": "failure",
"tracking_company": "USPS",
"tracking_number": "1Z2345",
"tracking_numbers": [
"1Z2345"
],
"tracking_url": "https://tools.usps.com/go/TrackConfirmAction_input?qtc_tLabels1=1Z2345",
"tracking_urls": [
"https://tools.usps.com/go/TrackConfirmAction_input?qtc_tLabels1=1Z2345"
],
"updated_at": "2023-01-03T12:21:36-05:00",
"line_items": [
{
"id": 466157049,
"admin_graphql_api_id": "gid://shopify/LineItem/466157049",
"fulfillable_quantity": 0,
"fulfillment_service": "manual",
"fulfillment_status": null,
"gift_card": false,
"grams": 200,
"name": "IPod Nano - 8gb - green",
"price": "199.00",
"price_set": {
"shop_money": {
"amount": "199.00",
"currency_code": "USD"
},
"presentment_money": {
"amount": "199.00",
"currency_code": "USD"
}
},
"product_exists": true,
"product_id": 632910392,
"properties": [
{
"name": "Custom Engraving Front",
"value": "Happy Birthday"
},
{
"name": "Custom Engraving Back",
"value": "Merry Christmas"
}
],
"quantity": 1,
"requires_shipping": true,
"sku": "IPOD2008GREEN",
"taxable": true,
"title": "IPod Nano - 8gb",
"total_discount": "0.00",
"total_discount_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "USD"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "USD"
}
},
"variant_id": 39072856,
"variant_inventory_management": "shopify",
"variant_title": "green",
"vendor": null,
"tax_lines": [
{
"channel_liable": null,
"price": "3.98",
"price_set": {
"shop_money": {
"amount": "3.98",
"currency_code": "USD"
},
"presentment_money": {
"amount": "3.98",
"currency_code": "USD"
}
},
"rate": 0.06,
"title": "State Tax"
}
],
"duties": [],
"discount_allocations": [
{
"amount": "3.34",
"amount_set": {
"shop_money": {
"amount": "3.34",
"currency_code": "USD"
},
"presentment_money": {
"amount": "3.34",
"currency_code": "USD"
}
},
"discount_application_index": 0
}
]
}
]
}
],
"line_items": [
{
"id": 466157049,
"admin_graphql_api_id": "gid://shopify/LineItem/466157049",
"fulfillable_quantity": 0,
"fulfillment_service": "manual",
"fulfillment_status": null,
"gift_card": false,
"grams": 200,
"name": "IPod Nano - 8gb - green",
"price": "199.00",
"price_set": {
"shop_money": {
"amount": "199.00",
"currency_code": "USD"
},
"presentment_money": {
"amount": "199.00",
"currency_code": "USD"
}
},
"product_exists": true,
"product_id": 632910392,
"properties": [
{
"name": "Custom Engraving Front",
"value": "Happy Birthday"
},
{
"name": "Custom Engraving Back",
"value": "Merry Christmas"
}
],
"quantity": 1,
"requires_shipping": true,
"sku": "IPOD2008GREEN",
"taxable": true,
"title": "IPod Nano - 8gb",
"total_discount": "0.00",
"total_discount_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "USD"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "USD"
}
},
"variant_id": 39072856,
"variant_inventory_management": "shopify",
"variant_title": "green",
"vendor": null,
"tax_lines": [
{
"channel_liable": null,
"price": "3.98",
"price_set": {
"shop_money": {
"amount": "3.98",
"currency_code": "USD"
},
"presentment_money": {
"amount": "3.98",
"currency_code": "USD"
}
},
"rate": 0.06,
"title": "State Tax"
}
],
"duties": [],
"discount_allocations": [
{
"amount": "3.34",
"amount_set": {
"shop_money": {
"amount": "3.34",
"currency_code": "USD"
},
"presentment_money": {
"amount": "3.34",
"currency_code": "USD"
}
},
"discount_application_index": 0
}
]
},
{
"id": 518995019,
"admin_graphql_api_id": "gid://shopify/LineItem/518995019",
"fulfillable_quantity": 1,
"fulfillment_service": "manual",
"fulfillment_status": null,
"gift_card": false,
"grams": 200,
"name": "IPod Nano - 8gb - red",
"price": "199.00",
"price_set": {
"shop_money": {
"amount": "199.00",
"currency_code": "USD"
},
"presentment_money": {
"amount": "199.00",
"currency_code": "USD"
}
},
"product_exists": true,
"product_id": 632910392,
"properties": [],
"quantity": 1,
"requires_shipping": true,
"sku": "IPOD2008RED",
"taxable": true,
"title": "IPod Nano - 8gb",
"total_discount": "0.00",
"total_discount_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "USD"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "USD"
}
},
"variant_id": 49148385,
"variant_inventory_management": "shopify",
"variant_title": "red",
"vendor": null,
"tax_lines": [
{
"channel_liable": null,
"price": "3.98",
"price_set": {
"shop_money": {
"amount": "3.98",
"currency_code": "USD"
},
"presentment_money": {
"amount": "3.98",
"currency_code": "USD"
}
},
"rate": 0.06,
"title": "State Tax"
}
],
"duties": [],
"discount_allocations": [
{
"amount": "3.33",
"amount_set": {
"shop_money": {
"amount": "3.33",
"currency_code": "USD"
},
"presentment_money": {
"amount": "3.33",
"currency_code": "USD"
}
},
"discount_application_index": 0
}
]
},
{
"id": 703073504,
"admin_graphql_api_id": "gid://shopify/LineItem/703073504",
"fulfillable_quantity": 0,
"fulfillment_service": "manual",
"fulfillment_status": null,
"gift_card": false,
"grams": 200,
"name": "IPod Nano - 8gb - black",
"price": "199.00",
"price_set": {
"shop_money": {
"amount": "199.00",
"currency_code": "USD"
},
"presentment_money": {
"amount": "199.00",
"currency_code": "USD"
}
},
"product_exists": true,
"product_id": 632910392,
"properties": [],
"quantity": 1,
"requires_shipping": true,
"sku": "IPOD2008BLACK",
"taxable": true,
"title": "IPod Nano - 8gb",
"total_discount": "0.00",
"total_discount_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "USD"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "USD"
}
},
"variant_id": 457924702,
"variant_inventory_management": "shopify",
"variant_title": "black",
"vendor": null,
"tax_lines": [
{
"channel_liable": null,
"price": "3.98",
"price_set": {
"shop_money": {
"amount": "3.98",
"currency_code": "USD"
},
"presentment_money": {
"amount": "3.98",
"currency_code": "USD"
}
},
"rate": 0.06,
"title": "State Tax"
}
],
"duties": [],
"discount_allocations": [
{
"amount": "3.33",
"amount_set": {
"shop_money": {
"amount": "3.33",
"currency_code": "USD"
},
"presentment_money": {
"amount": "3.33",
"currency_code": "USD"
}
},
"discount_application_index": 0
}
]
}
],
"payment_details": {
"credit_card_bin": null,
"avs_result_code": null,
"cvv_result_code": null,
"credit_card_number": "•••• •••• •••• 4242",
"credit_card_company": "Visa",
"credit_card_name": null,
"credit_card_wallet": null,
"credit_card_expiration_month": null,
"credit_card_expiration_year": null
},
"payment_terms": null,
"refunds": [
{
"id": 509562969,
"admin_graphql_api_id": "gid://shopify/Refund/509562969",
"created_at": "2023-01-03T12:21:36-05:00",
"note": "it broke during shipping",
"order_id": 450789469,
"processed_at": "2023-01-03T12:21:36-05:00",
"restock": true,
"total_additional_fees_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "USD"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "USD"
}
},
"total_duties_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "USD"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "USD"
}
},
"user_id": 548380009,
"order_adjustments": [],
"transactions": [
{
"id": 179259969,
"admin_graphql_api_id": "gid://shopify/OrderTransaction/179259969",
"amount": "209.00",
"authorization": "authorization-key",
"created_at": "2005-08-05T12:59:12-04:00",
"currency": "USD",
"device_id": null,
"error_code": null,
"gateway": "bogus",
"kind": "refund",
"location_id": null,
"message": null,
"order_id": 450789469,
"parent_id": 801038806,
"payment_id": "#1001.3",
"processed_at": "2005-08-05T12:59:12-04:00",
"receipt": {},
"source_name": "web",
"status": "success",
"test": false,
"user_id": null
}
],
"refund_line_items": [
{
"id": 104689539,
"line_item_id": 703073504,
"location_id": 487838322,
"quantity": 1,
"restock_type": "legacy_restock",
"subtotal": 195.66,
"subtotal_set": {
"shop_money": {
"amount": "195.66",
"currency_code": "USD"
},
"presentment_money": {
"amount": "195.66",
"currency_code": "USD"
}
},
"total_tax": 3.98,
"total_tax_set": {
"shop_money": {
"amount": "3.98",
"currency_code": "USD"
},
"presentment_money": {
"amount": "3.98",
"currency_code": "USD"
}
},
"line_item": {
"id": 703073504,
"admin_graphql_api_id": "gid://shopify/LineItem/703073504",
"fulfillable_quantity": 0,
"fulfillment_service": "manual",
"fulfillment_status": null,
"gift_card": false,
"grams": 200,
"name": "IPod Nano - 8gb - black",
"price": "199.00",
"price_set": {
"shop_money": {
"amount": "199.00",
"currency_code": "USD"
},
"presentment_money": {
"amount": "199.00",
"currency_code": "USD"
}
},
"product_exists": true,
"product_id": 632910392,
"properties": [],
"quantity": 1,
"requires_shipping": true,
"sku": "IPOD2008BLACK",
"taxable": true,
"title": "IPod Nano - 8gb",
"total_discount": "0.00",
"total_discount_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "USD"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "USD"
}
},
"variant_id": 457924702,
"variant_inventory_management": "shopify",
"variant_title": "black",
"vendor": null,
"tax_lines": [
{
"channel_liable": null,
"price": "3.98",
"price_set": {
"shop_money": {
"amount": "3.98",
"currency_code": "USD"
},
"presentment_money": {
"amount": "3.98",
"currency_code": "USD"
}
},
"rate": 0.06,
"title": "State Tax"
}
],
"duties": [],
"discount_allocations": [
{
"amount": "3.33",
"amount_set": {
"shop_money": {
"amount": "3.33",
"currency_code": "USD"
},
"presentment_money": {
"amount": "3.33",
"currency_code": "USD"
}
},
"discount_application_index": 0
}
]
}
},
{
"id": 709875399,
"line_item_id": 466157049,
"location_id": 487838322,
"quantity": 1,
"restock_type": "legacy_restock",
"subtotal": 195.67,
"subtotal_set": {
"shop_money": {
"amount": "195.67",
"currency_code": "USD"
},
"presentment_money": {
"amount": "195.67",
"currency_code": "USD"
}
},
"total_tax": 3.98,
"total_tax_set": {
"shop_money": {
"amount": "3.98",
"currency_code": "USD"
},
"presentment_money": {
"amount": "3.98",
"currency_code": "USD"
}
},
"line_item": {
"id": 466157049,
"admin_graphql_api_id": "gid://shopify/LineItem/466157049",
"fulfillable_quantity": 0,
"fulfillment_service": "manual",
"fulfillment_status": null,
"gift_card": false,
"grams": 200,
"name": "IPod Nano - 8gb - green",
"price": "199.00",
"price_set": {
"shop_money": {
"amount": "199.00",
"currency_code": "USD"
},
"presentment_money": {
"amount": "199.00",
"currency_code": "USD"
}
},
"product_exists": true,
"product_id": 632910392,
"properties": [
{
"name": "Custom Engraving Front",
"value": "Happy Birthday"
},
{
"name": "Custom Engraving Back",
"value": "Merry Christmas"
}
],
"quantity": 1,
"requires_shipping": true,
"sku": "IPOD2008GREEN",
"taxable": true,
"title": "IPod Nano - 8gb",
"total_discount": "0.00",
"total_discount_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "USD"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "USD"
}
},
"variant_id": 39072856,
"variant_inventory_management": "shopify",
"variant_title": "green",
"vendor": null,
"tax_lines": [
{
"channel_liable": null,
"price": "3.98",
"price_set": {
"shop_money": {
"amount": "3.98",
"currency_code": "USD"
},
"presentment_money": {
"amount": "3.98",
"currency_code": "USD"
}
},
"rate": 0.06,
"title": "State Tax"
}
],
"duties": [],
"discount_allocations": [
{
"amount": "3.34",
"amount_set": {
"shop_money": {
"amount": "3.34",
"currency_code": "USD"
},
"presentment_money": {
"amount": "3.34",
"currency_code": "USD"
}
},
"discount_application_index": 0
}
]
}
}
],
"duties": [],
"additional_fees": []
}
],
"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"
},
"shipping_lines": [
{
"id": 369256396,
"carrier_identifier": null,
"code": "Free Shipping",
"delivery_category": null,
"discounted_price": "0.00",
"discounted_price_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "USD"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "USD"
}
},
"phone": null,
"price": "0.00",
"price_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "USD"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "USD"
}
},
"requested_fulfillment_service_id": null,
"source": "shopify",
"title": "Free Shipping",
"tax_lines": [],
"discount_allocations": []
}
]
},
"notice": "Order has been canceled"
}
🟠422Cancel an order
修改于 2023-01-29 12:00:33