JDBC Driver for Square

Build 22.0.8462

AddItemImage

Uploads an image file to be represented by a CatalogImage object linked to an existing CatalogObject instance.

Table Specific Information

Catalog Item Variations

You cannot attach an image to a new item without item variations. To create itemVariations, you must insert data in a temporary table called 'CatalogItemVariations#TEMP'.

Example: Create a catalog item variation

INSERT INTO CatalogItemVariations#TEMP (Id, Name, PriceMoneyAmount, PriceMoneyCurrency, PricingType) VALUES ('#456', 'Image Test Variation', '250000', 'USD', 'FIXED_PRICING')

Execute

After creating at least one item variation, you can execute the stored procedure.

EXECUTE AddItemImage ObjectId='#123', ImageId='MMMY47ZSOGZ27RHPPDCTVSK2', ItemDataName='CreateItem', ItemDataProductType='APPOINTMENTS_SERVICE', ItemDataVariations='CatalogItemVariations#TEMP'

Input

Name Type Required Description
ObjectId String True Unique ID of the CatalogObject to attach to this CatalogImage. Leave this field empty to create unattached images
AbsentAtLocationIds String False A comma separated list of locations where the object is not present, even if present_at_all_locations is true. This can include locations that are deactivated.
CatalogV1Ids String False The Connect v1 IDs for this object at each location where it is present, where they differ from the object's Connect V2 ID. The field will only be present for objects that have been created or modified by legacy APIs.
ImageId String True Identifies the CatalogImage attached to this CatalogObject.
ItemDataAbbreviation String False The text of the item's display label in the Square Point of Sale app. Only up to the first five characters of the string are used.
ItemDataAvailableElectronically Boolean False If true, the item can be added to electronically fulfilled orders from the merchant's online store.
ItemDataAvailableForPickUp Boolean False If true, the item can be added to pickup orders from the merchant's online store.
ItemDataAvailableOnline Boolean False If true, the item can be added to shipping orders from the merchant's online store.
ItemDataCategoryId String False The ID of the item's category, if any.
ItemDataDescription String False The item's description.
ItemDataLabelColor String False The color of the item's display label in the Square Point of Sale app. This must be a valid hex color code.
ItemDataModifierListInfo String False A set of CatalogItemModifierListInfo objects representing the modifier lists that apply to this item, along with the overrides and min and max limits that are specific to this item
ItemDataName String False The item's name.
ItemDataProductType String False The product type of the item. May not be changed once an item has been created. Only items of product type REGULAR or APPOINTMENTS_SERVICE may be created by this API;
ItemDataSkipModifierScreen Boolean False If false, the Square Point of Sale app will present the CatalogItem's details screen immediately, allowing the merchant to choose CatalogModifiers before adding the item to the cart. This is the default behavior. If true, the Square Point of Sale app will immediately add the item to the cart with the pre-selected modifiers, and merchants can edit modifiers by drilling down onto the item's details.
ItemDataTaxIds String False A set of IDs indicating the taxes enabled for this item. When updating an item, any taxes listed here will be added to the item.
ItemDataVariations String False A list of CatalogItemVariation objects for this item. An item must have at least one variation.
PresentAtAllLocations Boolean False If true, this object is present at all locations (including future locations), except where specified in the absent_at_location_ids field. If false, this object is not present at any locations (including future locations), except where specified in the present_at_location_ids field. If not specified, defaults to true.
PresentAtAllLocationIds String False A comma separated list of locations where the object is present, even if present_at_all_locations is false. This can include locations that are deactivated.
ObjectVersion Integer False The version of the object. When updating an object, the version supplied must match the version in the database, otherwise the write will be rejected as conflicting.

Result Set Columns

Name Type Description
Success Boolean Whether or not the image was attached to the item.
ImageId String Id of the Image.
ObjectId String Id of the Catalog Object to which the image is attached.

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8462