shopr_get_products: Get Products

Description Usage Arguments Value References

View source: R/shopr_get_products.R

Description

Retrieve products and related data for a shop

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
shopr_get_products(
  shopURL,
  APIKey,
  APIPassword,
  APIVersion = NULL,
  max_pages = Inf,
  limit_per_page = 250L,
  ids = NULL,
  since_id = 0L,
  title = NULL,
  vendor = NULL,
  handle = NULL,
  product_type = NULL,
  collection_id = NULL,
  created_at_min = NULL,
  created_at_max = NULL,
  updated_at_min = NULL,
  updated_at_max = NULL,
  published_at_min = NULL,
  published_at_max = NULL,
  published_status = NULL,
  fields = NULL,
  verbose = FALSE
)

Arguments

shopURL

shop URL (e.g. 'https://superstore-1.myshopify.com')

APIKey

API key

APIPassword

API password

APIVersion

API version (default = NULL -> use the latest version)

max_pages

maximum pages of records to return (i.e. the maximum number of HTTP GET requests to make). (default = Inf)

limit_per_page

maximum number of records to return per page (i.e. per HTTP GET request). Should be in the range [1, 250]. (default = 250)

ids

vector of product ids like c(123, 456) (default = NULL)

since_id

only return orders with id > since_id (default = 0)

title

product title (default = NULL)

vendor

product vendor (default = NULL)

handle

product handle (default = NULL)

product_type

product type (default = NULL)

collection_id

collection id (default = NULL)

created_at_min

POSIXct datetime or a string with format like '2014-04-25T16:15:47-04:00' (default = NULL)

created_at_max

POSIXct datetime or a string with format like '2014-04-25T16:15:47-04:00' (default = NULL)

updated_at_min

POSIXct datetime or a string with format like '2014-04-25T16:15:47-04:00' (default = NULL)

updated_at_max

POSIXct datetime or a string with format like '2014-04-25T16:15:47-04:00' (default = NULL)

published_at_min

POSIXct datetime or a string with format like '2014-04-25T16:15:47-04:00' (default = NULL)

published_at_max

POSIXct datetime or a string with format like '2014-04-25T16:15:47-04:00' (default = NULL)

published_status

published status. Should be NULL or one of {'published', 'unpublished', 'any'}. (default = NULL)

fields

fields to return. Common fields include:

{'id', 'title', 'body_html', 'vendor', 'product_type', created_at', 'variants', 'options', 'images'}

Only top-level fields are supported (i.e. you can't subset nested fields. For example, you can select 'variants' but not variants' subfields like 'price' or 'sku') (default = NULL)

verbose

should progress messages be printed? (default = FALSE)

Value

list of data.tables. If fields is NULL, all of the following will be returned:

References

https://help.shopify.com/en/api/reference/products/product#index


GormAnalysis/shopr documentation built on Jan. 10, 2022, 1:42 a.m.