Skip to content

Latest commit

 

History

History
2183 lines (1446 loc) · 74.6 KB

V1ItemsApi.md

File metadata and controls

2183 lines (1446 loc) · 74.6 KB

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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the item's associated location.

var variationId = "variationId_example"; // String | The ID of the variation to adjust inventory information for.

var body = new SquareConnect.V1AdjustInventoryRequest(); // V1AdjustInventoryRequest | An object containing the fields to POST for the request.  See the corresponding object definition for field details.

apiInstance.adjustInventory(locationId, variationId, body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the fee's associated location.

var itemId = "itemId_example"; // String | The ID of the item to add the fee to.

var feeId = "feeId_example"; // String | The ID of the fee to apply.

apiInstance.applyFee(locationId, itemId, feeId).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the item's associated location.

var modifierListId = "modifierListId_example"; // String | The ID of the modifier list to apply.

var itemId = "itemId_example"; // String | The ID of the item to add the modifier list to.

apiInstance.applyModifierList(locationId, modifierListId, itemId).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the location to create an item for.

var body = new SquareConnect.V1Category(); // V1Category | An object containing the fields to POST for the request.  See the corresponding object definition for field details.

apiInstance.createCategory(locationId, body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the location to create an item for.

var body = new SquareConnect.V1Discount(); // V1Discount | An object containing the fields to POST for the request.  See the corresponding object definition for field details.

apiInstance.createDiscount(locationId, body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the location to create a fee for.

var body = new SquareConnect.V1Fee(); // V1Fee | An object containing the fields to POST for the request.  See the corresponding object definition for field details.

apiInstance.createFee(locationId, body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the location to create an item for.

var body = new SquareConnect.V1Item(); // V1Item | An object containing the fields to POST for the request.  See the corresponding object definition for field details.

apiInstance.createItem(locationId, body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the location to create a modifier list for.

var body = new SquareConnect.V1ModifierList(); // V1ModifierList | An object containing the fields to POST for the request.  See the corresponding object definition for field details.

apiInstance.createModifierList(locationId, body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the item's associated location.

var modifierListId = "modifierListId_example"; // String | The ID of the modifier list to edit.

var body = new SquareConnect.V1ModifierOption(); // V1ModifierOption | An object containing the fields to POST for the request.  See the corresponding object definition for field details.

apiInstance.createModifierOption(locationId, modifierListId, body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the location to create an item for.

var body = new SquareConnect.V1Page(); // V1Page | An object containing the fields to POST for the request.  See the corresponding object definition for field details.

apiInstance.createPage(locationId, body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the item's associated location.

var itemId = "itemId_example"; // String | The item's ID.

var body = new SquareConnect.V1Variation(); // V1Variation | An object containing the fields to POST for the request.  See the corresponding object definition for field details.

apiInstance.createVariation(locationId, itemId, body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the item's associated location.

var categoryId = "categoryId_example"; // String | The ID of the category to delete.

apiInstance.deleteCategory(locationId, categoryId).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the item's associated location.

var discountId = "discountId_example"; // String | The ID of the discount to delete.

apiInstance.deleteDiscount(locationId, discountId).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the fee's associated location.

var feeId = "feeId_example"; // String | The ID of the fee to delete.

apiInstance.deleteFee(locationId, feeId).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the item's associated location.

var itemId = "itemId_example"; // String | The ID of the item to modify.

apiInstance.deleteItem(locationId, itemId).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the item's associated location.

var modifierListId = "modifierListId_example"; // String | The ID of the modifier list to delete.

apiInstance.deleteModifierList(locationId, modifierListId).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the item's associated location.

var modifierListId = "modifierListId_example"; // String | The ID of the modifier list to delete.

var modifierOptionId = "modifierOptionId_example"; // String | The ID of the modifier list to edit.

apiInstance.deleteModifierOption(locationId, modifierListId, modifierOptionId).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the Favorites page's associated location.

var pageId = "pageId_example"; // String | The ID of the page to delete.

apiInstance.deletePage(locationId, pageId).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

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, opts)

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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the Favorites page's associated location.

var pageId = "pageId_example"; // String | The ID of the page to delete.

var opts = { 
  '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.
  '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.
};
apiInstance.deletePageCell(locationId, pageId, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the item's associated location.

var itemId = "itemId_example"; // String | The ID of the item to delete.

var variationId = "variationId_example"; // String | The ID of the variation to delete.

apiInstance.deleteVariation(locationId, itemId, variationId).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

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.

[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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the location to list categories for.

apiInstance.listCategories(locationId).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

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

Return type

[V1Category]

Authorization

oauth2

HTTP request headers

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

listDiscounts

Note: This endpoint is deprecated.

[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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the location to list categories for.

apiInstance.listDiscounts(locationId).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

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

Return type

[V1Discount]

Authorization

oauth2

HTTP request headers

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

listFees

Note: This endpoint is deprecated.

[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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the location to list fees for.

apiInstance.listFees(locationId).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

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

Return type

[V1Fee]

Authorization

oauth2

HTTP request headers

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

listInventory

Note: This endpoint is deprecated.

[V1InventoryEntry] listInventory(locationId, opts)

ListInventory

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

Example

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the item's associated location.

var opts = { 
  'limit': 56, // Number | The maximum number of inventory entries to return in a single response. This value cannot exceed 1000.
  'batchToken': "batchToken_example" // String | A pagination cursor to retrieve the next set of results for your original query to the endpoint.
};
apiInstance.listInventory(locationId, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
locationId String The ID of the item's associated location.
limit Number 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

[V1InventoryEntry]

Authorization

oauth2

HTTP request headers

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

listItems

Note: This endpoint is deprecated.

[V1Item] listItems(locationId, opts)

ListItems

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

Example

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the location to list items for.

var opts = { 
  'batchToken': "batchToken_example" // String | A pagination cursor to retrieve the next set of results for your original query to the endpoint.
};
apiInstance.listItems(locationId, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

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

[V1Item]

Authorization

oauth2

HTTP request headers

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

listModifierLists

Note: This endpoint is deprecated.

[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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the location to list modifier lists for.

apiInstance.listModifierLists(locationId).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

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

Return type

[V1ModifierList]

Authorization

oauth2

HTTP request headers

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

listPages

Note: This endpoint is deprecated.

[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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the location to list Favorites pages for.

apiInstance.listPages(locationId).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

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

Return type

[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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the fee's associated location.

var itemId = "itemId_example"; // String | The ID of the item to add the fee to.

var feeId = "feeId_example"; // String | The ID of the fee to apply.

apiInstance.removeFee(locationId, itemId, feeId).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the item's associated location.

var modifierListId = "modifierListId_example"; // String | The ID of the modifier list to remove.

var itemId = "itemId_example"; // String | The ID of the item to remove the modifier list from.

apiInstance.removeModifierList(locationId, modifierListId, itemId).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the item's associated location.

var itemId = "itemId_example"; // String | The item's ID.

apiInstance.retrieveItem(locationId, itemId).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the item's associated location.

var modifierListId = "modifierListId_example"; // String | The modifier list's ID.

apiInstance.retrieveModifierList(locationId, modifierListId).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the category's associated location.

var categoryId = "categoryId_example"; // String | The ID of the category to edit.

var body = new SquareConnect.V1Category(); // V1Category | An object containing the fields to POST for the request.  See the corresponding object definition for field details.

apiInstance.updateCategory(locationId, categoryId, body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the category's associated location.

var discountId = "discountId_example"; // String | The ID of the discount to edit.

var body = new SquareConnect.V1Discount(); // V1Discount | An object containing the fields to POST for the request.  See the corresponding object definition for field details.

apiInstance.updateDiscount(locationId, discountId, body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the fee's associated location.

var feeId = "feeId_example"; // String | The ID of the fee to edit.

var body = new SquareConnect.V1Fee(); // V1Fee | An object containing the fields to POST for the request.  See the corresponding object definition for field details.

apiInstance.updateFee(locationId, feeId, body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the item's associated location.

var itemId = "itemId_example"; // String | The ID of the item to modify.

var body = new SquareConnect.V1Item(); // V1Item | An object containing the fields to POST for the request.  See the corresponding object definition for field details.

apiInstance.updateItem(locationId, itemId, body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the item's associated location.

var modifierListId = "modifierListId_example"; // String | The ID of the modifier list to edit.

var body = new SquareConnect.V1UpdateModifierListRequest(); // V1UpdateModifierListRequest | An object containing the fields to POST for the request.  See the corresponding object definition for field details.

apiInstance.updateModifierList(locationId, modifierListId, body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the item's associated location.

var modifierListId = "modifierListId_example"; // String | The ID of the modifier list to edit.

var modifierOptionId = "modifierOptionId_example"; // String | The ID of the modifier list to edit.

var body = new SquareConnect.V1ModifierOption(); // V1ModifierOption | An object containing the fields to POST for the request.  See the corresponding object definition for field details.

apiInstance.updateModifierOption(locationId, modifierListId, modifierOptionId, body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the Favorites page's associated location

var pageId = "pageId_example"; // String | The ID of the page to modify.

var body = new SquareConnect.V1Page(); // V1Page | An object containing the fields to POST for the request.  See the corresponding object definition for field details.

apiInstance.updatePage(locationId, pageId, body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the Favorites page's associated location.

var pageId = "pageId_example"; // String | The ID of the page the cell belongs to.

var body = new SquareConnect.V1PageCell(); // V1PageCell | An object containing the fields to POST for the request.  See the corresponding object definition for field details.

apiInstance.updatePageCell(locationId, pageId, body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

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

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1ItemsApi();

var locationId = "locationId_example"; // String | The ID of the item's associated location.

var itemId = "itemId_example"; // String | The ID of the item to modify.

var variationId = "variationId_example"; // String | The ID of the variation to modify.

var body = new SquareConnect.V1Variation(); // V1Variation | An object containing the fields to POST for the request.  See the corresponding object definition for field details.

apiInstance.updateVariation(locationId, itemId, variationId, body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

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