Release date | Date version is no longer supported |
---|---|
July 1, 2022 | July 1, 2023 |
As of API version 2022-07, you use the GraphQL Admin API to create a new discount type in your app. Learn how.
New types
AppDiscountType
object was addedAppDiscountTypes
object was addedDiscountAutomaticApp
object was addedDiscountAutomaticAppInput
input object was addedDiscountCodeApp
object was addedDiscountCodeAppInput
input object was addedHasMetafields
interface was added to DiscountAutomaticNode
objectHasMetafields
interface was added to DiscountCodeNode
objectHasMetafields
interface was added to DiscountNode
objectHasMetafieldDefinitions
interface was added to DiscountAutomaticNode
objectHasMetafieldDefinitions
interface was added to DiscountCodeNode
objectHasMetafieldDefinitions
interface was added to DiscountNode
objectDISCOUNT
value was added to MetafieldOwnerType
enumNew mutations
DiscountCodeAppCreate
mutation was addedDiscountCodeAppUpdate
mutation was addedDiscountAutomaticAppCreate
mutation was addedDiscountAutomaticAppUpdate
mutation was addedAs of API version 2022-07, you can use the GraphQL Admin API to create discount combinations in your app.
New types
AppDiscountType
object was addedAppDiscountTypes
object was addedDiscountAutomaticApp
object was addedDiscountAutomaticAppInput
input object was addedDiscountCombinesWith
object was addedDiscountCombinesWithInput
input object was addedDiscountClass
enum was addedDiscountNode
object was addedDiscountNodeConnection
connection was addedDiscountNodeEdge
object was addedDiscountSortKeys
enum was addedMerchandiseDiscountClass
enum was addedShippingDiscountClass
enum was addedNew fields
combinesWith
and discountClass
fields were added to the following objects:
DiscountAutomaticBasic
DiscountAutomaticBxgy
DiscountCodeBasic
DiscountCodeBxgy
DiscountCodeFreeShipping
PriceRule
New mutations
discountAutomaticAppCreate
mutation was addeddiscountAutomaticAppUpdate
mutation was addedAs of API version 2022-07, you can connect Braintree as a legacy subscription payment gateway and migrate each pay-as-you-go contract to Shopify. After the migration, you'll use Shopify Payments as the primary payment gateway. For more information, refer to Migrating existing subscription contracts to Shopify.
New types
CustomerPaymentMethodRemoteInput
input object was addedNew error codes
braintree_not_enabled_for_subscriptions
error code was added to CustomerPaymentMethodRemoteUserErrorCode
enumAs of API version 2022-07, you can set checkout charges for deferred purchase options to secure customers' commitments to orders before the orders are fulfilled. The remaining balance amount is charged at a later date.
New fields
checkoutCharge
field was added to SellingPlan
objectcheckoutChargeAmount
field was added to CartEstimatedCost
objectcheckoutChargeAmount
field was added to SellingPlanAllocation
objectremainingBalanceChargeAmount
field was added to SellingPlanAllocation
objectNew types
SellingPlanCheckoutCharge
object was addedSellingPlanCheckoutChargeValue
union was addedSellingPlanCheckoutChargeType
enum was addedAs of API version 2022-07, you can use the GraphQL Admin API to query customer statistics like predicted spend.
New types
CustomerStatistics
object was addedCustomerPredictedSpendTier
enum was added to CustomerStatistics
objectNew fields
predictedSpendTier
field was added to CustomerStatistics
objectstatistics
field was added to Customer
object
As of API version 2022-07, you can use the GraphQL Admin API to set the latest date and time by which fulfillment orders need to be fulfilled.
New types
FulfillmentOrdersSetFulfillmentDeadlinePayload
payload was addedFulfillmentOrdersSetFulfillmentDeadlineUserErrorCode
enum was addedNew mutation
fulfillmentOrdersSetFulfillmentDeadline
mutation was addedNew error code
FULFILLMENT_ORDERS_NOT_FOUND
error code was added to FulfillmentOrdersSetFulfillmentDeadlineUserErrorCode
enumAs of API version 2022-07, you can use the GraphQL Admin API to create and manage deferred purchase options to provide merchants and customers with various ways to sell and buy products, beyond the "buy now, pay now, and ship now" experience and subscriptions. Shopify supports pre-orders and try before you buys as use cases for deferred purchase options.
There's no single API to create a specific deferred purchase option. Instead, a deferred purchase option has configurations for pricing, delivery, inventory, and billing policies. For more information, refer to Deferred purchase options.
New fields
category
field was added to SellingPlan
objectinventoryPolicy
field was added to SellingPlan
objectfixed
field was added to SellingPlanBillingPolicyInput
objectfixed
field was added to SellingPlanDeliveryPolicyInput
objectNew types
SellingPlanCheckoutCharge
object was addedSellingPlanCheckoutChargePercentageValue
object was addedSellingPlanFixedBillingPolicy
object was addedSellingPlanFixedBillingPolicyInput
input object was addedSellingPlanFixedDeliveryPolicy
object was addedSellingPlanFixedDeliveryPolicyInput
input object was addedSellingPlanInventoryPolicyInput
input object was addedSellingPlanCheckoutChargeInput
input object was addedSellingPlanCheckoutChargeValueInput
input object was addedSellingPlanCheckoutChargeType
enum was addedSellingPlanCheckoutChargeValue
union was addedSellingPlanCategory
enum was addedSellingPlanRemainingBalanceChargeTrigger
enum was addedSellingPlanFulfillmentTrigger
enum was addedSellingPlanFixedDeliveryPolicyIntent
enum was addedSellingPlanFixedDeliveryPolicyPreAnchorBehavior
enum was addedSellingPlanReserve
enum was addedNew error codes
BILLING_AND_DELIVERY_POLICY_TYPES_MUST_BE_THE_SAME
error code was added to SellingPlanGroupUserErrorCode
enumCHECKOUT_CHARGE_VALUE_AND_TYPE_MUST_MATCH
error code was added to SellingPlanGroupUserErrorCode
enumFULFILLMENT_EXACT_TIME_NOT_ALLOWED
error code was added to SellingPlanGroupUserErrorCode
enumINCLUSION
error code was added to SellingPlanGroupUserErrorCode
enumNOT_FOUND
error code was added to SellingPlanGroupUserErrorCode
enumONLY_NEED_ONE_BILLING_POLICY_TYPE
error code was added to SellingPlanGroupUserErrorCode
enumFULFILLMENT_EXACT_TIME_REQUIRED
error code was added to SellingPlanGroupUserErrorCode
enumONLY_NEED_ONE_CHECKOUT_CHARGE_VALUE
error code was added to SellingPlanGroupUserErrorCode
enumONLY_NEED_ONE_DELIVERY_POLICY_TYPE
error code was added to SellingPlanGroupUserErrorCode
enumONLY_ONE_OF_FIXED_OR_RECURRING_BILLING
error code was added to SellingPlanGroupUserErrorCode
enumONLY_ONE_OF_FIXED_OR_RECURRING_DELIVERY
error code was added to SellingPlanGroupUserErrorCode
enumREMAINING_BALANCE_CHARGE_EXACT_TIME_NOT_ALLOWED
error code was added to SellingPlanGroupUserErrorCode
enumREMAINING_BALANCE_CHARGE_EXACT_TIME_REQUIRED
error code was added to SellingPlanGroupUserErrorCode
enumREMAINING_BALANCE_CHARGE_TIME_AFTER_CHECKOUT_MUST_BE_GREATER_THAN_ZERO
error code was added to SellingPlanGroupUserErrorCode
enumREMAINING_BALANCE_CHARGE_TRIGGER_NO_REMAINING_BALANCE_ON_PARTIAL_PERCENTAGE_CHECKOUT_CHARGE
error code was added to SellingPlanGroupUserErrorCode
enumREMAINING_BALANCE_CHARGE_TRIGGER_NO_REMAINING_BALANCE_ON_PRICE_CHECKOUT_CHARGE
error code was added to SellingPlanGroupUserErrorCode
enumREMAINING_BALANCE_CHARGE_TRIGGER_ON_FULL_CHECKOUT
error code was added to SellingPlanGroupUserErrorCode
enumSELLING_PLAN_ANCHORS_NOT_ALLOWED
error code was added to SellingPlanGroupUserErrorCode
enumSELLING_PLAN_ANCHORS_REQUIRED
error code was added to SellingPlanGroupUserErrorCode
enumSELLING_PLAN_FIXED_PRICING_POLICIES_LIMIT
error code was added to SellingPlanGroupUserErrorCode
enumTOO_BIG
error code was added to SellingPlanGroupUserErrorCode
enumWRONG_LENGTH
error code was added to SellingPlanGroupUserErrorCode
enumAs of API version 2022-07, you can use the GraphQL Admin API to create a delegate access token. A delegate access token is an access token with a subset of the total permissions of an app.
For more information, refer to Delegate OAuth access tokens to subsystems.
New mutation
delegateAccessTokenCreate
mutation was added%
As of API version 2022-07, you can use the GraphQL Admin API to hold fulfillments on unvalidated mailing addresses and ensure merchants check prior to requesting fulfillment.
As of API version 2022-07, you can use the GraphQL Admin API fulfillmentOrderRejectFulfillmentRequest
mutation has improved rejections with optional arguments.
For more information, refer to the changelog post.
New fields
warnings
field was added to FulfillmentOrderLineItem
objectNew arguments
reason
argument was added to fulfillmentOrderRejectFulfillmentRequest
mutationlineItems
argument was added to fulfillmentOrderRejectFulfillmentRequest
mutation
Use the GraphQL Admin API to specify the Multipurpose Internet Mail Extensions (MIME) type of generic files being created, updated, or deleted. Response bodies return either nil
or the MIME type of the generic file, such as model/usd
or application/pdf
.
New field
mimeType
was added to GenericFile
objectA payment mandate is the payment method and permission that a customer gives to the merchant to debit money. As of API version 2022-07, you can use the GraphQL Admin API to use a customer's payment mandate to trigger a payment for the remaining balance on an order or create a payment schedule. For more information, refer to Charging the remaining balance.
As of API version 2022-07, you can use the GraphQL Admin API to manage dispute evidence.
New fields
dispute
field was added to QueryRoot
disputeEvidence
field was added to QueryRoot
New types
ShopifyPaymentsDisputeEvidence
object was addedShopifyPaymentsDisputeFileUpload
object was addedShopifyPaymentsDisputeFulfillment
object was addedShopifyPaymentsDisputeEvidenceUpdateInput
input object was addedShopifyPaymentsDisputeFileUploadUpdateInput
input object was addedShopifyPaymentsDisputeEvidenceFileType
enum was addedNew mutations
disputeEvidenceUpdate
mutation was addedAs of API version 2022-07, the following types and mutations have been removed from the GraphQL Admin API:
Removed types
DraftFulfillment
: Use FulfillmentOrder
instead.Removed mutations
fulfillmentCreate
: Use fulfillmentCreateV2
instead.fulfillmentTrackingInfoUpdate
: Use fulfillmentTrackingInfoUpdateV2
instead.As of API version 2022-07, you can use the GraphQL Admin API to specify a fixed cutoff day in subscription apps.
New fields
cutoffDay
field was added to SellingPlanAnchorInput
input objectcutoffDay
field was added to SellingPlanAnchor
objectAs of API version 2022-07, you can use the GraphQL Admin API to permit a Stock Keeping Unit (SKU) to be stocked at multiple fulfillment services or merchant-managed locations.
New fields
permitsSkuSharing
field was added to FulfillmentService
objectNew arguments
permitsSkuSharing
argument was added to fulfillmentServiceCreate
mutationpermitsSkuSharing
argument was added to fulfillmentServiceUpdate
mutationAs of API version 2022-07, the phone
field of the delivery address for a subscription is validated on the subscriptionContractCreate
and subscriptionDraftUpdate
mutations.
The validation enables you to confirm that a phone number is properly formatted and prevents errors that might occur when processing subscription payments with invalid data.
As of API version 2022-07, you can extend the trial of an app subscription with the AppSubscriptionTrialExtend mutation.
For usage-based app subscriptions, you can now subscribe to the app_subscriptions/approaching_capped_amount
webhook topic to get notified when the balance used on an app subscription crosses 90% of the capped amount.
API version 2022-07 enables you to set the replacement behavior for a merchant with an existing subscription by using the replacementBehavior
argument that was added to the appSubscriptionCreate
mutation. For example you can set the behavior to immediately cancel the merchant's current app subscription and replace it with the newly created app subscription.
New argument
replacementBehavior
argument was added to appSubscriptionCreate
mutationNew type
AppSubscriptionReplacementBehavior
enum was addedNew mutation
AppSubscriptionTrialExtend
mutation was addedAs of API version 2022-07, you can query the Cart
object to retrieve the total number of items in a cart (totalQuantity
).
You can also query the CartLineEstimatedCost
object to retrieve the unit price (amount
) and the unit price comparisons with other sellers (compareAtAmount
) of a merchandise line in a cart. For more information, refer to Support international pricing on storefronts.
Additionally, you can query the attribute
field on the Cart
and CartLine
objects to retrieve attributes associated with the entire cart, or with a cart line.
Breaking changes
The estimatedCost
field on the Cart
and CartLine
objects has been deprecated. Use cost
insteed to determine the estimated cost that the buyer will pay at checkout.
The 2022-07 version of the Storefront API also changes how discountAllocations
on the Cart
and CartLine
objects are returned:
Cart.discountAllocations
now returns discount allocations that are applied to the entire Cart
.CartLine.discountAllocations
now only returns discount allocations that are applied to the specific CartLine
.CartLine.total
now reflects the line total with only line-level discounts applied. It doesn't include discounts applied to the entire Cart
.New fields
attribute
field was added to Cart
objectattribute
field was added to CartLine
objectdiscountAllocations
field was added to Cart
objectcost
field was added to Cart
objectcost
field was added to CartLine
objecttotalQuantity
field was added to Cart
objectamount
field was added to CartLineEstimatedCost
objectcompareAtAmount
field was added to CartLineEstimatedCost
objectDeprecated fields
estimatedCost
field has been deprecated on the Cart
objectestimatedCost
field has been deprecated on the CartLine
objectAs of API version 2022-07, the HasMetafields.metafields
paginated connection is deprecated. Previously, this connection enabled you to paginate over all visible metafields in a given resource.
HasMetafields.metafields
now accepts a list of metafield namespaces and keys, and returns a list of associated metafields that match the given namespaces and keys.
For more information, refer to the HasMetafields
interface.
As of API version 2022-07, the following mutations have been removed from the Storefront API:
checkoutGiftCardApply
: Use checkoutGiftCardAppend instead.checkoutGiftCardRemove
: Use checkoutGiftCardRemoveV2 instead.checkoutEmailUpdate
: Use checkoutEmailUpdateV2 instead.checkoutDiscountCodeApply
: Use checkoutDiscountCodeApplyV2 instead.checkoutCustomerAssociate
: Use checkoutCustomerAssociateV2 instead.checkoutCustomerDisassociate
: Use checkoutCustomerDisassociateV2 instead.checkoutCompleteWithTokenizedPayment
: Use checkoutCompleteWithTokenizedPaymentV3 instead.checkoutCompleteWithTokenizedPaymentV2
: Use checkoutCompleteWithTokenizedPaymentV3 instead.checkoutShippingAddressUpdate
: Use checkoutShippingAddressUpdateV2 instead.checkoutCompleteWithCreditCard
: Use checkoutCompleteWithCreditCardV2 instead.checkoutAttributesUpdate
: Use checkoutAttributesUpdateV2 instead.As of API version 2022-07, you can query the urlRedirect
object to retrieve information about a URL redirect on an online store. For example, you can query both the URL that users are redirected from and the URL where users will be redirected to.
New type
UrlRedirect
object was addedNew connection
urlRedirects
connection was added to QueryRoot
As of API version 2022-07, the following Function APIs for discounts are available:
Learn how to use a Function API to create a new discount type for merchants.
As of API version 2022-07, the /set_fulfillment_orders_deadline
endpoint has been added to the FulfillmentOrder resource. You can use this endpoint to set the latest date and time by which fulfillment orders need to be fulfilled.
As of API version 2022-07, you can use the Rest Admin API to manage dispute evidence.
New resources
dispute_evidences
resource was addeddispute_file_uploads
resource was addedNew endpoints
show
endpoint was added to dispute_evidences
resourceupdate
endpoint was added to dispute_evidences
resourcecreate
endpoint was added to dispute_file_uploads
resourcedestroy
endpoint was added to dispute_file_uploads
resourceAs of API version 2022-07, the following endpoints have been removed from the Fulfillment
resource in the REST Admin API:
POST /orders/{order_id}/fulfillments.json
PUT/PATCH /orders/{order_id}/fulfillments/{fulfillment_id}.json
POST /orders/{order_id}/fulfillments/{fulfillment_id}/complete.json
POST /orders/{order_id}/fulfillments/{fulfillment_id}/open.json
POST /orders/{order_id}/fulfillments/{fulfillment_id}/cancel.json
Use the FulfillmentOrder
resource instead.
As of API version 2022-07, you can use the REST Admin API to permit a Stock Keeping Unit (SKU) to be stocked at multiple fulfillment services or merchant-managed locations.
New properties
permits_sku_sharing
property was added to FulfillmentService
resourceThe REST Admin API no longer supports XML-format responses and payloads. Requests that expect an XML response will result in a 404
error. Requests that send an XML payload will result in a 415
error.
If you're using XML for REST Admin API requests and payloads, then you need to switch to using JSON format.