Shopify API

Shopify is an enterprise commerce platform that's integrated with Frontastic.

The backend part of the integration is within our API documentation in GitHub. To see any updates to this library, check out our Libraries changelog.

We're using the Storefront 2021.10 version of Shopify.

In order to connect with your Shopify shop, you need to create a custom app in your Shopify admin console.

project.yml configuration

To access the APIs for Shopify, you'll need the below configuration added to your project.yml (see the project.yml article for more information):

configuration:
    shopify:
        hostUrl: # this is your Shopify api URL
        storefrontAccessToken: # this is your unique access token for Shopify
    product: # you'll need to duplicate this section for account, cart, search
        engine: shopify
    wishlist:
        engine: no-wishlist # wishlist API isn't supported with Shopify

Available methods

Account

See the AccountAPI docs for arguments, types, and other information.

AccountAPI methodAvailable?
getSalutationsstatic
confirmEmailnot supported by Shopify
createyes
updateyes
updatePasswordyes
generatePasswordResetTokennot implemented
resetPasswordnot implemented
loginyes
refreshAccountyes
getAddressesyes
addAddressyes
updateAddressyes
removeAddressnot implemented
setDefaultBillingAddressnot implemented
setDefaultShippingAddressnot implemented

Cart

See the CartAPI docs for arguments, types, and other information.

CartAPI methodsAvailable?
getForUseryes
getAnonymousyes
getByIdyes
setCustomLineItemTypenot implemented
getCustomLineItemTypenot implemented
setTaxCategorynot implemented
getTaxCategorynot implemented
addToCartyes
updateLineItemyes
removeLineItemyes
setEmailyes
setShippingMethodyes
setCustomField (deprecated)n/a
setRawApiInputnot implemented
setShippingAddressyes
setBillingAddressnot implemented
addPaymentnot implemented
updatePaymentnot implemented
redeemDiscountCodenot implemented
removeDiscountCodenot implemented
ordernot implemented
getOrderyes
getOrdersyes
startTransactionyes
commityes
getAvailableShippingMethodsyes
getShippingMethodsnot supported by Shopify

Product

See the ProductAPI docs for arguments, types, and other information.

ProductAPI methodAvailable?
queryCategoriesyes
getProductTypesyes
getProductyes

Product search

See the ProductSearchAPI docs for arguments, types, and other information.

ProductSearchAPI methodAvailable?
getSearchableAttributesyes
query (by query string)yes
query (by category)yes
query (by SKU) (deprecated)yes
query (by SKUs)yes
query (by productId) (deprecated)yes
query (by productIds)yes
query (by productType)yes
query (by filters)yes
query (facets)yes
query (sortAttributes)not implemented

Wishlist

The wishlist API isn't supported with Shopify.

Known limitations

The checkout process in Shopify is slightly different than in other backends. Shopify prefers the use of their service Shopify-payments and, in order to finish the checkout process, they provide a webUrl where the final customer can be redirected to finish the checkout. We currently store this as cart.dangerousInnerCart.webUrl

Shopify allows translating the page in different languages by installing an app where you could handle the translation (there are paid and free apps) https://help.shopify.com/en/manual/cross-border/multilingual-online-store. Once the store is translated, the content can be retrieved from the Storefront API passing the respective language into the header (for example, Accept-Language: de).