3 min read
Shopify Api Clients
Poq.Backend.Shopify.Client
namespace provides Contracts and Clients that allow quick usage of Shopify API.
Contracts
Contain all necessary contracts to use Shopify clients effectively.
Clients
List of Available Clients
ShopifyAccountClient
Provides creation of user account in Shopify, accessing user account details, accessing user orders, obtain user order by id. It uses ShopifyClientConfiguration.StoreFrontAccessToken
to access Shopify Storefront Graphql API
Methods
CreateAccountAsync
creates customer account with provided parameters.UpdateAccountAsync
updates customer account. Requires customer access token.GetAccountDetailsAsync
returns customer account details. Requires customer access token.GetAccountOrdersAsync
returns customer orders.GetAccountOrderAsync
returns customer order details.DeleteAccountAsync
marks customer account as deleted.
ShopifyAddressClient
Provides CRUD operation for user addresses.
Methods
CreateAddressAsync
creates customer addressUpdateAddressAsync
updates customer addressDeleteAddressAsync
deletes customer addressListAddressesAsync
returns list of customer addressesSetDefaultAddressAsync
sets default customer addressGetAddressAsync
returns address details
ShopifyCartClient
Provides CRUD operations for carts. It uses Shopify Graphql API to manipulate shopify carts.
Methods
CreateCartAsync
creates cartCartBuyerIdentityUpdateAsync
update buyer identity of a cart. (connects certain customer to cart)CartDiscountCodesUpdateAsync
add, remove, update discount codes applied to the cartCartNoteUpdateAsync
add, remove, update cart noteCartAttributesUpdateAsync
add, remove, update cart attributes (supports customizations)CartLinesAddAsync
add cart itemsCartLinesRemoveAsync
remove cart itemCartLinesUpdateAsync
update cart itemGetCartAsync
returns cart by its idGetRawCartResponseAsync
returns HttpResponseMessage received from getCart request
ShopifyCheckoutClient
Provides creation of order with list of products inside.
Methods
CreateCheckoutAsync
creates shopify checkout with specified items and currencies.AssociateCustomerToCheckoutAsync
associates customer to shopify checkout. Resolves registered users access to shopify checkout.
ShopifyCollectionClient
This client is intended to support work with custom and smart collections defined in shopify administration.
Methods
GetCustomCollectionsAsync
obtains custom collections from Shopify Admin APIGetUpdatedCustomCollectionsAsync
obtains custom collections updated after specific data from Shopify Admin APIGetSmartCollectionsAsync
obtains smart collections from Shopify Admin APIGetUpdatedSmartCollectionsAsync
obtains smart collections updated after specific data from Shopify Admin APIGetCollectsAsync
obtains connections between product and collection from Shopify Admin APIGetCollectsByCollectionAsync
obtains products connections for specific collection from Shopify Admin APIGetCollectionsAsync
obtains collections matching search criteria(or all if no criteria is provided) from Shopify Graphql APIGetCollectionsAsync
overload of the method above that allows extending Graphql query with additional or custom fields and usage of custom contract
ShopifyIdentityClient
Provides login, logout, token renewal operations.
Methods
GetTokenAsync
obtains access token for registered user(login).TokenRenewAsync
renews customer access tokenLogoutAsync
deletes customer access token
ShopifyLocationsClient
Provides information for physical stores defined in Shopify administration
Methods
GetLocationsAsync
obtains all locations defined in administration. Uses Shopify Admin Graphql API
ShopifyMetafieldsClient
Provides information for metafields defined in Shopify administration. Uses Shopify Admin Graphql API.
Methods
SetMetafieldAsync
set metafield for object.GetMetafieldAsync
get metafield for object.GetMetafieldsAsync
get all metafields for object.
ShopifyNavigationClient
When custom code is added to shopify site this client can obtain entire navigation tree defined in shopify administration. This client is used when building category tree from feed file.
Methods
GetNavigationLayoutAsync
obtains navigation menu from shopify using custom poq template page.GetNavigationLayoutAsync
overload available to obtain navigation from development stores. (Shopify development stores require password to access all web pages)
ShopifyProductClient
Provides listing all products, get product by collectionId, get products updated after certain date. This client is used to obtain products information and generate feed file.
Methods
GetProductsByCollectionAsync
obtains product in collection from Shopify Admin Rest APIGetUpdatedProductsAsync
obtains products updated after specific date from Shopify Admin Rest APIGetUpdatedProductsByCollectionAsync
obtains products in collection updated after specific date from Shopify Admin Rest APIGetProductsAsync
obtains all products from Shopify Admin Rest API.GetProductsByCollectionIdAsync
obtains products in collection from Shopify Admin Rest APIGetProductsByIdsAsync
obtains products by their ids from Shopify Storefront Graphql APIGetProductsByIdsAsync
overload of the method above that allows extending Graphql query with additional or custom fields and usage of custom contractGetProductsByVariantIdsAsync
obtains products by variant ids from Shopify Storefront Graphql APIGetProductsByVariantIdsAsync
overload of the method above that allows extending Graphql query with additional or custom fields and usage of custom contract
ShopifySearchClient
Provides methods to search in shopify inventory by several criteria
Methods
SearchAsync
searches for products by keyword, price range and availability. Uses Shopify Storefront Graphql APISearchAsync
overload that allows extending Graphql query with additional or custom fields and usage of custom contractSearchInCollectionAsync
searches for products in certain collection by price range, availability and options filter(size, color). Uses Shopify Storefront Graphql APISearchInCollectionAsync
overload that allows extending Graphql query with additional or custom fields and usage of custom contractGetCollectionFiltersAsync
obtains available filters for certain collection. Uses Shopify Storefront Graphql APISearchByBarcodeAsync
specific search query to search by product barcode in Shopify Storefront Graphql API.SearchByBarcodeAsync
overload that allows extending Graphql query with additional or custom fields and usage of custom contract