v1_items_api = client.v1_items
V1ItemsApi
- List Categories
- Create Category
- Delete Category
- Update Category
- List Discounts
- Create Discount
- Delete Discount
- Update Discount
- List Fees
- Create Fee
- Delete Fee
- Update Fee
- List Inventory
- Adjust Inventory
- List Items
- Create Item
- Delete Item
- Retrieve Item
- Update Item
- Remove Fee
- Apply Fee
- Remove Modifier List
- Apply Modifier List
- Create Variation
- Delete Variation
- Update Variation
- List Modifier Lists
- Create Modifier List
- Delete Modifier List
- Retrieve Modifier List
- Update Modifier List
- Create Modifier Option
- Delete Modifier Option
- Update Modifier Option
- List Pages
- Create Page
- Delete Page
- Update Page
- Delete Page Cell
- Update Page Cell
Lists all the item categories for a given location.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
def list_categories(self,
location_id)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the location to list categories for. |
location_id = 'location_id4'
result = v1_items_api.list_categories(location_id)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Creates an item category.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
def create_category(self,
location_id,
body)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the location to create an item for. |
body |
V1 Category |
Body, Required | An object containing the fields to POST for the request. See the corresponding object definition for field details. |
location_id = 'location_id4'
body = {}
result = v1_items_api.create_category(location_id, body)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Deletes an existing item category.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
DeleteCategory returns nothing on success but Connect SDKs
map the empty response to an empty V1DeleteCategoryRequest
object
as documented below.
def delete_category(self,
location_id,
category_id)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the item's associated location. |
category_id |
string |
Template, Required | The ID of the category to delete. |
location_id = 'location_id4'
category_id = 'category_id8'
result = v1_items_api.delete_category(location_id, category_id)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Modifies the details of an existing item category.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
def update_category(self,
location_id,
category_id,
body)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the category's associated location. |
category_id |
string |
Template, Required | The ID of the category to edit. |
body |
V1 Category |
Body, Required | An object containing the fields to POST for the request. See the corresponding object definition for field details. |
location_id = 'location_id4'
category_id = 'category_id8'
body = {}
result = v1_items_api.update_category(location_id, category_id, body)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Lists all the discounts for a given location.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
def list_discounts(self,
location_id)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the location to list categories for. |
location_id = 'location_id4'
result = v1_items_api.list_discounts(location_id)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Creates a discount.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
def create_discount(self,
location_id,
body)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the location to create an item for. |
body |
V1 Discount |
Body, Required | An object containing the fields to POST for the request. See the corresponding object definition for field details. |
location_id = 'location_id4'
body = {}
result = v1_items_api.create_discount(location_id, body)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Deletes an existing discount.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
DeleteDiscount returns nothing on success but Connect SDKs
map the empty response to an empty V1DeleteDiscountRequest
object
as documented below.
def delete_discount(self,
location_id,
discount_id)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the item's associated location. |
discount_id |
string |
Template, Required | The ID of the discount to delete. |
location_id = 'location_id4'
discount_id = 'discount_id8'
result = v1_items_api.delete_discount(location_id, discount_id)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Modifies the details of an existing discount.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
def update_discount(self,
location_id,
discount_id,
body)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the category's associated location. |
discount_id |
string |
Template, Required | The ID of the discount to edit. |
body |
V1 Discount |
Body, Required | An object containing the fields to POST for the request. See the corresponding object definition for field details. |
location_id = 'location_id4'
discount_id = 'discount_id8'
body = {}
result = v1_items_api.update_discount(location_id, discount_id, body)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Lists all the fees (taxes) for a given location.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
def list_fees(self,
location_id)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the location to list fees for. |
location_id = 'location_id4'
result = v1_items_api.list_fees(location_id)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Creates a fee (tax).
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
def create_fee(self,
location_id,
body)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the location to create a fee for. |
body |
V1 Fee |
Body, Required | An object containing the fields to POST for the request. See the corresponding object definition for field details. |
location_id = 'location_id4'
body = {}
result = v1_items_api.create_fee(location_id, body)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Deletes an existing fee (tax).
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
DeleteFee returns nothing on success but Connect SDKs
map the empty response to an empty V1DeleteFeeRequest
object
as documented below.
def delete_fee(self,
location_id,
fee_id)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the fee's associated location. |
fee_id |
string |
Template, Required | The ID of the fee to delete. |
location_id = 'location_id4'
fee_id = 'fee_id8'
result = v1_items_api.delete_fee(location_id, fee_id)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Modifies the details of an existing fee (tax).
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
def update_fee(self,
location_id,
fee_id,
body)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the fee's associated location. |
fee_id |
string |
Template, Required | The ID of the fee to edit. |
body |
V1 Fee |
Body, Required | An object containing the fields to POST for the request. See the corresponding object definition for field details. |
location_id = 'location_id4'
fee_id = 'fee_id8'
body = {}
result = v1_items_api.update_fee(location_id, fee_id, body)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Provides inventory information for all inventory-enabled item variations.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
def list_inventory(self,
location_id,
limit=None,
batch_token=None)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the item's associated location. |
limit |
int |
Query, Optional | The maximum number of inventory entries to return in a single response. This value cannot exceed 1000. |
batch_token |
string |
Query, Optional | A pagination cursor to retrieve the next set of results for your original query to the endpoint. |
location_id = 'location_id4'
result = v1_items_api.list_inventory(location_id)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Adjusts the current available inventory of an item variation.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
def adjust_inventory(self,
location_id,
variation_id,
body)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the item's associated location. |
variation_id |
string |
Template, Required | The ID of the variation to adjust inventory information for. |
body |
V1 Adjust Inventory Request |
Body, Required | An object containing the fields to POST for the request. See the corresponding object definition for field details. |
location_id = 'location_id4'
variation_id = 'variation_id2'
body = {}
result = v1_items_api.adjust_inventory(location_id, variation_id, body)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Provides summary information of all items for a given location.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
def list_items(self,
location_id,
batch_token=None)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the location to list items for. |
batch_token |
string |
Query, Optional | A pagination cursor to retrieve the next set of results for your original query to the endpoint. |
location_id = 'location_id4'
result = v1_items_api.list_items(location_id)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Creates an item and at least one variation for it.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
Item-related entities include fields you can use to associate them with entities in a non-Square system.
When you create an item-related entity, you can optionally specify id
.
This value must be unique among all IDs ever specified for the account,
including those specified by other applications. You can never reuse an
entity ID. If you do not specify an ID, Square generates one for the entity.
Item variations have a user_data
string that lets you associate arbitrary
metadata with the variation. The string cannot exceed 255 characters.
def create_item(self,
location_id,
body)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the location to create an item for. |
body |
V1 Item |
Body, Required | An object containing the fields to POST for the request. See the corresponding object definition for field details. |
location_id = 'location_id4'
body = {}
result = v1_items_api.create_item(location_id, body)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Deletes an existing item and all item variations associated with it.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
DeleteItem returns nothing on success but Connect SDKs
map the empty response to an empty V1DeleteItemRequest
object
as documented below.
def delete_item(self,
location_id,
item_id)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the item's associated location. |
item_id |
string |
Template, Required | The ID of the item to modify. |
location_id = 'location_id4'
item_id = 'item_id0'
result = v1_items_api.delete_item(location_id, item_id)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Provides the details for a single item, including associated modifier lists and fees.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
def retrieve_item(self,
location_id,
item_id)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the item's associated location. |
item_id |
string |
Template, Required | The item's ID. |
location_id = 'location_id4'
item_id = 'item_id0'
result = v1_items_api.retrieve_item(location_id, item_id)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Modifies the core details of an existing item.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
def update_item(self,
location_id,
item_id,
body)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the item's associated location. |
item_id |
string |
Template, Required | The ID of the item to modify. |
body |
V1 Item |
Body, Required | An object containing the fields to POST for the request. See the corresponding object definition for field details. |
location_id = 'location_id4'
item_id = 'item_id0'
body = {}
result = v1_items_api.update_item(location_id, item_id, body)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Removes a fee assocation from an item so the fee is no longer automatically applied to the item in Square Point of Sale.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
def remove_fee(self,
location_id,
item_id,
fee_id)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the fee's associated location. |
item_id |
string |
Template, Required | The ID of the item to add the fee to. |
fee_id |
string |
Template, Required | The ID of the fee to apply. |
location_id = 'location_id4'
item_id = 'item_id0'
fee_id = 'fee_id8'
result = v1_items_api.remove_fee(location_id, item_id, fee_id)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Associates a fee with an item so the fee is automatically applied to the item in Square Point of Sale.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
def apply_fee(self,
location_id,
item_id,
fee_id)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the fee's associated location. |
item_id |
string |
Template, Required | The ID of the item to add the fee to. |
fee_id |
string |
Template, Required | The ID of the fee to apply. |
location_id = 'location_id4'
item_id = 'item_id0'
fee_id = 'fee_id8'
result = v1_items_api.apply_fee(location_id, item_id, fee_id)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Removes a modifier list association from an item so the modifier options from the list can no longer be applied to the item.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
def remove_modifier_list(self,
location_id,
modifier_list_id,
item_id)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the item's associated location. |
modifier_list_id |
string |
Template, Required | The ID of the modifier list to remove. |
item_id |
string |
Template, Required | The ID of the item to remove the modifier list from. |
location_id = 'location_id4'
modifier_list_id = 'modifier_list_id6'
item_id = 'item_id0'
result = v1_items_api.remove_modifier_list(location_id, modifier_list_id, item_id)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Associates a modifier list with an item so the associated modifier options can be applied to the item.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
def apply_modifier_list(self,
location_id,
modifier_list_id,
item_id)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the item's associated location. |
modifier_list_id |
string |
Template, Required | The ID of the modifier list to apply. |
item_id |
string |
Template, Required | The ID of the item to add the modifier list to. |
location_id = 'location_id4'
modifier_list_id = 'modifier_list_id6'
item_id = 'item_id0'
result = v1_items_api.apply_modifier_list(location_id, modifier_list_id, item_id)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Creates an item variation for an existing item.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
def create_variation(self,
location_id,
item_id,
body)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the item's associated location. |
item_id |
string |
Template, Required | The item's ID. |
body |
V1 Variation |
Body, Required | An object containing the fields to POST for the request. See the corresponding object definition for field details. |
location_id = 'location_id4'
item_id = 'item_id0'
body = {}
result = v1_items_api.create_variation(location_id, item_id, body)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Deletes an existing item variation from an item.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
DeleteVariation returns nothing on success but Connect SDKs
map the empty response to an empty V1DeleteVariationRequest
object
as documented below.
def delete_variation(self,
location_id,
item_id,
variation_id)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the item's associated location. |
item_id |
string |
Template, Required | The ID of the item to delete. |
variation_id |
string |
Template, Required | The ID of the variation to delete. |
location_id = 'location_id4'
item_id = 'item_id0'
variation_id = 'variation_id2'
result = v1_items_api.delete_variation(location_id, item_id, variation_id)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Modifies the details of an existing item variation.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
def update_variation(self,
location_id,
item_id,
variation_id,
body)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the item's associated location. |
item_id |
string |
Template, Required | The ID of the item to modify. |
variation_id |
string |
Template, Required | The ID of the variation to modify. |
body |
V1 Variation |
Body, Required | An object containing the fields to POST for the request. See the corresponding object definition for field details. |
location_id = 'location_id4'
item_id = 'item_id0'
variation_id = 'variation_id2'
body = {}
result = v1_items_api.update_variation(location_id, item_id, variation_id, body)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Lists all the modifier lists for a given location.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
def list_modifier_lists(self,
location_id)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the location to list modifier lists for. |
location_id = 'location_id4'
result = v1_items_api.list_modifier_lists(location_id)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Creates an item modifier list and at least 1 modifier option for it.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
def create_modifier_list(self,
location_id,
body)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the location to create a modifier list for. |
body |
V1 Modifier List |
Body, Required | An object containing the fields to POST for the request. See the corresponding object definition for field details. |
location_id = 'location_id4'
body = {}
result = v1_items_api.create_modifier_list(location_id, body)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Deletes an existing item modifier list and all modifier options associated with it.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
DeleteModifierList returns nothing on success but Connect SDKs
map the empty response to an empty V1DeleteModifierListRequest
object
as documented below.
def delete_modifier_list(self,
location_id,
modifier_list_id)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the item's associated location. |
modifier_list_id |
string |
Template, Required | The ID of the modifier list to delete. |
location_id = 'location_id4'
modifier_list_id = 'modifier_list_id6'
result = v1_items_api.delete_modifier_list(location_id, modifier_list_id)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Provides the details for a single modifier list.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
def retrieve_modifier_list(self,
location_id,
modifier_list_id)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the item's associated location. |
modifier_list_id |
string |
Template, Required | The modifier list's ID. |
location_id = 'location_id4'
modifier_list_id = 'modifier_list_id6'
result = v1_items_api.retrieve_modifier_list(location_id, modifier_list_id)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Modifies the details of an existing item modifier list.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
def update_modifier_list(self,
location_id,
modifier_list_id,
body)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the item's associated location. |
modifier_list_id |
string |
Template, Required | The ID of the modifier list to edit. |
body |
V1 Update Modifier List Request |
Body, Required | An object containing the fields to POST for the request. See the corresponding object definition for field details. |
location_id = 'location_id4'
modifier_list_id = 'modifier_list_id6'
body = {}
result = v1_items_api.update_modifier_list(location_id, modifier_list_id, body)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Creates an item modifier option and adds it to a modifier list.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
def create_modifier_option(self,
location_id,
modifier_list_id,
body)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the item's associated location. |
modifier_list_id |
string |
Template, Required | The ID of the modifier list to edit. |
body |
V1 Modifier Option |
Body, Required | An object containing the fields to POST for the request. See the corresponding object definition for field details. |
location_id = 'location_id4'
modifier_list_id = 'modifier_list_id6'
body = {}
result = v1_items_api.create_modifier_option(location_id, modifier_list_id, body)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Deletes an existing item modifier option from a modifier list.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
DeleteModifierOption returns nothing on success but Connect
SDKs map the empty response to an empty V1DeleteModifierOptionRequest
object.
def delete_modifier_option(self,
location_id,
modifier_list_id,
modifier_option_id)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the item's associated location. |
modifier_list_id |
string |
Template, Required | The ID of the modifier list to delete. |
modifier_option_id |
string |
Template, Required | The ID of the modifier list to edit. |
location_id = 'location_id4'
modifier_list_id = 'modifier_list_id6'
modifier_option_id = 'modifier_option_id6'
result = v1_items_api.delete_modifier_option(location_id, modifier_list_id, modifier_option_id)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Modifies the details of an existing item modifier option.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
def update_modifier_option(self,
location_id,
modifier_list_id,
modifier_option_id,
body)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the item's associated location. |
modifier_list_id |
string |
Template, Required | The ID of the modifier list to edit. |
modifier_option_id |
string |
Template, Required | The ID of the modifier list to edit. |
body |
V1 Modifier Option |
Body, Required | An object containing the fields to POST for the request. See the corresponding object definition for field details. |
location_id = 'location_id4'
modifier_list_id = 'modifier_list_id6'
modifier_option_id = 'modifier_option_id6'
body = {}
result = v1_items_api.update_modifier_option(location_id, modifier_list_id, modifier_option_id, body)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Lists all Favorites pages (in Square Point of Sale) for a given location.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
def list_pages(self,
location_id)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the location to list Favorites pages for. |
location_id = 'location_id4'
result = v1_items_api.list_pages(location_id)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Creates a Favorites page in Square Point of Sale.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
def create_page(self,
location_id,
body)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the location to create an item for. |
body |
V1 Page |
Body, Required | An object containing the fields to POST for the request. See the corresponding object definition for field details. |
location_id = 'location_id4'
body = {}
result = v1_items_api.create_page(location_id, body)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Deletes an existing Favorites page and all of its cells.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
DeletePage returns nothing on success but Connect SDKs
map the empty response to an empty V1DeletePageRequest
object.
def delete_page(self,
location_id,
page_id)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the Favorites page's associated location. |
page_id |
string |
Template, Required | The ID of the page to delete. |
location_id = 'location_id4'
page_id = 'page_id0'
result = v1_items_api.delete_page(location_id, page_id)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Modifies the details of a Favorites page in Square Point of Sale.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
def update_page(self,
location_id,
page_id,
body)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the Favorites page's associated location |
page_id |
string |
Template, Required | The ID of the page to modify. |
body |
V1 Page |
Body, Required | An object containing the fields to POST for the request. See the corresponding object definition for field details. |
location_id = 'location_id4'
page_id = 'page_id0'
body = {}
result = v1_items_api.update_page(location_id, page_id, body)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Deletes a cell from a Favorites page in Square Point of Sale.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
DeletePageCell returns nothing on success but Connect SDKs
map the empty response to an empty V1DeletePageCellRequest
object
as documented below.
def delete_page_cell(self,
location_id,
page_id,
row=None,
column=None)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the Favorites page's associated location. |
page_id |
string |
Template, Required | The ID of the page to delete. |
row |
string |
Query, Optional | The row of the cell to clear. Always an integer between 0 and 4, inclusive. Row 0 is the top row. |
column |
string |
Query, Optional | The column of the cell to clear. Always an integer between 0 and 4, inclusive. Column 0 is the leftmost column. |
location_id = 'location_id4'
page_id = 'page_id0'
result = v1_items_api.delete_page_cell(location_id, page_id)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)
Modifies a cell of a Favorites page in Square Point of Sale.
- Deprecation date: 2019-11-20
- Retirement date: 2020-11-18
- Migration guide
def update_page_cell(self,
location_id,
page_id,
body)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
string |
Template, Required | The ID of the Favorites page's associated location. |
page_id |
string |
Template, Required | The ID of the page the cell belongs to. |
body |
V1 Page Cell |
Body, Required | An object containing the fields to POST for the request. See the corresponding object definition for field details. |
location_id = 'location_id4'
page_id = 'page_id0'
body = {}
result = v1_items_api.update_page_cell(location_id, page_id, body)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.body)