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
project.yml
configurationTo 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 method | Available? |
---|---|
getSalutations | static |
confirmEmail | not supported by Shopify |
create | yes |
update | yes |
updatePassword | yes |
generatePasswordResetToken | not implemented |
resetPassword | not implemented |
login | yes |
refreshAccount | yes |
getAddresses | yes |
addAddress | yes |
updateAddress | yes |
removeAddress | not implemented |
setDefaultBillingAddress | not implemented |
setDefaultShippingAddress | not implemented |
Cart
See the CartAPI docs for arguments, types, and other information.
CartAPI methods | Available? |
---|---|
getForUser | yes |
getAnonymous | yes |
getById | yes |
setCustomLineItemType | not implemented |
getCustomLineItemType | not implemented |
setTaxCategory | not implemented |
getTaxCategory | not implemented |
addToCart | yes |
updateLineItem | yes |
removeLineItem | yes |
setEmail | yes |
setShippingMethod | yes |
setCustomField (deprecated) | n/a |
setRawApiInput | not implemented |
setShippingAddress | yes |
setBillingAddress | not implemented |
addPayment | not implemented |
updatePayment | not implemented |
redeemDiscountCode | not implemented |
removeDiscountCode | not implemented |
order | not implemented |
getOrder | yes |
getOrders | yes |
startTransaction | yes |
commit | yes |
getAvailableShippingMethods | yes |
getShippingMethods | not supported by Shopify |
Product
See the ProductAPI docs for arguments, types, and other information.
ProductAPI method | Available? |
---|---|
queryCategories | yes |
getProductTypes | yes |
getProduct | yes |
Product search
See the ProductSearchAPI docs for arguments, types, and other information.
ProductSearchAPI method | Available? |
---|---|
getSearchableAttributes | yes |
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
).
Updated almost 2 years ago