Stay up to date with the Storefront API changes

Ryan
Shopify Staff
Shopify Staff
499 42 120

Hey All!

Over the last few months, we’ve been hard at work improving the Storefront API to enable you to build custom storefronts on Shopify’s platform. The following changes are all available in the Storefront API, and we are continuously updating the JS Buy SDK and Mobile Buy SDKs to include these new changes. Check out our documentation for additional information.

 

New Features

 

Improvements

  • Handle expired Customer Access Tokens by returning `null` on requests to fetch the customer

  • Inventory validation removed from checkoutCreate

  • Customer default address id now matches one of the ids in the addresses array

  • Allow customer to login automatically via X-Shopify-Customer-Access-Token header in web checkout

  • Added error codes to customerCreate, customerUpdate and customerAccessTokenCreate mutations (more to come!)

  • Filtering for articles by the title of the blog is now possible

  • Added the ability to query for products by variant price in the Storefront API using the standard comparators

  • Added new checkout V2 mutations to avoid non-`null` checkouts

  • Updated tax calculations for Avalara to ensure taxes automatically update on checkout

 

Deprecated

  • Checkout mutations where there is a new V2 mutation to replace it: checkoutAttributesUpdateV2, checkoutCompleteWithCreditCardV2, checkoutCompleteWithTokenizedPaymentV2, checkoutCustomerAssociateV2, checkoutCustomerDisassociateV2, checkoutDiscountCodeApplyV2, checkoutEmailUpdateV2, checkoutGiftCardRemoveV2, checkoutShippingAddressUpdateV2

 

We are always looking to improve, and appreciate any feedback you have. If there is any particular functionality you are looking for, please let us know what it is, and what you are trying to accomplish by replying to this thread.

If you have any questions or need further clarification, please comment in the thread below.

 

Happy Coding!

Ryan | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

Replies 4 (4)
Sureesh
New Member
2 0 0

Hi Ryan,

 

I am exploring Storefornt API for a custom E-commerece implemantion. I am unable to find any refernce to manage cart using Storefront API. Can you please help me by pointing to some documentation where I can get details around cart management using storefront API.

 

Regards,

Sureesh

Rick_Su1
New Member
1 0 0

This is related to REST Admin API > Shipping and fulfillment > CarrierService

Could we have `email` field populated in the request when providing shipping rates to Shopify?

So that more flexible shipping rate can be calculated.

 

As stated on the page.

https://help.shopify.com/en/api/reference/shipping_and_fulfillment/carrierservice

For API-created carrier services, you should use only the following shipping address fields:

  • address1
  • address2
  • city
  • zip
  • province
  • country
  • email (can we pass this extra parameter in the request?)

Regards,

Rick

 

Javier_Estupina
Shopify Partner
1 0 0

Hey Ryan,

Right now I'm having a problem when I try to query a customer including lastIncompleteCheckout an Internal Error is thrown. If I don't include the lastIncompleteCheckout the query works fine. The problem seems to appear randomly, because most of the times it just works. How can I solve this?

Regards,

Javier

Mark_Lau
Shopify Partner
4 0 0

HI Ryan,

Just a few days ago when i was testing the store front API and i saw the total tax working when i sent over the shipping address however today the totalTax was back to 0. Can i check if i am missing something?

The following is my mutation. This product has taxes and when i view the webUrl, The taxes appears in the website

mutation {
  checkoutCreate(
	input: {
		lineItems: [
			{
				variantId: "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC83ODQ5ODUzODQ1NTU3",
				quantity: 1 
			}
		]
		shippingAddress:{
			address1: "------"
			city: "Singapore"
			firstName: "Mark"
			country:"Singapore"
			lastName: "Lau"
			zip: "----"
		}
	}
  ) {
    userErrors {
      field
      message
    }
    checkout {
       id
       webUrl
       subtotalPrice
       paymentDue
       totalTax
       taxExempt
       taxesIncluded
       lineItems(first: 5) {
         edges {
           node {
             title
             quantity
             variant {
            	product{
            		tags
            	}
             }
           }
         }
       }
    }
  }
}

Regards
Mark