sq_create_item: Create Item

Description Usage Arguments Details Value Examples

View source: R/items.R

Description

Creates an item and at least one variation for it.

Usage

1
sq_create_item(location, input_data, verbose = FALSE)

Arguments

location

character; the Square ID or name associated to a location. This must be an exact match to the ID or name as found using sq_list_locations.

input_data

list; data used for creating or updating an object.

verbose

logical; do you want informative messages?

Details

You must provide at the following fields in your request to this endpoint:

Required permissions: ITEMS_WRITE.

Value

tbl_df of the created item record

Examples

1
2
3
4
5
6
7
## Not run: 
new_item_data <- list(name = "API Test Item",
                      variations = list())
this_item <- sq_create_item(location, 
                            new_item_data)

## End(Not run)

StevenMMortimer/squareupr documentation built on July 12, 2019, 1:45 a.m.