Title: | An R Interface to the Shopify API |
---|---|
Description: | An interface to the Admin API of the E-commerce service Shopify, (<https://help.shopify.com/en/api/reference>). |
Authors: | Charlie Friedemann |
Maintainer: | Charlie Friedemann <[email protected]> |
License: | GPL-3 |
Version: | 1.0.0 |
Built: | 2025-03-06 02:46:39 UTC |
Source: | https://github.com/charliebone/shopifyr |
AbandonedCheckout Functions
getAbandonedCheckouts(...) getAbandonedCheckoutsCount(...)
getAbandonedCheckouts(...) getAbandonedCheckoutsCount(...)
... |
additional request parameters |
a list containing a AbandonedCheckout fields or a list of AbandonedCheckouts
Shopify API AbandonedCheckout documentation: https://help.shopify.com/api/reference/orders/abandoned_checkouts
AccessScope Functions
getAccessScopes(...)
getAccessScopes(...)
... |
additional request parameters |
a list containing an AccessScope fields or a list of AccessScopes
Shopify API AccessScope documentation: https://help.shopify.com/api/reference/access/accessscope
Announcement Functions
showAnnouncements(current = TRUE)
showAnnouncements(current = TRUE)
current |
show only non-expired announcements (default |
invisibly returns the ShopifyShop
object to allow for chaining
ApplicationCharge Functions
createApplicationCharge(charge, ...) getApplicationCharge(chargeId, ...) getApplicationCharges(...) activateApplicationCharge(charge, ...)
createApplicationCharge(charge, ...) getApplicationCharge(chargeId, ...) getApplicationCharges(...) activateApplicationCharge(charge, ...)
charge |
a list containing ApplicationCharge fields |
... |
additional request parameters |
chargeId |
an ApplicationCharge id number |
a list containing an ApplicationCharge fields or a list of ApplicationCharges
Shopify API ApplicationCharge documentation: https://help.shopify.com/api/reference/billing/applicationcharge
ApplicationCredit Functions
createApplicationCredit(credit, ...) getApplicationCredit(creditId, ...) getApplicationCredits(...)
createApplicationCredit(credit, ...) getApplicationCredit(creditId, ...) getApplicationCredits(...)
credit |
a list containing ApplicationCredit fields |
... |
additional request parameters |
creditId |
an ApplicationCredit id number |
a list containing an ApplicationCredit fields or a list of ApplicationCredits
Shopify API ApplicationCredit documentation: https://help.shopify.com/api/reference/billing/applicationcredit
Article Functions
getArticles(blogId, ...) getArticlesCount(blogId, ...) getArticle(blogId, articleId, ...) createArticle(blogId, article, ...) modifyArticle(blogId, article, ...) getArticleAuthors(...) getArticleTags(...) deleteArticle(blogId, articleId, ...)
getArticles(blogId, ...) getArticlesCount(blogId, ...) getArticle(blogId, articleId, ...) createArticle(blogId, article, ...) modifyArticle(blogId, article, ...) getArticleAuthors(...) getArticleTags(...) deleteArticle(blogId, articleId, ...)
blogId |
a |
... |
additional request parameters |
articleId |
an Article id number |
article |
a list containing Article fields |
a list containing an Article fields or a list of Articles
Shopify API Article documentation: https://help.shopify.com/api/reference/online_store/blog_article
Asset Functions
getAssets(themeId, ...) getAsset(themeId, assetKey, ...) createAsset(themeId, asset, ...) deleteAsset(themeId, assetKey, ...)
getAssets(themeId, ...) getAsset(themeId, assetKey, ...) createAsset(themeId, asset, ...) deleteAsset(themeId, assetKey, ...)
themeId |
a |
... |
additional request parameters |
assetKey |
an Asset key e.g. |
asset |
a list containing Asset fields |
a list containing an Asset fields or a list of Assets
Shopify API Asset documentation: https://help.shopify.com/api/reference/online_store/asset
Blog Functions
getBlogs(...) getBlogsCount(...) getBlog(blogId, ...) createBlog(blog, ...) modifyBlog(blog, ...) deleteBlog(blogId, ...)
getBlogs(...) getBlogsCount(...) getBlog(blogId, ...) createBlog(blog, ...) modifyBlog(blog, ...) deleteBlog(blogId, ...)
... |
additional request parameters |
blogId |
a Blog id number |
blog |
a list containing Blog fields |
a list containing a Blog fields or a list of Blogs
Shopify API Blog documentation: https://help.shopify.com/api/reference/online_store/blog
CarrierService Functions
createCarrierService(service, ...) modifyCarrierService(service, ...) getCarrierServices(...) getCarrierService(serviceId, ...) deleteCarrierService(serviceId, ...)
createCarrierService(service, ...) modifyCarrierService(service, ...) getCarrierServices(...) getCarrierService(serviceId, ...) deleteCarrierService(serviceId, ...)
service |
a list containing CarrierService fields |
... |
additional request parameters |
serviceId |
a CarrierService id number |
a list containing a CarrierService fields or a list of CarrierServices
Shopify API CarrierService documentation: https://help.shopify.com/api/reference/shipping_and_fulfillment/carrierservice
Checkout Functions
getCheckoutsCount(...) getCheckouts(...)
getCheckoutsCount(...) getCheckouts(...)
... |
additional request parameters |
a list of Checkouts
Shopify API Checkout documentation: https://help.shopify.com/api/reference/sales_channels/checkout
Collect Functions
createCollect(collect, ...) deleteCollect(collectId, ...) getCollects(...) getCollectsCount(...) getCollect(collectId, ...)
createCollect(collect, ...) deleteCollect(collectId, ...) getCollects(...) getCollectsCount(...) getCollect(collectId, ...)
collect |
a list containing Collect fields |
... |
additional request parameters |
collectId |
a Collect id number |
a list containing a Collect fields or a list of Collects
Shopify API Collect documentation: https://help.shopify.com/api/reference/products/collect
CollectionListing Functions
createCollectionListing(collectionId, ...) deleteCollectionListing(collectionListingId, ...) getCollectionListings(...) getCollectionListingCount(...) getCollectionListingProductIds(collectionListingId, ...)
createCollectionListing(collectionId, ...) deleteCollectionListing(collectionListingId, ...) getCollectionListings(...) getCollectionListingCount(...) getCollectionListingProductIds(collectionListingId, ...)
collectionId |
a Collection id |
... |
additional request parameters |
collectionListingId |
a CollectionListing id |
a list of Checkouts
a list containing a CollectionListing fields or a list of CollectionListings
Shopify API CollectionListing documentation: https://help.shopify.com/api/reference/sales-channels/collectionlisting
Comment Functions
getComments(blogId, articleId, ...) getCommentsCount(blogId, articleId, ...) getComment(commentId, ...) createComment(comment, ...) modifyComment(comment, ...) markCommentAsSpam(commentId, ...) markCommentAsNotSpam(commentId, ...) approveComment(commentId, ...) removeComment(commentId, ...) restoreComment(commentId, ...)
getComments(blogId, articleId, ...) getCommentsCount(blogId, articleId, ...) getComment(commentId, ...) createComment(comment, ...) modifyComment(comment, ...) markCommentAsSpam(commentId, ...) markCommentAsNotSpam(commentId, ...) approveComment(commentId, ...) removeComment(commentId, ...) restoreComment(commentId, ...)
blogId |
a |
articleId |
an Article id (leave blank to fetch all comments for this blog) |
... |
additional request parameters |
commentId |
a Comment id number |
comment |
a list containing Comment fields |
a list containing a Comment fields or a list of Comments
Shopify API Comment documentation: https://help.shopify.com/api/reference/online_store/comment
Country Functions
getCountries(...) getCountriesCount(...) getCountry(countryId, ...) createCountry(country, ...) modifyCountry(country, ...) deleteCountry(countryId, ...)
getCountries(...) getCountriesCount(...) getCountry(countryId, ...) createCountry(country, ...) modifyCountry(country, ...) deleteCountry(countryId, ...)
... |
additional request parameters |
countryId |
a Country id number |
country |
a list containing Country fields |
a list containing a Country fields or a list of Countrys
Shopify API Country documentation: https://help.shopify.com/api/reference/store_properties/country
CustomCollection Functions
getCustomCollections(...) getCustomCollectionsCount(...) getCustomCollection(customCollectionId, ...) createCustomCollection(customCollection, ...) modifyCustomCollection(customCollection, ...) deleteCustomCollection(customCollectionId, ...)
getCustomCollections(...) getCustomCollectionsCount(...) getCustomCollection(customCollectionId, ...) createCustomCollection(customCollection, ...) modifyCustomCollection(customCollection, ...) deleteCustomCollection(customCollectionId, ...)
... |
additional request parameters |
customCollectionId |
a CustomCollection id number |
customCollection |
a list containing CustomCollection fields |
a list containing a CustomCollection fields or a list of CustomCollections
Shopify API CustomCollection documentation: https://help.shopify.com/api/reference/products/customcollection
Customer Functions
getCustomers(...) searchCustomers(query, ...) getCustomer(customerId, ...) createCustomer(customer, ...) modifyCustomer(customer, ...) deleteCustomer(customerId, ...) getCustomersCount(...) getCustomerOrders(customerId, ...)
getCustomers(...) searchCustomers(query, ...) getCustomer(customerId, ...) createCustomer(customer, ...) modifyCustomer(customer, ...) deleteCustomer(customerId, ...) getCustomersCount(...) getCustomerOrders(customerId, ...)
... |
additional request parameters |
query |
a query string to use when searching Customer records |
customerId |
a Customer id number |
customer |
a list containing Customer fields |
a list containing a Customer fields or a list of Customers
Shopify API Customer documentation: https://help.shopify.com/api/reference/customers/customer
CustomerAddress Functions
getCustomerAddresses(customerId, ...) getCustomerAddress(customerId, customerAddressId, ...) createCustomerAddress(customerAddress, customerId, ...) modifyCustomerAddress(customerAddress, customerId, ...) deleteCustomerAddress(customerId, customerAddressId, ...) setCustomerDefaultAddress(customerId, customerAddressId, ...)
getCustomerAddresses(customerId, ...) getCustomerAddress(customerId, customerAddressId, ...) createCustomerAddress(customerAddress, customerId, ...) modifyCustomerAddress(customerAddress, customerId, ...) deleteCustomerAddress(customerId, customerAddressId, ...) setCustomerDefaultAddress(customerId, customerAddressId, ...)
customerId |
a |
... |
additional request parameters |
customerAddressId |
a CustomerAddress id number |
customerAddress |
a list containing CustomerAddress fields |
a list containing a CustomerAddress fields or a list of CustomerAddresss
Shopify API CustomerAddress documentation: https://help.shopify.com/api/reference/customers/customer_address
CustomerSavedSearch Functions
getCustomerSavedSearches(...) getCustomerSavedSearchesCount(...) getCustomerSavedSearch(customerSavedSearchId, ...) getCustomerSavedSearchResults(customerSavedSearchId, ...) createCustomerSavedSearch(customerSavedSearch, ...) modifyCustomerSavedSearch(customerSavedSearch, ...) deleteCustomerSavedSearch(customerSavedSearchId, ...)
getCustomerSavedSearches(...) getCustomerSavedSearchesCount(...) getCustomerSavedSearch(customerSavedSearchId, ...) getCustomerSavedSearchResults(customerSavedSearchId, ...) createCustomerSavedSearch(customerSavedSearch, ...) modifyCustomerSavedSearch(customerSavedSearch, ...) deleteCustomerSavedSearch(customerSavedSearchId, ...)
... |
additional request parameters |
customerSavedSearchId |
a CustomerSavedSearch id number |
customerSavedSearch |
a list containing CustomerSavedSearch fields |
a list containing a CustomerSavedSearch fields or a list of CustomerSavedSearchs
Shopify API CustomerSavedSearch documentation: https://help.shopify.com/api/reference/customers/customersavedsearch
DiscountCode Functions
createDiscountCode(priceRuleId, code, ...) modifyDiscountCode(priceRuleId, discountCode, ...) getDiscountCodes(priceRuleId, ...) getDiscountCode(priceRuleId, discountCodeId, ...) getDiscountCodeLocation(code, ...) deleteDiscountCode(priceRuleId, discountCodeId, ...) createDiscountCodesCreationJob(priceRuleId, codes, ...) getDiscountCodesCreationJob(priceRuleId, batchId, ...) getDiscountCodesFromCreationJob(priceRuleId, batchId, ...)
createDiscountCode(priceRuleId, code, ...) modifyDiscountCode(priceRuleId, discountCode, ...) getDiscountCodes(priceRuleId, ...) getDiscountCode(priceRuleId, discountCodeId, ...) getDiscountCodeLocation(code, ...) deleteDiscountCode(priceRuleId, discountCodeId, ...) createDiscountCodesCreationJob(priceRuleId, codes, ...) getDiscountCodesCreationJob(priceRuleId, batchId, ...) getDiscountCodesFromCreationJob(priceRuleId, batchId, ...)
priceRuleId |
a |
code |
one discount code string |
... |
additional request parameters |
discountCode |
a list containing DiscountCode fields |
discountCodeId |
a DiscountCode id number |
codes |
one or more discount code strings |
batchId |
an id of a DiscountCode batch job |
a list containing a DiscountCode fields or a list of DiscountCodes
Shopify API DiscountCode documentation: https://help.shopify.com/api/reference/discounts/discountcode
DraftOrder Functions
createDraftOrder(draftOrder, ...) modifyDraftOrder(draftOrder, ...) getDraftOrders(...) getDraftOrder(draftOrderId, ...) getDraftOrdersCount(...) sendDraftOrderInvoice(draftOrderId, draftOrderInvoice, ...) deleteDraftOrder(draftOrderId, ...) completeDraftOrder(draftOrderId, ...)
createDraftOrder(draftOrder, ...) modifyDraftOrder(draftOrder, ...) getDraftOrders(...) getDraftOrder(draftOrderId, ...) getDraftOrdersCount(...) sendDraftOrderInvoice(draftOrderId, draftOrderInvoice, ...) deleteDraftOrder(draftOrderId, ...) completeDraftOrder(draftOrderId, ...)
draftOrder |
a list containing DraftOrder fields |
... |
additional request parameters |
draftOrderId |
a DraftOrder id number |
draftOrderInvoice |
an list of draft order invoice fields |
a list containing a DraftOrder fields or a list of DraftOrders
Shopify API DraftOrder documentation: https://help.shopify.com/api/reference/orders/draftorder
Event Functions
getEvents(...) getEvent(eventId, ...) getEventsCount(...)
getEvents(...) getEvent(eventId, ...) getEventsCount(...)
... |
additional request parameters |
eventId |
a Event id number |
a list containing a Event fields or a list of Events
Shopify API Event documentation: https://help.shopify.com/api/reference/events/event
Fulfillment Functions
getFulfillments(orderId, ...) getFulfillmentsCount(orderId, ...) getFulfillment(orderId, fulfillmentId, ...) createFulfillment(orderId, fulfillment, ...) modifyFulfillment(orderId, fulfillment, ...) completeFulfillment(orderId, fulfillmentId, ...) cancelFulfillment(orderId, fulfillmentId, ...)
getFulfillments(orderId, ...) getFulfillmentsCount(orderId, ...) getFulfillment(orderId, fulfillmentId, ...) createFulfillment(orderId, fulfillment, ...) modifyFulfillment(orderId, fulfillment, ...) completeFulfillment(orderId, fulfillmentId, ...) cancelFulfillment(orderId, fulfillmentId, ...)
orderId |
an |
... |
additional request parameters |
fulfillmentId |
a Fulfillment id number |
fulfillment |
a list containing Fulfillment fields |
a list containing a Fulfillment fields or a list of Fulfillments
Shopify API Fulfillment documentation: https://help.shopify.com/api/reference/shipping_and_fulfillment/fulfillment
FulfillmentEvent Functions
getFulfillmentEvents(orderId, fulfillmentId, ...) getFulfillmentEvent(orderId, fulfillmentId, fulfillmentEventId, ...) createFulfillmentEvent(orderId, fulfillmentId, fulfillmentEvent, ...) deleteFulfillmentEvent(orderId, fulfillmentId, fulfillmentEventId, ...)
getFulfillmentEvents(orderId, fulfillmentId, ...) getFulfillmentEvent(orderId, fulfillmentId, fulfillmentEventId, ...) createFulfillmentEvent(orderId, fulfillmentId, fulfillmentEvent, ...) deleteFulfillmentEvent(orderId, fulfillmentId, fulfillmentEventId, ...)
orderId |
an |
fulfillmentId |
a |
... |
additional request parameters |
fulfillmentEventId |
a FulfillmentEvent id number |
fulfillmentEvent |
a list containing FulfillmentEvent fields |
a list containing a FulfillmentEvent fields or a list of FulfillmentEvents
Shopify API FulfillmentEvent documentation: https://help.shopify.com/api/reference/shipping_and_fulfillment/fulfillmentservice
FulfillmentService Functions
getFulfillmentServices(...) createFulfillmentService(fulfillmentService, ...) getFulfillmentService(fulfillmentServiceId, ...) modifyFulfillmentService(fulfillmentService, ...) deleteFulfillmentService(fulfillmentServiceId, ...)
getFulfillmentServices(...) createFulfillmentService(fulfillmentService, ...) getFulfillmentService(fulfillmentServiceId, ...) modifyFulfillmentService(fulfillmentService, ...) deleteFulfillmentService(fulfillmentServiceId, ...)
... |
additional request parameters |
fulfillmentService |
a list containing FulfillmentService fields |
fulfillmentServiceId |
a FulfillmentService id number |
a list containing a FulfillmentService fields or a list of FulfillmentServices
Shopify API FulfillmentService documentation: https://help.shopify.com/api/reference/shipping_and_fulfillment/fulfillmentservice
GiftCard Functions
getGiftCards(...) getGiftCard(giftCardId, ...) getGiftCardsCount(...) createGiftCard(giftCard, ...) modifyGiftCard(giftCard, ...) disableGiftCard(giftCardId, ...) searchGiftCards(query, ...)
getGiftCards(...) getGiftCard(giftCardId, ...) getGiftCardsCount(...) createGiftCard(giftCard, ...) modifyGiftCard(giftCard, ...) disableGiftCard(giftCardId, ...) searchGiftCards(query, ...)
... |
additional request parameters |
giftCardId |
a GiftCard id number |
giftCard |
a list containing GiftCard fields |
query |
a query string to use when searching GiftCards |
a list containing a GiftCard fields or a list of GiftCards
Shopify API GiftCard documentation: https://help.shopify.com/api/reference/products/product
Query the GraphQL Admin API
graphQlQuery(query, ..., includeExtensions = FALSE)
graphQlQuery(query, ..., includeExtensions = FALSE)
query |
a literal GraphQL query string |
... |
additional request parameters |
includeExtensions |
should the extensions portion of the graphql query results be included in the return object. Default is |
The query results
InventoryItem Functions
getInventoryItems(inventoryItemIds, ...) getInventoryItem(inventoryItemId, ...) modifyInventoryItem(inventoryItem, ...)
getInventoryItems(inventoryItemIds, ...) getInventoryItem(inventoryItemId, ...) modifyInventoryItem(inventoryItem, ...)
inventoryItemIds |
a vector of no more than 100 inventory item ids |
... |
additional request parameters |
inventoryItemId |
a InventoryItem id number |
inventoryItem |
a list containing InventoryItem fields |
a list containing a InventoryItem fields or a list of InventoryItems
Shopify API InventoryItem documentation: https://help.shopify.com/api/reference/inventory/inventoryitem
InventoryLevel Functions
getInventoryLevels(locationIds, inventoryItemIds, ...) modifyInventoryLevel(inventoryLevel, ...) deleteInventoryLevel(locationId, inventoryItemId, ...) connectInventoryItem(locationId, inventoryItemId, ...) setInventoryLevel(inventoryLevel, ...)
getInventoryLevels(locationIds, inventoryItemIds, ...) modifyInventoryLevel(inventoryLevel, ...) deleteInventoryLevel(locationId, inventoryItemId, ...) connectInventoryItem(locationId, inventoryItemId, ...) setInventoryLevel(inventoryLevel, ...)
locationIds |
a vector of |
inventoryItemIds |
a vector of |
... |
additional request parameters |
inventoryLevel |
a list containing InventoryLevel fields |
locationId |
a single |
inventoryItemId |
a single |
a list containing a InventoryLevel fields or a list of InventoryLevels
Shopify API InventoryLevel documentation: https://help.shopify.com/api/reference/inventory/inventorylevel
Location Functions
getLocations(...) getLocation(locationId, ...) getLocationsCount(...) getLocationInventoryLevels(locationId, ...)
getLocations(...) getLocation(locationId, ...) getLocationsCount(...) getLocationInventoryLevels(locationId, ...)
... |
additional request parameters |
locationId |
a Location id |
a list containing a Location fields or a list of Locations
Shopify API Location documentation: https://help.shopify.com/api/reference/inventory/location
MarketingEvent Functions
getMarketingEvents(...) getMarketingEventsCount(...) getMarketingEvent(marketingEventId, ...) createMarketingEvent(marketingEvent, ...) updateMarketingEvent(marketingEvent, ...) deleteMarketingEvent(marketingEventId, ...) createMarketingEventEngagements(marketingEventId, engagements, ...)
getMarketingEvents(...) getMarketingEventsCount(...) getMarketingEvent(marketingEventId, ...) createMarketingEvent(marketingEvent, ...) updateMarketingEvent(marketingEvent, ...) deleteMarketingEvent(marketingEventId, ...) createMarketingEventEngagements(marketingEventId, engagements, ...)
... |
additional request parameters |
marketingEventId |
a MarketingEvent id number |
marketingEvent |
a list containing MarketingEvent fields |
engagements |
a list of one or more engagements |
a list containing a MarketingEvent fields or a list of MarketingEvents
Shopify API MarketingEvent documentation: https://help.shopify.com/api/reference/marketingevent
Metafield Functions
getMetafields(resourceName, resourceId = NULL, ...) getMetafieldsCount(resourceName, resourceId = NULL, ...) getMetafield(metafieldId, ...) createMetafield(resourceName, resourceId = NULL, metafield, ...) modifyMetafield(metafield, ...) deleteMetafield(metafieldId, ...)
getMetafields(resourceName, resourceId = NULL, ...) getMetafieldsCount(resourceName, resourceId = NULL, ...) getMetafield(metafieldId, ...) createMetafield(resourceName, resourceId = NULL, metafield, ...) modifyMetafield(metafield, ...) deleteMetafield(metafieldId, ...)
resourceName |
the name of a resource e.g. |
resourceId |
the id number of the resource, if applicable (for example Shop has no id) |
... |
additional request parameters |
metafieldId |
a Metafield id number |
metafield |
a list containing Metafield fields |
a list containing a Metafield fields or a list of Metafields
Shopify API Metafield documentation: https://help.shopify.com/api/reference/metafield
Order Functions
getOrders(...) getOrder(orderId, ...) getOrdersCount(...) closeOrder(orderId, ...) openOrder(orderId, ...) cancelOrder(orderId, ...) createOrder(order, ...) modifyOrder(order, ...) deleteOrder(orderId, ...)
getOrders(...) getOrder(orderId, ...) getOrdersCount(...) closeOrder(orderId, ...) openOrder(orderId, ...) cancelOrder(orderId, ...) createOrder(order, ...) modifyOrder(order, ...) deleteOrder(orderId, ...)
... |
additional request parameters |
orderId |
a Order id number |
order |
a list containing Order fields |
a list containing a Order fields or a list of Orders
Shopify API Order documentation: https://help.shopify.com/api/reference/orders/order
OrderRisks Functions
createOrderRisk(orderId, orderRisk, ...) getOrderRisks(orderId, ...) getOrderRisk(orderId, orderRiskId, ...) modifyOrderRisk(orderId, orderRisk, ...) deleteOrderRisk(orderId, orderRiskId, ...)
createOrderRisk(orderId, orderRisk, ...) getOrderRisks(orderId, ...) getOrderRisk(orderId, orderRiskId, ...) modifyOrderRisk(orderId, orderRisk, ...) deleteOrderRisk(orderId, orderRiskId, ...)
orderId |
an |
orderRisk |
a list containing OrderRisks fields |
... |
additional request parameters |
orderRiskId |
a OrderRisks id number |
a list containing a OrderRisks fields or a list of OrderRiskss
Shopify API OrderRisks documentation: https://help.shopify.com/api/reference/orders/order_risk
Page Functions
getPages(...) getPagesCount(...) getPage(pageId, ...) createPage(page, ...) modifyPage(page, ...) deletePage(pageId, ...)
getPages(...) getPagesCount(...) getPage(pageId, ...) createPage(page, ...) modifyPage(page, ...) deletePage(pageId, ...)
... |
additional request parameters |
pageId |
a Page id number |
page |
a list containing Page fields |
a list containing a Page fields or a list of Pages
Shopify API Page documentation: https://help.shopify.com/api/reference/online_store/page
Policy Functions
getPolicies(...)
getPolicies(...)
... |
additional request parameters |
a list of Policies
Shopify API Policy documentation: https://help.shopify.com/api/reference/store-properties/policy
PriceRule Functions
getPriceRules(...) getPriceRulesCount(...) getPriceRule(priceRuleId, ...) createPriceRule(priceRule, ...) modifyPriceRule(priceRule, ...) deletePriceRule(priceRuleId, ...)
getPriceRules(...) getPriceRulesCount(...) getPriceRule(priceRuleId, ...) createPriceRule(priceRule, ...) modifyPriceRule(priceRule, ...) deletePriceRule(priceRuleId, ...)
... |
additional request parameters |
priceRuleId |
a PriceRule id number |
priceRule |
a list containing PriceRule fields |
a list containing a PriceRule fields or a list of PriceRules
Shopify API PriceRule documentation: https://help.shopify.com/api/reference/discounts/pricerule
Product Functions
getProducts(...) getProductsCount(...) getProduct(productId, ...) createProduct(product, ...) modifyProduct(product, ...) deleteProduct(productId, ...)
getProducts(...) getProductsCount(...) getProduct(productId, ...) createProduct(product, ...) modifyProduct(product, ...) deleteProduct(productId, ...)
... |
additional request parameters |
productId |
a Product id number |
product |
a list containing Product fields |
a list containing a Product fields or a list of Products
Shopify API Product documentation: https://help.shopify.com/api/reference/products/product
ProductImage Functions
getProductImages(productId, ...) getProductImagesCount(productId, ...) getProductImage(productId, imageId, ...) createProductImage(productId, image, ..., filepath) modifyProductImage(productId, image, ..., filepath) deleteProductImage(productId, imageId, ...)
getProductImages(productId, ...) getProductImagesCount(productId, ...) getProductImage(productId, imageId, ...) createProductImage(productId, image, ..., filepath) modifyProductImage(productId, image, ..., filepath) deleteProductImage(productId, imageId, ...)
productId |
a |
... |
additional request parameters |
imageId |
a ProductImage id number |
image |
a list containing ProductImage fields |
filepath |
the filepath to an image to upload |
a list containing a ProductImage fields or a list of ProductImages
Shopify API ProductImage documentation: https://help.shopify.com/api/reference/products/product_image
ProductListing Functions
getProductListings(...) getProductListingProducts(...) getProductListingsCount(...) getProductListing(productListingId, ...) createProductListing(productId, ...) deleteProductListing(productListingId, ...)
getProductListings(...) getProductListingProducts(...) getProductListingsCount(...) getProductListing(productListingId, ...) createProductListing(productId, ...) deleteProductListing(productListingId, ...)
... |
additional request parameters |
productListingId |
a ProductListing id |
productId |
a |
a list containing a ProductListing fields or a list of ProductListings
Shopify API ProductListing documentation: https://help.shopify.com/api/reference/sales-channels/productlisting
ProductVariant Functions
getProductVariants(productId, ...) getProductVariantsCount(productId, ...) getProductVariant(variantId, ...) createProductVariant(productId, variant, ...) modifyProductVariant(productId, variant, ...) deleteProductVariant(productId, variantId, ...)
getProductVariants(productId, ...) getProductVariantsCount(productId, ...) getProductVariant(variantId, ...) createProductVariant(productId, variant, ...) modifyProductVariant(productId, variant, ...) deleteProductVariant(productId, variantId, ...)
productId |
a |
... |
additional request parameters |
variantId |
a ProductVariant id number |
variant |
a list containing ProductVariant fields |
a list containing a ProductVariant fields or a list of ProductVariants
Shopify API ProductVariant documentation: https://help.shopify.com/api/reference/products/product_variant
Province Functions
getProvinces(countryId, ...) getProvincesCount(countryId, ...) getProvince(countryId, provinceId, ...) modifyProvince(countryId, province, ...)
getProvinces(countryId, ...) getProvincesCount(countryId, ...) getProvince(countryId, provinceId, ...) modifyProvince(countryId, province, ...)
countryId |
a |
... |
additional request parameters |
provinceId |
a Province id number |
province |
a list containing Province fields |
a list containing a Province fields or a list of Provinces
Shopify API Province documentation: https://help.shopify.com/api/reference/store_properties/province
RecurringApplicationCharge Functions
createRecurringCharge(charge, ...) getRecurringCharge(chargeId, ...) getRecurringCharges(...) activateRecurringCharge(charge, ...) cancelRecurringCharge(chargeId, ...)
createRecurringCharge(charge, ...) getRecurringCharge(chargeId, ...) getRecurringCharges(...) activateRecurringCharge(charge, ...) cancelRecurringCharge(chargeId, ...)
charge |
a list containing RecurringApplicationCharge fields |
... |
additional request parameters |
chargeId |
a RecurringApplicationCharge id number |
a list containing a RecurringApplicationCharge fields or a list of RecurringApplicationCharges
Shopify API RecurringApplicationCharge documentation: https://help.shopify.com/api/reference/billing/recurringapplicationcharge
Redirect Functions
getRedirects(...) getRedirectsCount(...) getRedirect(redirectId, ...) createRedirect(redirect, ...) modifyRedirect(redirect, ...) deleteRedirect(redirectId, ...)
getRedirects(...) getRedirectsCount(...) getRedirect(redirectId, ...) createRedirect(redirect, ...) modifyRedirect(redirect, ...) deleteRedirect(redirectId, ...)
... |
additional request parameters |
redirectId |
a Redirect id number |
redirect |
a list containing Redirect fields |
a list containing a Redirect fields or a list of Redirects
Shopify API Redirect documentation: https://help.shopify.com/api/reference/online_store/redirect
Refund Functions
getRefund(orderId, refundId, ...)
getRefund(orderId, refundId, ...)
orderId |
an |
refundId |
a Refund id number |
... |
additional request parameters |
a list corresponding to a Refund
Shopify API Refund documentation: https://help.shopify.com/api/reference/orders/refund
Report Functions
getReports(...) getReport(reportId, ...) createReport(report, ...) modifyReport(report, ...) deleteReport(reportId, ...)
getReports(...) getReport(reportId, ...) createReport(report, ...) modifyReport(report, ...) deleteReport(reportId, ...)
... |
additional request parameters |
reportId |
a Report id number |
report |
a list containing Report fields |
a list containing a Report fields or a list of Reports
Shopify API Report documentation: https://help.shopify.com/api/reference/analytics/report
ResourceFeedback Functions
createResourceFeedback(resourceFeedback, ...) getResourceFeedbacks(...)
createResourceFeedback(resourceFeedback, ...) getResourceFeedbacks(...)
resourceFeedback |
a list containing ResourceFeedback fields |
... |
additional request parameters |
a list containing a ResourceFeedback fields or a list of ResourceFeedbacks
Shopify API ResourceFeedback documentation: https://help.shopify.com/api/reference/sales-channels/resourcefeedback
ScriptTag Functions
getScriptTags(...) getScriptTagsCount(...) getScriptTag(scriptTagId, ...) createScriptTag(scriptTag, ...) modifyScriptTag(scriptTag, ...) deleteScriptTag(scriptTagId, ...)
getScriptTags(...) getScriptTagsCount(...) getScriptTag(scriptTagId, ...) createScriptTag(scriptTag, ...) modifyScriptTag(scriptTag, ...) deleteScriptTag(scriptTagId, ...)
... |
additional request parameters |
scriptTagId |
a ScriptTag id number |
scriptTag |
a list containing ScriptTag fields |
a list containing a ScriptTag fields or a list of ScriptTags
Shopify API ScriptTag documentation: https://help.shopify.com/api/reference/online_store/scripttag
ShippingZone Functions
getShippingZones(...)
getShippingZones(...)
... |
additional request parameters |
a list of ShippingZones
Shopify API ShippingZone documentation: https://help.shopify.com/api/reference/store-properties/shippingzone
Shop Functions
getShop(...)
getShop(...)
... |
additional request parameters |
a list corresponding to a Shop
Shopify API Shop documentation: https://help.shopify.com/api/reference/store_properties/shop
This package aims to provide an easy-to-use R interface to the Shopify API. Before using this package, it would be wise to become familiar with the official Shopify API documentation. You can find it at http://docs.shopify.com/api.
The workhorse of the package is the ShopifyShop
class.
Charlie Friedemann
The ShopifyShop
class fully encapsulates the Shopify API. It is an R6
class, and
as such is initialized via the ‘new’ function (see the example section for details).
shopURL |
the URL of your shop, as in shopname.myshopify.com |
password |
a Shopify API private app password or permanent access token (see Details) |
storeFrontToken |
a Storefront API access token |
quiet |
suppress output of API announcements |
In order to access the Shopify Admin API, users will need a set of authorized API access credentials. Tthese so-called ‘private app’ credentials can be created in the Shopify store admin section. More information about how to do this can be found here. Once the credentials are created, they remain valid and can be used in subsequent R sessions.
At the moment, the ShopifyShop
class does not support OAuth authentication. It is possible that
this may be implemented in the future. Note that users who possess a valid ‘permanent access token’
from a previous OAuth Authentication (see here) may
use it as the password
field of the ShopifyShop class as the private app password is essentially
analagous to the permanent token granted through successful OAuth authentication.
ShopifyShop$new(shopURL, password, quiet = FALSE)
if successful, will return a new ShopifyShop
object.
shopInfo
information about the shop as returned by getShop
## Not run: # Before you can access the API, you must create a ShopifyShop object using your credentials shop <- ShopifyShop$new("yourstore.myshopify.com","private_app_password") # Get all smart collections collections <- shop$getSmartCollections() # Search for customers named Bob from the United States bobs <- shop$searchCustomers("Bob country:United States") # Create a new product product <- list(title="The R Inferno", body="<b>The R Inferno</b><i>by Patrick Burns</i>", vendor="Burns Statistics", product_type="Paperback", images=list(list(src="http://www.burns-stat.com/wp-content/ uploads/2012/12/R_inferno_cover.jpg"))) newProduct <- shop$createProduct(product) ## End(Not run)
## Not run: # Before you can access the API, you must create a ShopifyShop object using your credentials shop <- ShopifyShop$new("yourstore.myshopify.com","private_app_password") # Get all smart collections collections <- shop$getSmartCollections() # Search for customers named Bob from the United States bobs <- shop$searchCustomers("Bob country:United States") # Create a new product product <- list(title="The R Inferno", body="<b>The R Inferno</b><i>by Patrick Burns</i>", vendor="Burns Statistics", product_type="Paperback", images=list(list(src="http://www.burns-stat.com/wp-content/ uploads/2012/12/R_inferno_cover.jpg"))) newProduct <- shop$createProduct(product) ## End(Not run)
SmartCollection Functions
getSmartCollections(...) getSmartCollectionsCount(...) getSmartCollection(smartCollectionId, ...) createSmartCollection(smartCollection, ...) modifySmartCollection(smartCollection, ...) orderSmartCollection(smartCollectionId, productIds, ...) deleteSmartCollection(smartCollectionId, ...)
getSmartCollections(...) getSmartCollectionsCount(...) getSmartCollection(smartCollectionId, ...) createSmartCollection(smartCollection, ...) modifySmartCollection(smartCollection, ...) orderSmartCollection(smartCollectionId, productIds, ...) deleteSmartCollection(smartCollectionId, ...)
... |
additional request parameters |
smartCollectionId |
a SmartCollection id number |
smartCollection |
a list containing SmartCollection fields |
productIds |
a vector of |
a list containing a SmartCollection fields or a list of SmartCollections
Shopify API SmartCollection documentation: https://help.shopify.com/api/reference/products/smartcollection
Theme Functions
getThemes(...) getTheme(themeId, ...) createTheme(theme, ...) modifyTheme(theme, ...) deleteTheme(themeId, ...)
getThemes(...) getTheme(themeId, ...) createTheme(theme, ...) modifyTheme(theme, ...) deleteTheme(themeId, ...)
... |
additional request parameters |
themeId |
a Theme id number |
theme |
a list containing Theme fields |
a list containing a Theme fields or a list of Themes
Shopify API Theme documentation: https://help.shopify.com/api/reference/online_store/theme
Transaction Functions
getTransactions(orderId, ...) getTransactionsCount(orderId, ...) getTransaction(orderId, transactionId, ...) createTransaction(orderId, transaction, ...)
getTransactions(orderId, ...) getTransactionsCount(orderId, ...) getTransaction(orderId, transactionId, ...) createTransaction(orderId, transaction, ...)
orderId |
an |
... |
additional request parameters |
transactionId |
a Transaction id number |
transaction |
a list containing Transaction fields |
a list containing a Transaction fields or a list of Transactions
Shopify API Transaction documentation: https://help.shopify.com/api/reference/orders/transaction
UsageCharge Functions
createUsageCharge(recurringApplicationChargeId, usageCharge, ...) getUsageCharge(recurringApplicationChargeId, usageChargeId, ...) getUsageCharges(recurringApplicationChargeId, ...)
createUsageCharge(recurringApplicationChargeId, usageCharge, ...) getUsageCharge(recurringApplicationChargeId, usageChargeId, ...) getUsageCharges(recurringApplicationChargeId, ...)
recurringApplicationChargeId |
|
usageCharge |
a list containing UsageCharge fields |
... |
additional request parameters |
usageChargeId |
a UsageCharge id number |
a list containing a UsageCharge fields or a list of UsageCharges
Shopify API UsageCharge documentation: https://help.shopify.com/api/reference/billing/usagecharge
User Functions
getUsers(...) getUser(userId, ...) getCurrentUser(...)
getUsers(...) getUser(userId, ...) getCurrentUser(...)
... |
additional request parameters |
userId |
a User id |
a list containing a User fields or a list of Users
This functionality is only available to Shopify Plus stores
Shopify API User documentation: https://help.shopify.com/api/reference/plus/user
Webhook Functions
getWebhooks(...) getWebhooksCount(...) getWebhook(webhookId, ...) createWebhook(webhook, ...) modifyWebhook(webhook, ...) deleteWebhook(webhookId, ...)
getWebhooks(...) getWebhooksCount(...) getWebhook(webhookId, ...) createWebhook(webhook, ...) modifyWebhook(webhook, ...) deleteWebhook(webhookId, ...)
... |
additional request parameters |
webhookId |
a Webhook id number |
webhook |
a list containing Webhook fields |
a list containing a Webhook fields or a list of Webhooks
Shopify API Webhook documentation: https://help.shopify.com/api/reference/events/webhook