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
CreateAccountAsynccreates customer account with provided parameters.UpdateAccountAsyncupdates customer account. Requires customer access token.GetAccountDetailsAsyncreturns customer account details. Requires customer access token.GetAccountOrdersAsyncreturns customer orders.GetAccountOrderAsyncreturns customer order details.DeleteAccountAsyncmarks customer account as deleted.
ShopifyAddressClient
Provides CRUD operation for user addresses.
Methods
CreateAddressAsynccreates customer addressUpdateAddressAsyncupdates customer addressDeleteAddressAsyncdeletes customer addressListAddressesAsyncreturns list of customer addressesSetDefaultAddressAsyncsets default customer addressGetAddressAsyncreturns address details
ShopifyCartClient
Provides CRUD operations for carts. It uses Shopify Graphql API to manipulate shopify carts.
Methods
CreateCartAsynccreates cartCartBuyerIdentityUpdateAsyncupdate buyer identity of a cart. (connects certain customer to cart)CartDiscountCodesUpdateAsyncadd, remove, update discount codes applied to the cartCartNoteUpdateAsyncadd, remove, update cart noteCartAttributesUpdateAsyncadd, remove, update cart attributes (supports customizations)CartLinesAddAsyncadd cart itemsCartLinesRemoveAsyncremove cart itemCartLinesUpdateAsyncupdate cart itemGetCartAsyncreturns cart by its idGetRawCartResponseAsyncreturns HttpResponseMessage received from getCart request
ShopifyCheckoutClient
Provides creation of order with list of products inside.
Methods
CreateCheckoutAsynccreates shopify checkout with specified items and currencies.AssociateCustomerToCheckoutAsyncassociates 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
GetCustomCollectionsAsyncobtains custom collections from Shopify Admin APIGetUpdatedCustomCollectionsAsyncobtains custom collections updated after specific data from Shopify Admin APIGetSmartCollectionsAsyncobtains smart collections from Shopify Admin APIGetUpdatedSmartCollectionsAsyncobtains smart collections updated after specific data from Shopify Admin APIGetCollectsAsyncobtains connections between product and collection from Shopify Admin APIGetCollectsByCollectionAsyncobtains products connections for specific collection from Shopify Admin APIGetCollectionsAsyncobtains collections matching search criteria(or all if no criteria is provided) from Shopify Graphql APIGetCollectionsAsyncoverload 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
GetTokenAsyncobtains access token for registered user(login).TokenRenewAsyncrenews customer access tokenLogoutAsyncdeletes customer access token
ShopifyLocationsClient
Provides information for physical stores defined in Shopify administration
Methods
GetLocationsAsyncobtains 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
SetMetafieldAsyncset metafield for object.GetMetafieldAsyncget metafield for object.GetMetafieldsAsyncget 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
GetNavigationLayoutAsyncobtains navigation menu from shopify using custom poq template page.GetNavigationLayoutAsyncoverload 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
GetProductsByCollectionAsyncobtains product in collection from Shopify Admin Rest APIGetUpdatedProductsAsyncobtains products updated after specific date from Shopify Admin Rest APIGetUpdatedProductsByCollectionAsyncobtains products in collection updated after specific date from Shopify Admin Rest APIGetProductsAsyncobtains all products from Shopify Admin Rest API.GetProductsByCollectionIdAsyncobtains products in collection from Shopify Admin Rest APIGetProductsByIdsAsyncobtains products by their ids from Shopify Storefront Graphql APIGetProductsByIdsAsyncoverload of the method above that allows extending Graphql query with additional or custom fields and usage of custom contractGetProductsByVariantIdsAsyncobtains products by variant ids from Shopify Storefront Graphql APIGetProductsByVariantIdsAsyncoverload 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
SearchAsyncsearches for products by keyword, price range and availability. Uses Shopify Storefront Graphql APISearchAsyncoverload that allows extending Graphql query with additional or custom fields and usage of custom contractSearchInCollectionAsyncsearches for products in certain collection by price range, availability and options filter(size, color). Uses Shopify Storefront Graphql APISearchInCollectionAsyncoverload that allows extending Graphql query with additional or custom fields and usage of custom contractGetCollectionFiltersAsyncobtains available filters for certain collection. Uses Shopify Storefront Graphql APISearchByBarcodeAsyncspecific search query to search by product barcode in Shopify Storefront Graphql API.SearchByBarcodeAsyncoverload that allows extending Graphql query with additional or custom fields and usage of custom contract