Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

Latest commit

 

History

History
1028 lines (623 loc) · 33.1 KB

V1ItemsApi.md

File metadata and controls

1028 lines (623 loc) · 33.1 KB

V1ItemsApi

squareconnect.apis.v1_items_api

All endpoints are relative to Square Connect V2 Documentation

Method HTTP request
adjust_inventory POST /v1/{location_id}/inventory/{variation_id}
apply_fee PUT /v1/{location_id}/items/{item_id}/fees/{fee_id}
apply_modifier_list PUT /v1/{location_id}/items/{item_id}/modifier-lists/{modifier_list_id}
create_category POST /v1/{location_id}/categories
create_discount POST /v1/{location_id}/discounts
create_fee POST /v1/{location_id}/fees
create_item POST /v1/{location_id}/items
create_modifier_list POST /v1/{location_id}/modifier-lists
create_modifier_option POST /v1/{location_id}/modifier-lists/{modifier_list_id}/modifier-options
create_page POST /v1/{location_id}/pages
create_variation POST /v1/{location_id}/items/{item_id}/variations
delete_category DELETE /v1/{location_id}/categories/{category_id}
delete_discount DELETE /v1/{location_id}/discounts/{discount_id}
delete_fee DELETE /v1/{location_id}/fees/{fee_id}
delete_item DELETE /v1/{location_id}/items/{item_id}
delete_modifier_list DELETE /v1/{location_id}/modifier-lists/{modifier_list_id}
delete_modifier_option DELETE /v1/{location_id}/modifier-lists/{modifier_list_id}/modifier-options/{modifier_option_id}
delete_page DELETE /v1/{location_id}/pages/{page_id}
delete_page_cell DELETE /v1/{location_id}/pages/{page_id}/cells
delete_variation DELETE /v1/{location_id}/items/{item_id}/variations/{variation_id}
list_categories GET /v1/{location_id}/categories
list_discounts GET /v1/{location_id}/discounts
list_fees GET /v1/{location_id}/fees
list_inventory GET /v1/{location_id}/inventory
list_items GET /v1/{location_id}/items
list_modifier_lists GET /v1/{location_id}/modifier-lists
list_pages GET /v1/{location_id}/pages
remove_fee DELETE /v1/{location_id}/items/{item_id}/fees/{fee_id}
remove_modifier_list DELETE /v1/{location_id}/items/{item_id}/modifier-lists/{modifier_list_id}
retrieve_item GET /v1/{location_id}/items/{item_id}
retrieve_modifier_list GET /v1/{location_id}/modifier-lists/{modifier_list_id}
update_category PUT /v1/{location_id}/categories/{category_id}
update_discount PUT /v1/{location_id}/discounts/{discount_id}
update_fee PUT /v1/{location_id}/fees/{fee_id}
update_item PUT /v1/{location_id}/items/{item_id}
update_modifier_list PUT /v1/{location_id}/modifier-lists/{modifier_list_id}
update_modifier_option PUT /v1/{location_id}/modifier-lists/{modifier_list_id}/modifier-options/{modifier_option_id}
update_page PUT /v1/{location_id}/pages/{page_id}
update_page_cell PUT /v1/{location_id}/pages/{page_id}/cells
update_variation PUT /v1/{location_id}/items/{item_id}/variations/{variation_id}

adjust_inventory

V1InventoryEntry adjust_inventory(location_id, variation_id, body)

Description

Adjusts an item variation's current available inventory.

Parameters

Name Type Notes Default Value
location_id str
variation_id str
body V1AdjustInventoryRequest

Return type

V1InventoryEntry

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

apply_fee

V1Item apply_fee(location_id, item_id, fee_id)

Description

Associates a fee with an item, meaning the fee is automatically applied to the item in Square Register.

Parameters

Name Type Notes Default Value
location_id str
item_id str
fee_id str

Return type

V1Item

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

apply_modifier_list

V1Item apply_modifier_list(location_id, modifier_list_id, item_id)

Description

Associates a modifier list with an item, meaning modifier options from the list can be applied to the item.

Parameters

Name Type Notes Default Value
location_id str
modifier_list_id str
item_id str

Return type

V1Item

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_category

V1Category create_category(location_id, body)

Description

Creates an item category.

Parameters

Name Type Notes Default Value
location_id str
body V1Category

Return type

V1Category

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_discount

V1Discount create_discount(location_id, body)

Description

Creates a discount.

Parameters

Name Type Notes Default Value
location_id str
body V1Discount

Return type

V1Discount

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_fee

V1Fee create_fee(location_id, body)

Description

Creates a fee (tax).

Parameters

Name Type Notes Default Value
location_id str
body V1Fee

Return type

V1Fee

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_item

V1Item create_item(location_id, body)

Description

Creates an item and at least one variation for it. 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 its 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.

Parameters

Name Type Notes Default Value
location_id str
body V1Item

Return type

V1Item

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_modifier_list

V1ModifierList create_modifier_list(location_id, body)

Description

Creates an item modifier list and at least one modifier option for it.

Parameters

Name Type Notes Default Value
location_id str
body V1ModifierList

Return type

V1ModifierList

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_modifier_option

V1ModifierOption create_modifier_option(location_id, modifier_list_id, body)

Description

Creates an item modifier option and adds it to a modifier list.

Parameters

Name Type Notes Default Value
location_id str
modifier_list_id str
body V1ModifierOption

Return type

V1ModifierOption

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_page

V1Page create_page(location_id, body)

Description

Creates a Favorites page in Square Register.

Parameters

Name Type Notes Default Value
location_id str
body V1Page

Return type

V1Page

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_variation

V1Variation create_variation(location_id, item_id, body)

Description

Creates an item variation for an existing item.

Parameters

Name Type Notes Default Value
location_id str
item_id str
body V1Variation

Return type

V1Variation

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_category

V1Category delete_category(location_id, category_id)

Description

Deletes an existing item category. Note*: DeleteCategory returns nothing on success but Connect SDKs map the empty response to an empty V1DeleteCategoryRequest object as documented below.

Parameters

Name Type Notes Default Value
location_id str
category_id str

Return type

V1Category

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_discount

V1Discount delete_discount(location_id, discount_id)

Description

Deletes an existing discount. Note*: DeleteDiscount returns nothing on success but Connect SDKs map the empty response to an empty V1DeleteDiscountRequest object as documented below.

Parameters

Name Type Notes Default Value
location_id str
discount_id str

Return type

V1Discount

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_fee

V1Fee delete_fee(location_id, fee_id)

Description

Deletes an existing fee (tax). Note*: DeleteFee returns nothing on success but Connect SDKs map the empty response to an empty V1DeleteFeeRequest object as documented below.

Parameters

Name Type Notes Default Value
location_id str
fee_id str

Return type

V1Fee

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_item

V1Item delete_item(location_id, item_id)

Description

Deletes an existing item and all item variations associated with it. Note*: DeleteItem returns nothing on success but Connect SDKs map the empty response to an empty V1DeleteItemRequest object as documented below.

Parameters

Name Type Notes Default Value
location_id str
item_id str

Return type

V1Item

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_modifier_list

V1ModifierList delete_modifier_list(location_id, modifier_list_id)

Description

Deletes an existing item modifier list and all modifier options associated with it. Note*: DeleteModifierList returns nothing on success but Connect SDKs map the empty response to an empty V1DeleteModifierListRequest object as documented below.

Parameters

Name Type Notes Default Value
location_id str
modifier_list_id str

Return type

V1ModifierList

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_modifier_option

V1ModifierOption delete_modifier_option(location_id, modifier_list_id, modifier_option_id)

Description

Deletes an existing item modifier option from a modifier list. Note*: DeleteModifierOption returns nothing on success but Connect SDKs map the empty response to an empty V1DeleteModifierOptionRequest object as documented below.

Parameters

Name Type Notes Default Value
location_id str
modifier_list_id str
modifier_option_id str

Return type

V1ModifierOption

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_page

V1Page delete_page(location_id, page_id)

Description

Deletes an existing Favorites page and all of its cells. Note*: DeletePage returns nothing on success but Connect SDKs map the empty response to an empty V1DeletePageRequest object as documented below.

Parameters

Name Type Notes Default Value
location_id str
page_id str

Return type

V1Page

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_page_cell

V1Page delete_page_cell(location_id, page_id, row=row, column=column)

Description

Deletes a cell from a Favorites page in Square Register. Note*: DeletePageCell returns nothing on success but Connect SDKs map the empty response to an empty V1DeletePageCellRequest object as documented below.

Parameters

Name Type Notes Default Value
location_id str
page_id str
row str [optional]
column str [optional]

Return type

V1Page

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_variation

V1Variation delete_variation(location_id, item_id, variation_id)

Description

Deletes an existing item variation from an item. Note*: DeleteVariation returns nothing on success but Connect SDKs map the empty response to an empty V1DeleteVariationRequest object as documented below.

Parameters

Name Type Notes Default Value
location_id str
item_id str
variation_id str

Return type

V1Variation

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_categories

list[V1Category] list_categories(location_id)

Description

Lists all of a location's item categories.

Parameters

Name Type Notes Default Value
location_id str

Return type

list[V1Category]

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_discounts

list[V1Discount] list_discounts(location_id)

Description

Lists all of a location's discounts.

Parameters

Name Type Notes Default Value
location_id str

Return type

list[V1Discount]

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_fees

list[V1Fee] list_fees(location_id)

Description

Lists all of a location's fees (taxes).

Parameters

Name Type Notes Default Value
location_id str

Return type

list[V1Fee]

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_inventory

list[V1InventoryEntry] list_inventory(location_id, limit=limit, batch_token=batch_token)

Description

Provides inventory information for all of a merchant's inventory-enabled item variations.

Parameters

Name Type Notes Default Value
location_id str
limit int [optional]
batch_token str [optional]

Return type

list[V1InventoryEntry]

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_items

list[V1Item] list_items(location_id, batch_token=batch_token)

Description

Provides summary information for all of a location's items.

Parameters

Name Type Notes Default Value
location_id str
batch_token str [optional]

Return type

list[V1Item]

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_modifier_lists

list[V1ModifierList] list_modifier_lists(location_id)

Description

Lists all of a location's modifier lists.

Parameters

Name Type Notes Default Value
location_id str

Return type

list[V1ModifierList]

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_pages

list[V1Page] list_pages(location_id)

Description

Lists all of a location's Favorites pages in Square Register.

Parameters

Name Type Notes Default Value
location_id str

Return type

list[V1Page]

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

remove_fee

V1Item remove_fee(location_id, item_id, fee_id)

Description

Removes a fee assocation from an item, meaning the fee is no longer automatically applied to the item in Square Register.

Parameters

Name Type Notes Default Value
location_id str
item_id str
fee_id str

Return type

V1Item

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

remove_modifier_list

V1Item remove_modifier_list(location_id, modifier_list_id, item_id)

Description

Removes a modifier list association from an item, meaning modifier options from the list can no longer be applied to the item.

Parameters

Name Type Notes Default Value
location_id str
modifier_list_id str
item_id str

Return type

V1Item

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

retrieve_item

V1Item retrieve_item(location_id, item_id)

Description

Provides the details for a single item, including associated modifier lists and fees.

Parameters

Name Type Notes Default Value
location_id str
item_id str

Return type

V1Item

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

retrieve_modifier_list

V1ModifierList retrieve_modifier_list(location_id, modifier_list_id)

Description

Provides the details for a single modifier list.

Parameters

Name Type Notes Default Value
location_id str
modifier_list_id str

Return type

V1ModifierList

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_category

V1Category update_category(location_id, category_id, body)

Description

Modifies the details of an existing item category.

Parameters

Name Type Notes Default Value
location_id str
category_id str
body V1Category

Return type

V1Category

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_discount

V1Discount update_discount(location_id, discount_id, body)

Description

Modifies the details of an existing discount.

Parameters

Name Type Notes Default Value
location_id str
discount_id str
body V1Discount

Return type

V1Discount

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_fee

V1Fee update_fee(location_id, fee_id, body)

Description

Modifies the details of an existing fee (tax).

Parameters

Name Type Notes Default Value
location_id str
fee_id str
body V1Fee

Return type

V1Fee

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_item

V1Item update_item(location_id, item_id, body)

Description

Modifies the core details of an existing item.

Parameters

Name Type Notes Default Value
location_id str
item_id str
body V1Item

Return type

V1Item

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_modifier_list

V1ModifierList update_modifier_list(location_id, modifier_list_id, body)

Description

Modifies the details of an existing item modifier list.

Parameters

Name Type Notes Default Value
location_id str
modifier_list_id str
body V1UpdateModifierListRequest

Return type

V1ModifierList

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_modifier_option

V1ModifierOption update_modifier_option(location_id, modifier_list_id, modifier_option_id, body)

Description

Modifies the details of an existing item modifier option.

Parameters

Name Type Notes Default Value
location_id str
modifier_list_id str
modifier_option_id str
body V1ModifierOption

Return type

V1ModifierOption

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_page

V1Page update_page(location_id, page_id, body)

Description

Modifies the details of a Favorites page in Square Register.

Parameters

Name Type Notes Default Value
location_id str
page_id str
body V1Page

Return type

V1Page

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_page_cell

V1Page update_page_cell(location_id, page_id, body)

Description

Modifies a cell of a Favorites page in Square Register.

Parameters

Name Type Notes Default Value
location_id str
page_id str
body V1PageCell

Return type

V1Page

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_variation

V1Variation update_variation(location_id, item_id, variation_id, body)

Description

Modifies the details of an existing item variation.

Parameters

Name Type Notes Default Value
location_id str
item_id str
variation_id str
body V1Variation

Return type

V1Variation

Authorization

Assign your Access Token from developer portal to the authorization parameter.

[Back to top] [Back to API list] [Back to Model list] [Back to README]