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

Latest commit

 

History

History
2324 lines (1720 loc) · 84.5 KB

V1ItemsApi.md

File metadata and controls

2324 lines (1720 loc) · 84.5 KB

V1ItemsApi

All URIs are relative to https://connect.squareup.com

Method HTTP request Description
adjustInventory POST /v1/{location_id}/inventory/{variation_id} AdjustInventory
applyFee PUT /v1/{location_id}/items/{item_id}/fees/{fee_id} ApplyFee
applyModifierList PUT /v1/{location_id}/items/{item_id}/modifier-lists/{modifier_list_id} ApplyModifierList
createCategory POST /v1/{location_id}/categories CreateCategory
createDiscount POST /v1/{location_id}/discounts CreateDiscount
createFee POST /v1/{location_id}/fees CreateFee
createItem POST /v1/{location_id}/items CreateItem
createModifierList POST /v1/{location_id}/modifier-lists CreateModifierList
createModifierOption POST /v1/{location_id}/modifier-lists/{modifier_list_id}/modifier-options CreateModifierOption
createPage POST /v1/{location_id}/pages CreatePage
createVariation POST /v1/{location_id}/items/{item_id}/variations CreateVariation
deleteCategory DELETE /v1/{location_id}/categories/{category_id} DeleteCategory
deleteDiscount DELETE /v1/{location_id}/discounts/{discount_id} DeleteDiscount
deleteFee DELETE /v1/{location_id}/fees/{fee_id} DeleteFee
deleteItem DELETE /v1/{location_id}/items/{item_id} DeleteItem
deleteModifierList DELETE /v1/{location_id}/modifier-lists/{modifier_list_id} DeleteModifierList
deleteModifierOption DELETE /v1/{location_id}/modifier-lists/{modifier_list_id}/modifier-options/{modifier_option_id} DeleteModifierOption
deletePage DELETE /v1/{location_id}/pages/{page_id} DeletePage
deletePageCell DELETE /v1/{location_id}/pages/{page_id}/cells DeletePageCell
deleteVariation DELETE /v1/{location_id}/items/{item_id}/variations/{variation_id} DeleteVariation
listCategories GET /v1/{location_id}/categories ListCategories
listDiscounts GET /v1/{location_id}/discounts ListDiscounts
listFees GET /v1/{location_id}/fees ListFees
listInventory GET /v1/{location_id}/inventory ListInventory
listItems GET /v1/{location_id}/items ListItems
listModifierLists GET /v1/{location_id}/modifier-lists ListModifierLists
listPages GET /v1/{location_id}/pages ListPages
removeFee DELETE /v1/{location_id}/items/{item_id}/fees/{fee_id} RemoveFee
removeModifierList DELETE /v1/{location_id}/items/{item_id}/modifier-lists/{modifier_list_id} RemoveModifierList
retrieveItem GET /v1/{location_id}/items/{item_id} RetrieveItem
retrieveModifierList GET /v1/{location_id}/modifier-lists/{modifier_list_id} RetrieveModifierList
updateCategory PUT /v1/{location_id}/categories/{category_id} UpdateCategory
updateDiscount PUT /v1/{location_id}/discounts/{discount_id} UpdateDiscount
updateFee PUT /v1/{location_id}/fees/{fee_id} UpdateFee
updateItem PUT /v1/{location_id}/items/{item_id} UpdateItem
updateModifierList PUT /v1/{location_id}/modifier-lists/{modifier_list_id} UpdateModifierList
updateModifierOption PUT /v1/{location_id}/modifier-lists/{modifier_list_id}/modifier-options/{modifier_option_id} UpdateModifierOption
updatePage PUT /v1/{location_id}/pages/{page_id} UpdatePage
updatePageCell PUT /v1/{location_id}/pages/{page_id}/cells UpdatePageCell
updateVariation PUT /v1/{location_id}/items/{item_id}/variations/{variation_id} UpdateVariation

adjustInventory

Note: This endpoint is deprecated.

V1InventoryEntry adjustInventory(locationId, variationId, body)

AdjustInventory

Adjusts the current available inventory of an item variation. --- - Deprecation date: 2019-11-20 - Retirement date: 2020-11-18 - Migration guide ---

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the item's associated location.
String variationId = "variationId_example"; // String | The ID of the variation to adjust inventory information for.
V1AdjustInventoryRequest body = new V1AdjustInventoryRequest(); // V1AdjustInventoryRequest | An object containing the fields to POST for the request.  See the corresponding object definition for field details.
try {
    V1InventoryEntry result = apiInstance.adjustInventory(locationId, variationId, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#adjustInventory");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the item's associated location.
variationId String The ID of the variation to adjust inventory information for.
body V1AdjustInventoryRequest An object containing the fields to POST for the request. See the corresponding object definition for field details.

Return type

V1InventoryEntry

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

applyFee

Note: This endpoint is deprecated.

V1Item applyFee(locationId, itemId, feeId)

ApplyFee

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 ---

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the fee's associated location.
String itemId = "itemId_example"; // String | The ID of the item to add the fee to.
String feeId = "feeId_example"; // String | The ID of the fee to apply.
try {
    V1Item result = apiInstance.applyFee(locationId, itemId, feeId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#applyFee");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the fee's associated location.
itemId String The ID of the item to add the fee to.
feeId String The ID of the fee to apply.

Return type

V1Item

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

applyModifierList

Note: This endpoint is deprecated.

V1Item applyModifierList(locationId, modifierListId, itemId)

ApplyModifierList

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 ---

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the item's associated location.
String modifierListId = "modifierListId_example"; // String | The ID of the modifier list to apply.
String itemId = "itemId_example"; // String | The ID of the item to add the modifier list to.
try {
    V1Item result = apiInstance.applyModifierList(locationId, modifierListId, itemId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#applyModifierList");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the item's associated location.
modifierListId String The ID of the modifier list to apply.
itemId String The ID of the item to add the modifier list to.

Return type

V1Item

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createCategory

Note: This endpoint is deprecated.

V1Category createCategory(locationId, body)

CreateCategory

Creates an item category. --- - Deprecation date: 2019-11-20 - Retirement date: 2020-11-18 - Migration guide ---

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the location to create an item for.
V1Category body = new V1Category(); // V1Category | An object containing the fields to POST for the request.  See the corresponding object definition for field details.
try {
    V1Category result = apiInstance.createCategory(locationId, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#createCategory");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the location to create an item for.
body V1Category An object containing the fields to POST for the request. See the corresponding object definition for field details.

Return type

V1Category

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createDiscount

Note: This endpoint is deprecated.

V1Discount createDiscount(locationId, body)

CreateDiscount

Creates a discount. --- - Deprecation date: 2019-11-20 - Retirement date: 2020-11-18 - Migration guide ---

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the location to create an item for.
V1Discount body = new V1Discount(); // V1Discount | An object containing the fields to POST for the request.  See the corresponding object definition for field details.
try {
    V1Discount result = apiInstance.createDiscount(locationId, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#createDiscount");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the location to create an item for.
body V1Discount An object containing the fields to POST for the request. See the corresponding object definition for field details.

Return type

V1Discount

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createFee

Note: This endpoint is deprecated.

V1Fee createFee(locationId, body)

CreateFee

Creates a fee (tax). --- - Deprecation date: 2019-11-20 - Retirement date: 2020-11-18 - Migration guide ---

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the location to create a fee for.
V1Fee body = new V1Fee(); // V1Fee | An object containing the fields to POST for the request.  See the corresponding object definition for field details.
try {
    V1Fee result = apiInstance.createFee(locationId, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#createFee");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the location to create a fee for.
body V1Fee An object containing the fields to POST for the request. See the corresponding object definition for field details.

Return type

V1Fee

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createItem

Note: This endpoint is deprecated.

V1Item createItem(locationId, body)

CreateItem

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.

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the location to create an item for.
V1Item body = new V1Item(); // V1Item | An object containing the fields to POST for the request.  See the corresponding object definition for field details.
try {
    V1Item result = apiInstance.createItem(locationId, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#createItem");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the location to create an item for.
body V1Item An object containing the fields to POST for the request. See the corresponding object definition for field details.

Return type

V1Item

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createModifierList

Note: This endpoint is deprecated.

V1ModifierList createModifierList(locationId, body)

CreateModifierList

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 ---

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the location to create a modifier list for.
V1ModifierList body = new V1ModifierList(); // V1ModifierList | An object containing the fields to POST for the request.  See the corresponding object definition for field details.
try {
    V1ModifierList result = apiInstance.createModifierList(locationId, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#createModifierList");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the location to create a modifier list for.
body V1ModifierList An object containing the fields to POST for the request. See the corresponding object definition for field details.

Return type

V1ModifierList

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createModifierOption

Note: This endpoint is deprecated.

V1ModifierOption createModifierOption(locationId, modifierListId, body)

CreateModifierOption

Creates an item modifier option and adds it to a modifier list. --- - Deprecation date: 2019-11-20 - Retirement date: 2020-11-18 - Migration guide ---

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the item's associated location.
String modifierListId = "modifierListId_example"; // String | The ID of the modifier list to edit.
V1ModifierOption body = new V1ModifierOption(); // V1ModifierOption | An object containing the fields to POST for the request.  See the corresponding object definition for field details.
try {
    V1ModifierOption result = apiInstance.createModifierOption(locationId, modifierListId, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#createModifierOption");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the item's associated location.
modifierListId String The ID of the modifier list to edit.
body V1ModifierOption An object containing the fields to POST for the request. See the corresponding object definition for field details.

Return type

V1ModifierOption

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createPage

Note: This endpoint is deprecated.

V1Page createPage(locationId, body)

CreatePage

Creates a Favorites page in Square Point of Sale. --- - Deprecation date: 2019-11-20 - Retirement date: 2020-11-18 - Migration guide ---

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the location to create an item for.
V1Page body = new V1Page(); // V1Page | An object containing the fields to POST for the request.  See the corresponding object definition for field details.
try {
    V1Page result = apiInstance.createPage(locationId, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#createPage");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the location to create an item for.
body V1Page An object containing the fields to POST for the request. See the corresponding object definition for field details.

Return type

V1Page

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createVariation

Note: This endpoint is deprecated.

V1Variation createVariation(locationId, itemId, body)

CreateVariation

Creates an item variation for an existing item. --- - Deprecation date: 2019-11-20 - Retirement date: 2020-11-18 - Migration guide ---

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the item's associated location.
String itemId = "itemId_example"; // String | The item's ID.
V1Variation body = new V1Variation(); // V1Variation | An object containing the fields to POST for the request.  See the corresponding object definition for field details.
try {
    V1Variation result = apiInstance.createVariation(locationId, itemId, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#createVariation");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the item's associated location.
itemId String The item's ID.
body V1Variation An object containing the fields to POST for the request. See the corresponding object definition for field details.

Return type

V1Variation

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deleteCategory

Note: This endpoint is deprecated.

V1Category deleteCategory(locationId, categoryId)

DeleteCategory

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.

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the item's associated location.
String categoryId = "categoryId_example"; // String | The ID of the category to delete.
try {
    V1Category result = apiInstance.deleteCategory(locationId, categoryId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#deleteCategory");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the item's associated location.
categoryId String The ID of the category to delete.

Return type

V1Category

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deleteDiscount

Note: This endpoint is deprecated.

V1Discount deleteDiscount(locationId, discountId)

DeleteDiscount

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.

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the item's associated location.
String discountId = "discountId_example"; // String | The ID of the discount to delete.
try {
    V1Discount result = apiInstance.deleteDiscount(locationId, discountId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#deleteDiscount");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the item's associated location.
discountId String The ID of the discount to delete.

Return type

V1Discount

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deleteFee

Note: This endpoint is deprecated.

V1Fee deleteFee(locationId, feeId)

DeleteFee

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.

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the fee's associated location.
String feeId = "feeId_example"; // String | The ID of the fee to delete.
try {
    V1Fee result = apiInstance.deleteFee(locationId, feeId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#deleteFee");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the fee's associated location.
feeId String The ID of the fee to delete.

Return type

V1Fee

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deleteItem

Note: This endpoint is deprecated.

V1Item deleteItem(locationId, itemId)

DeleteItem

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.

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the item's associated location.
String itemId = "itemId_example"; // String | The ID of the item to modify.
try {
    V1Item result = apiInstance.deleteItem(locationId, itemId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#deleteItem");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the item's associated location.
itemId String The ID of the item to modify.

Return type

V1Item

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deleteModifierList

Note: This endpoint is deprecated.

V1ModifierList deleteModifierList(locationId, modifierListId)

DeleteModifierList

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.

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the item's associated location.
String modifierListId = "modifierListId_example"; // String | The ID of the modifier list to delete.
try {
    V1ModifierList result = apiInstance.deleteModifierList(locationId, modifierListId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#deleteModifierList");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the item's associated location.
modifierListId String The ID of the modifier list to delete.

Return type

V1ModifierList

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deleteModifierOption

Note: This endpoint is deprecated.

V1ModifierOption deleteModifierOption(locationId, modifierListId, modifierOptionId)

DeleteModifierOption

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.

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the item's associated location.
String modifierListId = "modifierListId_example"; // String | The ID of the modifier list to delete.
String modifierOptionId = "modifierOptionId_example"; // String | The ID of the modifier list to edit.
try {
    V1ModifierOption result = apiInstance.deleteModifierOption(locationId, modifierListId, modifierOptionId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#deleteModifierOption");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the item's associated location.
modifierListId String The ID of the modifier list to delete.
modifierOptionId String The ID of the modifier list to edit.

Return type

V1ModifierOption

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deletePage

Note: This endpoint is deprecated.

V1Page deletePage(locationId, pageId)

DeletePage

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.

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the Favorites page's associated location.
String pageId = "pageId_example"; // String | The ID of the page to delete.
try {
    V1Page result = apiInstance.deletePage(locationId, pageId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#deletePage");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the Favorites page's associated location.
pageId String The ID of the page to delete.

Return type

V1Page

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deletePageCell

Note: This endpoint is deprecated.

V1Page deletePageCell(locationId, pageId, row, column)

DeletePageCell

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.

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the Favorites page's associated location.
String pageId = "pageId_example"; // String | The ID of the page to delete.
String row = "row_example"; // String | The row of the cell to clear. Always an integer between 0 and 4, inclusive. Row 0 is the top row.
String column = "column_example"; // String | The column of the cell to clear. Always an integer between 0 and 4, inclusive. Column 0 is the leftmost column.
try {
    V1Page result = apiInstance.deletePageCell(locationId, pageId, row, column);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#deletePageCell");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the Favorites page's associated location.
pageId String The ID of the page to delete.
row String The row of the cell to clear. Always an integer between 0 and 4, inclusive. Row 0 is the top row. [optional]
column String The column of the cell to clear. Always an integer between 0 and 4, inclusive. Column 0 is the leftmost column. [optional]

Return type

V1Page

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deleteVariation

Note: This endpoint is deprecated.

V1Variation deleteVariation(locationId, itemId, variationId)

DeleteVariation

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.

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the item's associated location.
String itemId = "itemId_example"; // String | The ID of the item to delete.
String variationId = "variationId_example"; // String | The ID of the variation to delete.
try {
    V1Variation result = apiInstance.deleteVariation(locationId, itemId, variationId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#deleteVariation");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the item's associated location.
itemId String The ID of the item to delete.
variationId String The ID of the variation to delete.

Return type

V1Variation

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

listCategories

Note: This endpoint is deprecated.

List<V1Category> listCategories(locationId)

ListCategories

Lists all the item categories for a given location. --- - Deprecation date: 2019-11-20 - Retirement date: 2020-11-18 - Migration guide ---

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the location to list categories for.
try {
    List<V1Category> result = apiInstance.listCategories(locationId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#listCategories");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the location to list categories for.

Return type

List<V1Category>

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

listDiscounts

Note: This endpoint is deprecated.

List<V1Discount> listDiscounts(locationId)

ListDiscounts

Lists all the discounts for a given location. --- - Deprecation date: 2019-11-20 - Retirement date: 2020-11-18 - Migration guide ---

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the location to list categories for.
try {
    List<V1Discount> result = apiInstance.listDiscounts(locationId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#listDiscounts");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the location to list categories for.

Return type

List<V1Discount>

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

listFees

Note: This endpoint is deprecated.

List<V1Fee> listFees(locationId)

ListFees

Lists all the fees (taxes) for a given location. --- - Deprecation date: 2019-11-20 - Retirement date: 2020-11-18 - Migration guide ---

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the location to list fees for.
try {
    List<V1Fee> result = apiInstance.listFees(locationId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#listFees");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the location to list fees for.

Return type

List<V1Fee>

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

listInventory

Note: This endpoint is deprecated.

List<V1InventoryEntry> listInventory(locationId, limit, batchToken)

ListInventory

Provides inventory information for all inventory-enabled item variations. --- - Deprecation date: 2019-11-20 - Retirement date: 2020-11-18 - Migration guide ---

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the item's associated location.
Integer limit = 56; // Integer | The maximum number of inventory entries to return in a single response. This value cannot exceed 1000.
String batchToken = "batchToken_example"; // String | A pagination cursor to retrieve the next set of results for your original query to the endpoint.
try {
    List<V1InventoryEntry> result = apiInstance.listInventory(locationId, limit, batchToken);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#listInventory");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the item's associated location.
limit Integer The maximum number of inventory entries to return in a single response. This value cannot exceed 1000. [optional]
batchToken String A pagination cursor to retrieve the next set of results for your original query to the endpoint. [optional]

Return type

List<V1InventoryEntry>

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

listItems

Note: This endpoint is deprecated.

List<V1Item> listItems(locationId, batchToken)

ListItems

Provides summary information of all items for a given location. --- - Deprecation date: 2019-11-20 - Retirement date: 2020-11-18 - Migration guide ---

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the location to list items for.
String batchToken = "batchToken_example"; // String | A pagination cursor to retrieve the next set of results for your original query to the endpoint.
try {
    List<V1Item> result = apiInstance.listItems(locationId, batchToken);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#listItems");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the location to list items for.
batchToken String A pagination cursor to retrieve the next set of results for your original query to the endpoint. [optional]

Return type

List<V1Item>

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

listModifierLists

Note: This endpoint is deprecated.

List<V1ModifierList> listModifierLists(locationId)

ListModifierLists

Lists all the modifier lists for a given location. --- - Deprecation date: 2019-11-20 - Retirement date: 2020-11-18 - Migration guide ---

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the location to list modifier lists for.
try {
    List<V1ModifierList> result = apiInstance.listModifierLists(locationId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#listModifierLists");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the location to list modifier lists for.

Return type

List<V1ModifierList>

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

listPages

Note: This endpoint is deprecated.

List<V1Page> listPages(locationId)

ListPages

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 ---

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the location to list Favorites pages for.
try {
    List<V1Page> result = apiInstance.listPages(locationId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#listPages");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the location to list Favorites pages for.

Return type

List<V1Page>

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

removeFee

Note: This endpoint is deprecated.

V1Item removeFee(locationId, itemId, feeId)

RemoveFee

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 ---

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the fee's associated location.
String itemId = "itemId_example"; // String | The ID of the item to add the fee to.
String feeId = "feeId_example"; // String | The ID of the fee to apply.
try {
    V1Item result = apiInstance.removeFee(locationId, itemId, feeId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#removeFee");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the fee's associated location.
itemId String The ID of the item to add the fee to.
feeId String The ID of the fee to apply.

Return type

V1Item

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

removeModifierList

Note: This endpoint is deprecated.

V1Item removeModifierList(locationId, modifierListId, itemId)

RemoveModifierList

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 ---

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the item's associated location.
String modifierListId = "modifierListId_example"; // String | The ID of the modifier list to remove.
String itemId = "itemId_example"; // String | The ID of the item to remove the modifier list from.
try {
    V1Item result = apiInstance.removeModifierList(locationId, modifierListId, itemId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#removeModifierList");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the item's associated location.
modifierListId String The ID of the modifier list to remove.
itemId String The ID of the item to remove the modifier list from.

Return type

V1Item

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

retrieveItem

Note: This endpoint is deprecated.

V1Item retrieveItem(locationId, itemId)

RetrieveItem

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 ---

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the item's associated location.
String itemId = "itemId_example"; // String | The item's ID.
try {
    V1Item result = apiInstance.retrieveItem(locationId, itemId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#retrieveItem");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the item's associated location.
itemId String The item's ID.

Return type

V1Item

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

retrieveModifierList

Note: This endpoint is deprecated.

V1ModifierList retrieveModifierList(locationId, modifierListId)

RetrieveModifierList

Provides the details for a single modifier list. --- - Deprecation date: 2019-11-20 - Retirement date: 2020-11-18 - Migration guide ---

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the item's associated location.
String modifierListId = "modifierListId_example"; // String | The modifier list's ID.
try {
    V1ModifierList result = apiInstance.retrieveModifierList(locationId, modifierListId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#retrieveModifierList");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the item's associated location.
modifierListId String The modifier list's ID.

Return type

V1ModifierList

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

updateCategory

Note: This endpoint is deprecated.

V1Category updateCategory(locationId, categoryId, body)

UpdateCategory

Modifies the details of an existing item category. --- - Deprecation date: 2019-11-20 - Retirement date: 2020-11-18 - Migration guide ---

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the category's associated location.
String categoryId = "categoryId_example"; // String | The ID of the category to edit.
V1Category body = new V1Category(); // V1Category | An object containing the fields to POST for the request.  See the corresponding object definition for field details.
try {
    V1Category result = apiInstance.updateCategory(locationId, categoryId, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#updateCategory");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the category's associated location.
categoryId String The ID of the category to edit.
body V1Category An object containing the fields to POST for the request. See the corresponding object definition for field details.

Return type

V1Category

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

updateDiscount

Note: This endpoint is deprecated.

V1Discount updateDiscount(locationId, discountId, body)

UpdateDiscount

Modifies the details of an existing discount. --- - Deprecation date: 2019-11-20 - Retirement date: 2020-11-18 - Migration guide ---

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the category's associated location.
String discountId = "discountId_example"; // String | The ID of the discount to edit.
V1Discount body = new V1Discount(); // V1Discount | An object containing the fields to POST for the request.  See the corresponding object definition for field details.
try {
    V1Discount result = apiInstance.updateDiscount(locationId, discountId, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#updateDiscount");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the category's associated location.
discountId String The ID of the discount to edit.
body V1Discount An object containing the fields to POST for the request. See the corresponding object definition for field details.

Return type

V1Discount

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

updateFee

Note: This endpoint is deprecated.

V1Fee updateFee(locationId, feeId, body)

UpdateFee

Modifies the details of an existing fee (tax). --- - Deprecation date: 2019-11-20 - Retirement date: 2020-11-18 - Migration guide ---

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the fee's associated location.
String feeId = "feeId_example"; // String | The ID of the fee to edit.
V1Fee body = new V1Fee(); // V1Fee | An object containing the fields to POST for the request.  See the corresponding object definition for field details.
try {
    V1Fee result = apiInstance.updateFee(locationId, feeId, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#updateFee");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the fee's associated location.
feeId String The ID of the fee to edit.
body V1Fee An object containing the fields to POST for the request. See the corresponding object definition for field details.

Return type

V1Fee

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

updateItem

Note: This endpoint is deprecated.

V1Item updateItem(locationId, itemId, body)

UpdateItem

Modifies the core details of an existing item. --- - Deprecation date: 2019-11-20 - Retirement date: 2020-11-18 - Migration guide ---

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the item's associated location.
String itemId = "itemId_example"; // String | The ID of the item to modify.
V1Item body = new V1Item(); // V1Item | An object containing the fields to POST for the request.  See the corresponding object definition for field details.
try {
    V1Item result = apiInstance.updateItem(locationId, itemId, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#updateItem");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the item's associated location.
itemId String The ID of the item to modify.
body V1Item An object containing the fields to POST for the request. See the corresponding object definition for field details.

Return type

V1Item

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

updateModifierList

Note: This endpoint is deprecated.

V1ModifierList updateModifierList(locationId, modifierListId, body)

UpdateModifierList

Modifies the details of an existing item modifier list. --- - Deprecation date: 2019-11-20 - Retirement date: 2020-11-18 - Migration guide ---

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the item's associated location.
String modifierListId = "modifierListId_example"; // String | The ID of the modifier list to edit.
V1UpdateModifierListRequest body = new V1UpdateModifierListRequest(); // V1UpdateModifierListRequest | An object containing the fields to POST for the request.  See the corresponding object definition for field details.
try {
    V1ModifierList result = apiInstance.updateModifierList(locationId, modifierListId, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#updateModifierList");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the item's associated location.
modifierListId String The ID of the modifier list to edit.
body V1UpdateModifierListRequest An object containing the fields to POST for the request. See the corresponding object definition for field details.

Return type

V1ModifierList

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

updateModifierOption

Note: This endpoint is deprecated.

V1ModifierOption updateModifierOption(locationId, modifierListId, modifierOptionId, body)

UpdateModifierOption

Modifies the details of an existing item modifier option. --- - Deprecation date: 2019-11-20 - Retirement date: 2020-11-18 - Migration guide ---

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the item's associated location.
String modifierListId = "modifierListId_example"; // String | The ID of the modifier list to edit.
String modifierOptionId = "modifierOptionId_example"; // String | The ID of the modifier list to edit.
V1ModifierOption body = new V1ModifierOption(); // V1ModifierOption | An object containing the fields to POST for the request.  See the corresponding object definition for field details.
try {
    V1ModifierOption result = apiInstance.updateModifierOption(locationId, modifierListId, modifierOptionId, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#updateModifierOption");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the item's associated location.
modifierListId String The ID of the modifier list to edit.
modifierOptionId String The ID of the modifier list to edit.
body V1ModifierOption An object containing the fields to POST for the request. See the corresponding object definition for field details.

Return type

V1ModifierOption

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

updatePage

Note: This endpoint is deprecated.

V1Page updatePage(locationId, pageId, body)

UpdatePage

Modifies the details of a Favorites page in Square Point of Sale. --- - Deprecation date: 2019-11-20 - Retirement date: 2020-11-18 - Migration guide ---

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the Favorites page's associated location
String pageId = "pageId_example"; // String | The ID of the page to modify.
V1Page body = new V1Page(); // V1Page | An object containing the fields to POST for the request.  See the corresponding object definition for field details.
try {
    V1Page result = apiInstance.updatePage(locationId, pageId, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#updatePage");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the Favorites page's associated location
pageId String The ID of the page to modify.
body V1Page An object containing the fields to POST for the request. See the corresponding object definition for field details.

Return type

V1Page

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

updatePageCell

Note: This endpoint is deprecated.

V1Page updatePageCell(locationId, pageId, body)

UpdatePageCell

Modifies a cell of a Favorites page in Square Point of Sale. --- - Deprecation date: 2019-11-20 - Retirement date: 2020-11-18 - Migration guide ---

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the Favorites page's associated location.
String pageId = "pageId_example"; // String | The ID of the page the cell belongs to.
V1PageCell body = new V1PageCell(); // V1PageCell | An object containing the fields to POST for the request.  See the corresponding object definition for field details.
try {
    V1Page result = apiInstance.updatePageCell(locationId, pageId, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#updatePageCell");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the Favorites page's associated location.
pageId String The ID of the page the cell belongs to.
body V1PageCell An object containing the fields to POST for the request. See the corresponding object definition for field details.

Return type

V1Page

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

updateVariation

Note: This endpoint is deprecated.

V1Variation updateVariation(locationId, itemId, variationId, body)

UpdateVariation

Modifies the details of an existing item variation. --- - Deprecation date: 2019-11-20 - Retirement date: 2020-11-18 - Migration guide ---

Example

// Import classes:
//import com.squareup.connect.ApiClient;
//import com.squareup.connect.ApiException;
//import com.squareup.connect.Configuration;
//import com.squareup.connect.auth.*;
//import com.squareup.connect.api.V1ItemsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

V1ItemsApi apiInstance = new V1ItemsApi();
String locationId = "locationId_example"; // String | The ID of the item's associated location.
String itemId = "itemId_example"; // String | The ID of the item to modify.
String variationId = "variationId_example"; // String | The ID of the variation to modify.
V1Variation body = new V1Variation(); // V1Variation | An object containing the fields to POST for the request.  See the corresponding object definition for field details.
try {
    V1Variation result = apiInstance.updateVariation(locationId, itemId, variationId, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling V1ItemsApi#updateVariation");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
locationId String The ID of the item's associated location.
itemId String The ID of the item to modify.
variationId String The ID of the variation to modify.
body V1Variation An object containing the fields to POST for the request. See the corresponding object definition for field details.

Return type

V1Variation

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json