Package 'shopifyr'

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

Help Index


AbandonedCheckout Functions

Description

AbandonedCheckout Functions

Usage

getAbandonedCheckouts(...)

getAbandonedCheckoutsCount(...)

Arguments

...

additional request parameters

Value

a list containing a AbandonedCheckout fields or a list of AbandonedCheckouts

References

Shopify API AbandonedCheckout documentation: https://help.shopify.com/api/reference/orders/abandoned_checkouts


AccessScope Functions

Description

AccessScope Functions

Usage

getAccessScopes(...)

Arguments

...

additional request parameters

Value

a list containing an AccessScope fields or a list of AccessScopes

References

Shopify API AccessScope documentation: https://help.shopify.com/api/reference/access/accessscope


Announcement Functions

Description

Announcement Functions

Usage

showAnnouncements(current = TRUE)

Arguments

current

show only non-expired announcements (default TRUE)

Value

invisibly returns the ShopifyShop object to allow for chaining


ApplicationCharge Functions

Description

ApplicationCharge Functions

Usage

createApplicationCharge(charge, ...)

getApplicationCharge(chargeId, ...)

getApplicationCharges(...)

activateApplicationCharge(charge, ...)

Arguments

charge

a list containing ApplicationCharge fields

...

additional request parameters

chargeId

an ApplicationCharge id number

Value

a list containing an ApplicationCharge fields or a list of ApplicationCharges

References

Shopify API ApplicationCharge documentation: https://help.shopify.com/api/reference/billing/applicationcharge


ApplicationCredit Functions

Description

ApplicationCredit Functions

Usage

createApplicationCredit(credit, ...)

getApplicationCredit(creditId, ...)

getApplicationCredits(...)

Arguments

credit

a list containing ApplicationCredit fields

...

additional request parameters

creditId

an ApplicationCredit id number

Value

a list containing an ApplicationCredit fields or a list of ApplicationCredits

References

Shopify API ApplicationCredit documentation: https://help.shopify.com/api/reference/billing/applicationcredit


Article Functions

Description

Article Functions

Usage

getArticles(blogId, ...)

getArticlesCount(blogId, ...)

getArticle(blogId, articleId, ...)

createArticle(blogId, article, ...)

modifyArticle(blogId, article, ...)

getArticleAuthors(...)

getArticleTags(...)

deleteArticle(blogId, articleId, ...)

Arguments

blogId

a Blog id number

...

additional request parameters

articleId

an Article id number

article

a list containing Article fields

Value

a list containing an Article fields or a list of Articles

References

Shopify API Article documentation: https://help.shopify.com/api/reference/online_store/blog_article


Asset Functions

Description

Asset Functions

Usage

getAssets(themeId, ...)

getAsset(themeId, assetKey, ...)

createAsset(themeId, asset, ...)

deleteAsset(themeId, assetKey, ...)

Arguments

themeId

a Theme id number

...

additional request parameters

assetKey

an Asset key e.g. "templates/index.liquid"

asset

a list containing Asset fields

Value

a list containing an Asset fields or a list of Assets

References

Shopify API Asset documentation: https://help.shopify.com/api/reference/online_store/asset


Blog Functions

Description

Blog Functions

Usage

getBlogs(...)

getBlogsCount(...)

getBlog(blogId, ...)

createBlog(blog, ...)

modifyBlog(blog, ...)

deleteBlog(blogId, ...)

Arguments

...

additional request parameters

blogId

a Blog id number

blog

a list containing Blog fields

Value

a list containing a Blog fields or a list of Blogs

References

Shopify API Blog documentation: https://help.shopify.com/api/reference/online_store/blog


CarrierService Functions

Description

CarrierService Functions

Usage

createCarrierService(service, ...)

modifyCarrierService(service, ...)

getCarrierServices(...)

getCarrierService(serviceId, ...)

deleteCarrierService(serviceId, ...)

Arguments

service

a list containing CarrierService fields

...

additional request parameters

serviceId

a CarrierService id number

Value

a list containing a CarrierService fields or a list of CarrierServices

References

Shopify API CarrierService documentation: https://help.shopify.com/api/reference/shipping_and_fulfillment/carrierservice


Checkout Functions

Description

Checkout Functions

Usage

getCheckoutsCount(...)

getCheckouts(...)

Arguments

...

additional request parameters

Value

a list of Checkouts

References

Shopify API Checkout documentation: https://help.shopify.com/api/reference/sales_channels/checkout


Collect Functions

Description

Collect Functions

Usage

createCollect(collect, ...)

deleteCollect(collectId, ...)

getCollects(...)

getCollectsCount(...)

getCollect(collectId, ...)

Arguments

collect

a list containing Collect fields

...

additional request parameters

collectId

a Collect id number

Value

a list containing a Collect fields or a list of Collects

References

Shopify API Collect documentation: https://help.shopify.com/api/reference/products/collect


CollectionListing Functions

Description

CollectionListing Functions

Usage

createCollectionListing(collectionId, ...)

deleteCollectionListing(collectionListingId, ...)

getCollectionListings(...)

getCollectionListingCount(...)

getCollectionListingProductIds(collectionListingId, ...)

Arguments

collectionId

a Collection id

...

additional request parameters

collectionListingId

a CollectionListing id

Value

a list of Checkouts

a list containing a CollectionListing fields or a list of CollectionListings

References

Shopify API CollectionListing documentation: https://help.shopify.com/api/reference/sales-channels/collectionlisting


Comment Functions

Description

Comment Functions

Usage

getComments(blogId, articleId, ...)

getCommentsCount(blogId, articleId, ...)

getComment(commentId, ...)

createComment(comment, ...)

modifyComment(comment, ...)

markCommentAsSpam(commentId, ...)

markCommentAsNotSpam(commentId, ...)

approveComment(commentId, ...)

removeComment(commentId, ...)

restoreComment(commentId, ...)

Arguments

blogId

a Blog id (leave blank to fetch all comments for the shop)

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

Value

a list containing a Comment fields or a list of Comments

References

Shopify API Comment documentation: https://help.shopify.com/api/reference/online_store/comment


Country Functions

Description

Country Functions

Usage

getCountries(...)

getCountriesCount(...)

getCountry(countryId, ...)

createCountry(country, ...)

modifyCountry(country, ...)

deleteCountry(countryId, ...)

Arguments

...

additional request parameters

countryId

a Country id number

country

a list containing Country fields

Value

a list containing a Country fields or a list of Countrys

References

Shopify API Country documentation: https://help.shopify.com/api/reference/store_properties/country


CustomCollection Functions

Description

CustomCollection Functions

Usage

getCustomCollections(...)

getCustomCollectionsCount(...)

getCustomCollection(customCollectionId, ...)

createCustomCollection(customCollection, ...)

modifyCustomCollection(customCollection, ...)

deleteCustomCollection(customCollectionId, ...)

Arguments

...

additional request parameters

customCollectionId

a CustomCollection id number

customCollection

a list containing CustomCollection fields

Value

a list containing a CustomCollection fields or a list of CustomCollections

References

Shopify API CustomCollection documentation: https://help.shopify.com/api/reference/products/customcollection


Customer Functions

Description

Customer Functions

Usage

getCustomers(...)

searchCustomers(query, ...)

getCustomer(customerId, ...)

createCustomer(customer, ...)

modifyCustomer(customer, ...)

deleteCustomer(customerId, ...)

getCustomersCount(...)

getCustomerOrders(customerId, ...)

Arguments

...

additional request parameters

query

a query string to use when searching Customer records

customerId

a Customer id number

customer

a list containing Customer fields

Value

a list containing a Customer fields or a list of Customers

References

Shopify API Customer documentation: https://help.shopify.com/api/reference/customers/customer


CustomerAddress Functions

Description

CustomerAddress Functions

Usage

getCustomerAddresses(customerId, ...)

getCustomerAddress(customerId, customerAddressId, ...)

createCustomerAddress(customerAddress, customerId, ...)

modifyCustomerAddress(customerAddress, customerId, ...)

deleteCustomerAddress(customerId, customerAddressId, ...)

setCustomerDefaultAddress(customerId, customerAddressId, ...)

Arguments

customerId

a Customer id

...

additional request parameters

customerAddressId

a CustomerAddress id number

customerAddress

a list containing CustomerAddress fields

Value

a list containing a CustomerAddress fields or a list of CustomerAddresss

References

Shopify API CustomerAddress documentation: https://help.shopify.com/api/reference/customers/customer_address


CustomerSavedSearch Functions

Description

CustomerSavedSearch Functions

Usage

getCustomerSavedSearches(...)

getCustomerSavedSearchesCount(...)

getCustomerSavedSearch(customerSavedSearchId, ...)

getCustomerSavedSearchResults(customerSavedSearchId, ...)

createCustomerSavedSearch(customerSavedSearch, ...)

modifyCustomerSavedSearch(customerSavedSearch, ...)

deleteCustomerSavedSearch(customerSavedSearchId, ...)

Arguments

...

additional request parameters

customerSavedSearchId

a CustomerSavedSearch id number

customerSavedSearch

a list containing CustomerSavedSearch fields

Value

a list containing a CustomerSavedSearch fields or a list of CustomerSavedSearchs

References

Shopify API CustomerSavedSearch documentation: https://help.shopify.com/api/reference/customers/customersavedsearch


DiscountCode Functions

Description

DiscountCode Functions

Usage

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, ...)

Arguments

priceRuleId

a PriceRule id

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

Value

a list containing a DiscountCode fields or a list of DiscountCodes

References

Shopify API DiscountCode documentation: https://help.shopify.com/api/reference/discounts/discountcode


DraftOrder Functions

Description

DraftOrder Functions

Usage

createDraftOrder(draftOrder, ...)

modifyDraftOrder(draftOrder, ...)

getDraftOrders(...)

getDraftOrder(draftOrderId, ...)

getDraftOrdersCount(...)

sendDraftOrderInvoice(draftOrderId, draftOrderInvoice, ...)

deleteDraftOrder(draftOrderId, ...)

completeDraftOrder(draftOrderId, ...)

Arguments

draftOrder

a list containing DraftOrder fields

...

additional request parameters

draftOrderId

a DraftOrder id number

draftOrderInvoice

an list of draft order invoice fields

Value

a list containing a DraftOrder fields or a list of DraftOrders

References

Shopify API DraftOrder documentation: https://help.shopify.com/api/reference/orders/draftorder


Event Functions

Description

Event Functions

Usage

getEvents(...)

getEvent(eventId, ...)

getEventsCount(...)

Arguments

...

additional request parameters

eventId

a Event id number

Value

a list containing a Event fields or a list of Events

References

Shopify API Event documentation: https://help.shopify.com/api/reference/events/event


Fulfillment Functions

Description

Fulfillment Functions

Usage

getFulfillments(orderId, ...)

getFulfillmentsCount(orderId, ...)

getFulfillment(orderId, fulfillmentId, ...)

createFulfillment(orderId, fulfillment, ...)

modifyFulfillment(orderId, fulfillment, ...)

completeFulfillment(orderId, fulfillmentId, ...)

cancelFulfillment(orderId, fulfillmentId, ...)

Arguments

orderId

an Orderid number

...

additional request parameters

fulfillmentId

a Fulfillment id number

fulfillment

a list containing Fulfillment fields

Value

a list containing a Fulfillment fields or a list of Fulfillments

References

Shopify API Fulfillment documentation: https://help.shopify.com/api/reference/shipping_and_fulfillment/fulfillment


FulfillmentEvent Functions

Description

FulfillmentEvent Functions

Usage

getFulfillmentEvents(orderId, fulfillmentId, ...)

getFulfillmentEvent(orderId, fulfillmentId, fulfillmentEventId, ...)

createFulfillmentEvent(orderId, fulfillmentId, fulfillmentEvent, ...)

deleteFulfillmentEvent(orderId, fulfillmentId, fulfillmentEventId, ...)

Arguments

orderId

an Order id

fulfillmentId

a Fulfillment id

...

additional request parameters

fulfillmentEventId

a FulfillmentEvent id number

fulfillmentEvent

a list containing FulfillmentEvent fields

Value

a list containing a FulfillmentEvent fields or a list of FulfillmentEvents

References

Shopify API FulfillmentEvent documentation: https://help.shopify.com/api/reference/shipping_and_fulfillment/fulfillmentservice


FulfillmentService Functions

Description

FulfillmentService Functions

Usage

getFulfillmentServices(...)

createFulfillmentService(fulfillmentService, ...)

getFulfillmentService(fulfillmentServiceId, ...)

modifyFulfillmentService(fulfillmentService, ...)

deleteFulfillmentService(fulfillmentServiceId, ...)

Arguments

...

additional request parameters

fulfillmentService

a list containing FulfillmentService fields

fulfillmentServiceId

a FulfillmentService id number

Value

a list containing a FulfillmentService fields or a list of FulfillmentServices

References

Shopify API FulfillmentService documentation: https://help.shopify.com/api/reference/shipping_and_fulfillment/fulfillmentservice


GiftCard Functions

Description

GiftCard Functions

Usage

getGiftCards(...)

getGiftCard(giftCardId, ...)

getGiftCardsCount(...)

createGiftCard(giftCard, ...)

modifyGiftCard(giftCard, ...)

disableGiftCard(giftCardId, ...)

searchGiftCards(query, ...)

Arguments

...

additional request parameters

giftCardId

a GiftCard id number

giftCard

a list containing GiftCard fields

query

a query string to use when searching GiftCards

Value

a list containing a GiftCard fields or a list of GiftCards

References

Shopify API GiftCard documentation: https://help.shopify.com/api/reference/products/product


Query the GraphQL Admin API

Description

Query the GraphQL Admin API

Usage

graphQlQuery(query, ..., includeExtensions = FALSE)

Arguments

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 FALSE

Value

The query results


InventoryItem Functions

Description

InventoryItem Functions

Usage

getInventoryItems(inventoryItemIds, ...)

getInventoryItem(inventoryItemId, ...)

modifyInventoryItem(inventoryItem, ...)

Arguments

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

Value

a list containing a InventoryItem fields or a list of InventoryItems

References

Shopify API InventoryItem documentation: https://help.shopify.com/api/reference/inventory/inventoryitem


InventoryLevel Functions

Description

InventoryLevel Functions

Usage

getInventoryLevels(locationIds, inventoryItemIds, ...)

modifyInventoryLevel(inventoryLevel, ...)

deleteInventoryLevel(locationId, inventoryItemId, ...)

connectInventoryItem(locationId, inventoryItemId, ...)

setInventoryLevel(inventoryLevel, ...)

Arguments

locationIds

a vector of Location ids

inventoryItemIds

a vector of InventoryItem ids

...

additional request parameters

inventoryLevel

a list containing InventoryLevel fields

locationId

a single Location id

inventoryItemId

a single InventoryItem id

Value

a list containing a InventoryLevel fields or a list of InventoryLevels

References

Shopify API InventoryLevel documentation: https://help.shopify.com/api/reference/inventory/inventorylevel


Location Functions

Description

Location Functions

Usage

getLocations(...)

getLocation(locationId, ...)

getLocationsCount(...)

getLocationInventoryLevels(locationId, ...)

Arguments

...

additional request parameters

locationId

a Location id

Value

a list containing a Location fields or a list of Locations

References

Shopify API Location documentation: https://help.shopify.com/api/reference/inventory/location


MarketingEvent Functions

Description

MarketingEvent Functions

Usage

getMarketingEvents(...)

getMarketingEventsCount(...)

getMarketingEvent(marketingEventId, ...)

createMarketingEvent(marketingEvent, ...)

updateMarketingEvent(marketingEvent, ...)

deleteMarketingEvent(marketingEventId, ...)

createMarketingEventEngagements(marketingEventId, engagements, ...)

Arguments

...

additional request parameters

marketingEventId

a MarketingEvent id number

marketingEvent

a list containing MarketingEvent fields

engagements

a list of one or more engagements

Value

a list containing a MarketingEvent fields or a list of MarketingEvents

References

Shopify API MarketingEvent documentation: https://help.shopify.com/api/reference/marketingevent


Metafield Functions

Description

Metafield Functions

Usage

getMetafields(resourceName, resourceId = NULL, ...)

getMetafieldsCount(resourceName, resourceId = NULL, ...)

getMetafield(metafieldId, ...)

createMetafield(resourceName, resourceId = NULL, metafield, ...)

modifyMetafield(metafield, ...)

deleteMetafield(metafieldId, ...)

Arguments

resourceName

the name of a resource e.g. "products", "smart_collections", "product_image"

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

Value

a list containing a Metafield fields or a list of Metafields

References

Shopify API Metafield documentation: https://help.shopify.com/api/reference/metafield


Order Functions

Description

Order Functions

Usage

getOrders(...)

getOrder(orderId, ...)

getOrdersCount(...)

closeOrder(orderId, ...)

openOrder(orderId, ...)

cancelOrder(orderId, ...)

createOrder(order, ...)

modifyOrder(order, ...)

deleteOrder(orderId, ...)

Arguments

...

additional request parameters

orderId

a Order id number

order

a list containing Order fields

Value

a list containing a Order fields or a list of Orders

References

Shopify API Order documentation: https://help.shopify.com/api/reference/orders/order


OrderRisks Functions

Description

OrderRisks Functions

Usage

createOrderRisk(orderId, orderRisk, ...)

getOrderRisks(orderId, ...)

getOrderRisk(orderId, orderRiskId, ...)

modifyOrderRisk(orderId, orderRisk, ...)

deleteOrderRisk(orderId, orderRiskId, ...)

Arguments

orderId

an Order id number

orderRisk

a list containing OrderRisks fields

...

additional request parameters

orderRiskId

a OrderRisks id number

Value

a list containing a OrderRisks fields or a list of OrderRiskss

References

Shopify API OrderRisks documentation: https://help.shopify.com/api/reference/orders/order_risk


Page Functions

Description

Page Functions

Usage

getPages(...)

getPagesCount(...)

getPage(pageId, ...)

createPage(page, ...)

modifyPage(page, ...)

deletePage(pageId, ...)

Arguments

...

additional request parameters

pageId

a Page id number

page

a list containing Page fields

Value

a list containing a Page fields or a list of Pages

References

Shopify API Page documentation: https://help.shopify.com/api/reference/online_store/page


Policy Functions

Description

Policy Functions

Usage

getPolicies(...)

Arguments

...

additional request parameters

Value

a list of Policies

References

Shopify API Policy documentation: https://help.shopify.com/api/reference/store-properties/policy


PriceRule Functions

Description

PriceRule Functions

Usage

getPriceRules(...)

getPriceRulesCount(...)

getPriceRule(priceRuleId, ...)

createPriceRule(priceRule, ...)

modifyPriceRule(priceRule, ...)

deletePriceRule(priceRuleId, ...)

Arguments

...

additional request parameters

priceRuleId

a PriceRule id number

priceRule

a list containing PriceRule fields

Value

a list containing a PriceRule fields or a list of PriceRules

References

Shopify API PriceRule documentation: https://help.shopify.com/api/reference/discounts/pricerule


Product Functions

Description

Product Functions

Usage

getProducts(...)

getProductsCount(...)

getProduct(productId, ...)

createProduct(product, ...)

modifyProduct(product, ...)

deleteProduct(productId, ...)

Arguments

...

additional request parameters

productId

a Product id number

product

a list containing Product fields

Value

a list containing a Product fields or a list of Products

References

Shopify API Product documentation: https://help.shopify.com/api/reference/products/product


ProductImage Functions

Description

ProductImage Functions

Usage

getProductImages(productId, ...)

getProductImagesCount(productId, ...)

getProductImage(productId, imageId, ...)

createProductImage(productId, image, ..., filepath)

modifyProductImage(productId, image, ..., filepath)

deleteProductImage(productId, imageId, ...)

Arguments

productId

a Product id number

...

additional request parameters

imageId

a ProductImage id number

image

a list containing ProductImage fields

filepath

the filepath to an image to upload

Value

a list containing a ProductImage fields or a list of ProductImages

References

Shopify API ProductImage documentation: https://help.shopify.com/api/reference/products/product_image


ProductListing Functions

Description

ProductListing Functions

Usage

getProductListings(...)

getProductListingProducts(...)

getProductListingsCount(...)

getProductListing(productListingId, ...)

createProductListing(productId, ...)

deleteProductListing(productListingId, ...)

Arguments

...

additional request parameters

productListingId

a ProductListing id

productId

a Product id

Value

a list containing a ProductListing fields or a list of ProductListings

References

Shopify API ProductListing documentation: https://help.shopify.com/api/reference/sales-channels/productlisting


ProductVariant Functions

Description

ProductVariant Functions

Usage

getProductVariants(productId, ...)

getProductVariantsCount(productId, ...)

getProductVariant(variantId, ...)

createProductVariant(productId, variant, ...)

modifyProductVariant(productId, variant, ...)

deleteProductVariant(productId, variantId, ...)

Arguments

productId

a Product id number

...

additional request parameters

variantId

a ProductVariant id number

variant

a list containing ProductVariant fields

Value

a list containing a ProductVariant fields or a list of ProductVariants

References

Shopify API ProductVariant documentation: https://help.shopify.com/api/reference/products/product_variant


Province Functions

Description

Province Functions

Usage

getProvinces(countryId, ...)

getProvincesCount(countryId, ...)

getProvince(countryId, provinceId, ...)

modifyProvince(countryId, province, ...)

Arguments

countryId

a Country id number

...

additional request parameters

provinceId

a Province id number

province

a list containing Province fields

Value

a list containing a Province fields or a list of Provinces

References

Shopify API Province documentation: https://help.shopify.com/api/reference/store_properties/province


RecurringApplicationCharge Functions

Description

RecurringApplicationCharge Functions

Usage

createRecurringCharge(charge, ...)

getRecurringCharge(chargeId, ...)

getRecurringCharges(...)

activateRecurringCharge(charge, ...)

cancelRecurringCharge(chargeId, ...)

Arguments

charge

a list containing RecurringApplicationCharge fields

...

additional request parameters

chargeId

a RecurringApplicationCharge id number

Value

a list containing a RecurringApplicationCharge fields or a list of RecurringApplicationCharges

References

Shopify API RecurringApplicationCharge documentation: https://help.shopify.com/api/reference/billing/recurringapplicationcharge


Redirect Functions

Description

Redirect Functions

Usage

getRedirects(...)

getRedirectsCount(...)

getRedirect(redirectId, ...)

createRedirect(redirect, ...)

modifyRedirect(redirect, ...)

deleteRedirect(redirectId, ...)

Arguments

...

additional request parameters

redirectId

a Redirect id number

redirect

a list containing Redirect fields

Value

a list containing a Redirect fields or a list of Redirects

References

Shopify API Redirect documentation: https://help.shopify.com/api/reference/online_store/redirect


Refund Functions

Description

Refund Functions

Usage

getRefund(orderId, refundId, ...)

Arguments

orderId

an Order id number

refundId

a Refund id number

...

additional request parameters

Value

a list corresponding to a Refund

References

Shopify API Refund documentation: https://help.shopify.com/api/reference/orders/refund


Report Functions

Description

Report Functions

Usage

getReports(...)

getReport(reportId, ...)

createReport(report, ...)

modifyReport(report, ...)

deleteReport(reportId, ...)

Arguments

...

additional request parameters

reportId

a Report id number

report

a list containing Report fields

Value

a list containing a Report fields or a list of Reports

References

Shopify API Report documentation: https://help.shopify.com/api/reference/analytics/report


ResourceFeedback Functions

Description

ResourceFeedback Functions

Usage

createResourceFeedback(resourceFeedback, ...)

getResourceFeedbacks(...)

Arguments

resourceFeedback

a list containing ResourceFeedback fields

...

additional request parameters

Value

a list containing a ResourceFeedback fields or a list of ResourceFeedbacks

References

Shopify API ResourceFeedback documentation: https://help.shopify.com/api/reference/sales-channels/resourcefeedback


ScriptTag Functions

Description

ScriptTag Functions

Usage

getScriptTags(...)

getScriptTagsCount(...)

getScriptTag(scriptTagId, ...)

createScriptTag(scriptTag, ...)

modifyScriptTag(scriptTag, ...)

deleteScriptTag(scriptTagId, ...)

Arguments

...

additional request parameters

scriptTagId

a ScriptTag id number

scriptTag

a list containing ScriptTag fields

Value

a list containing a ScriptTag fields or a list of ScriptTags

References

Shopify API ScriptTag documentation: https://help.shopify.com/api/reference/online_store/scripttag


ShippingZone Functions

Description

ShippingZone Functions

Usage

getShippingZones(...)

Arguments

...

additional request parameters

Value

a list of ShippingZones

References

Shopify API ShippingZone documentation: https://help.shopify.com/api/reference/store-properties/shippingzone


Shop Functions

Description

Shop Functions

Usage

getShop(...)

Arguments

...

additional request parameters

Value

a list corresponding to a Shop

References

Shopify API Shop documentation: https://help.shopify.com/api/reference/store_properties/shop


R Interface to the Shopify API

Description

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.

Details

The workhorse of the package is the ShopifyShop class.

Author(s)

Charlie Friedemann


ShopifyShop class

Description

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).

Arguments

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

Details

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 Class Generator Usage

ShopifyShop$new(shopURL, password, quiet = FALSE)

if successful, will return a new ShopifyShop object.

Public Fields

shopInfo

information about the shop as returned by getShop

Public Functions

ApplicationCharge functions
Article functions
Asset functions
Blog functions
CarrierService functions
Checkout functions
Collect functions
Comment functions
Country functions
CustomCollection functions
Customer functions
CustomerSavedSearch functions
DiscountCode functions
DraftOrder functions
Event functions
Fulfillment functions
FulfillmentEvent functions
FulfillmentService functions
GiftCard functions
Location functions
MarketingEvent functions
Metafield functions
Order functions
Order Risks functions
Page functions
PriceRule functions
Policy functions
Product functions
Product Image functions
ProductListing functions
Product Variant functions
Province functions
RecurringApplicationCharge functions
Redirect functions
Refund functions
Report functions
ResourceFeedback functions
ScriptTag functions
ShippingZone functions
Shop functions
SmartCollection functions
Theme functions
Transaction functions
UsageCharge functions
User functions
Webhook functions

Examples

## 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

Description

SmartCollection Functions

Usage

getSmartCollections(...)

getSmartCollectionsCount(...)

getSmartCollection(smartCollectionId, ...)

createSmartCollection(smartCollection, ...)

modifySmartCollection(smartCollection, ...)

orderSmartCollection(smartCollectionId, productIds, ...)

deleteSmartCollection(smartCollectionId, ...)

Arguments

...

additional request parameters

smartCollectionId

a SmartCollection id number

smartCollection

a list containing SmartCollection fields

productIds

a vector of Product ids in the desired sort order

Value

a list containing a SmartCollection fields or a list of SmartCollections

References

Shopify API SmartCollection documentation: https://help.shopify.com/api/reference/products/smartcollection


Theme Functions

Description

Theme Functions

Usage

getThemes(...)

getTheme(themeId, ...)

createTheme(theme, ...)

modifyTheme(theme, ...)

deleteTheme(themeId, ...)

Arguments

...

additional request parameters

themeId

a Theme id number

theme

a list containing Theme fields

Value

a list containing a Theme fields or a list of Themes

References

Shopify API Theme documentation: https://help.shopify.com/api/reference/online_store/theme


Transaction Functions

Description

Transaction Functions

Usage

getTransactions(orderId, ...)

getTransactionsCount(orderId, ...)

getTransaction(orderId, transactionId, ...)

createTransaction(orderId, transaction, ...)

Arguments

orderId

an Order id number

...

additional request parameters

transactionId

a Transaction id number

transaction

a list containing Transaction fields

Value

a list containing a Transaction fields or a list of Transactions

References

Shopify API Transaction documentation: https://help.shopify.com/api/reference/orders/transaction


UsageCharge Functions

Description

UsageCharge Functions

Usage

createUsageCharge(recurringApplicationChargeId, usageCharge, ...)

getUsageCharge(recurringApplicationChargeId, usageChargeId, ...)

getUsageCharges(recurringApplicationChargeId, ...)

Arguments

recurringApplicationChargeId

a RecurringApplicationCharge id

usageCharge

a list containing UsageCharge fields

...

additional request parameters

usageChargeId

a UsageCharge id number

Value

a list containing a UsageCharge fields or a list of UsageCharges

References

Shopify API UsageCharge documentation: https://help.shopify.com/api/reference/billing/usagecharge


User Functions

Description

User Functions

Usage

getUsers(...)

getUser(userId, ...)

getCurrentUser(...)

Arguments

...

additional request parameters

userId

a User id

Value

a list containing a User fields or a list of Users

Note

This functionality is only available to Shopify Plus stores

References

Shopify API User documentation: https://help.shopify.com/api/reference/plus/user


Webhook Functions

Description

Webhook Functions

Usage

getWebhooks(...)

getWebhooksCount(...)

getWebhook(webhookId, ...)

createWebhook(webhook, ...)

modifyWebhook(webhook, ...)

deleteWebhook(webhookId, ...)

Arguments

...

additional request parameters

webhookId

a Webhook id number

webhook

a list containing Webhook fields

Value

a list containing a Webhook fields or a list of Webhooks

References

Shopify API Webhook documentation: https://help.shopify.com/api/reference/events/webhook