shopr_get_orders: Get Orders

Description Usage Arguments Details Value References

View source: R/shopr_get_orders.R

Description

Retrieve orders 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
shopr_get_orders(
  shopURL,
  APIKey,
  APIPassword,
  APIVersion = NULL,
  max_pages = Inf,
  limit_per_page = 250L,
  ids = NULL,
  since_id = 0L,
  created_at_min = NULL,
  created_at_max = NULL,
  updated_at_min = NULL,
  updated_at_max = NULL,
  processed_at_min = NULL,
  processed_at_max = NULL,
  status = "any",
  financial_status = NULL,
  fulfillment_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 order ids like c(123, 456) (default = NULL)

since_id

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

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)

processed_at_min

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

processed_at_max

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

status

order status. Should be NULL or one of {'open', 'closed', 'any'}. (default = 'any')

financial_status

financial status. Should be NULL or one of {'any', 'authorized', 'pending', 'paid', 'refunded', 'voided'}. (default = NULL)

fulfillment_status

fulfillment status. Should be NULL or one of {'any', 'shipped', 'partial', 'unshipped'}. (default = NULL)

fields

fields to return. Common fields include:

{"id", "email", "closed_at", "created_at", "updated_at", "number","note", "token", "gateway", "test", "total_price", "subtotal_price","total_weight", "total_tax", "taxes_included", "currency", "financial_status", "confirmed", "total_discounts", "total_line_items_price", "cart_token", "buyer_accepts_marketing", "name", "referring_site", "landing_site", "cancelled_at", "cancel_reason", "total_price_usd", "checkout_token", "reference", "user_id", "location_id", "source_identifier", "source_url", "processed_at", "device_id", "phone", "customer_locale", "app_id", "browser_ip", "landing_site_ref", "order_number", "discount_applications", "discount_codes", "note_attributes", "payment_gateway_names", "processing_method", "checkout_id", "source_name", "fulfillment_status", "tax_lines", "tags", "contact_email", "order_status_url", "presentment_currency", "total_line_items_price_set", "total_discounts_set", "total_shipping_price_set", "subtotal_price_set", "total_price_set", "total_tax_set", "total_tip_received", "admin_graphql_api_id", "line_items", "shipping_lines", "billing_address", "shipping_address", "fulfillments", "client_details", "refunds", "payment_details", "customer"}

Only top-level fields are supported. (I.e. you can't subset nested fields. For example, you can select 'line_items' but not line_items' subfields like 'variant_id' or 'title'.) (default = NULL)

verbose

should progress messages be printed? (default = FALSE)

Details

An order is a customer's completed request to purchase one or more products from a shop. An order is created when a customer completes the checkout process, during which time they provide an email address or phone number, billing address and payment information.

Value

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

References

https://help.shopify.com/en/api/reference/orders/order#index


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