Object Index / Definition

You are viewing an old version of the API
Catalog​Object

The wrapper object for object types in the Catalog data model

The type of a particular CatalogObject is determined by the value of type and only the corresponding data field may be set.

  • if type = ITEM, only item_data will be populated and it will contain a valid CatalogItem object.
  • if type = ITEM_VARIATION, only item_variation_data will be populated and it will contain a valid CatalogItemVariation object.
  • if type = MODIFIER, only modifier_data will be populated and it will contain a valid CatalogModifier object.
  • if type = MODIFIER_LIST, only modifier_list_data will be populated and it will contain a valid CatalogModifierList object.
  • if type = CATEGORY, only category_data will be populated and it will contain a valid CatalogCategory object.
  • if type = DISCOUNT, only discount_data will be populated and it will contain a valid CatalogDiscount object.
  • if type = TAX, only tax_data will be populated and it will contain a valid CatalogTax object.
  • if type = IMAGE, only image_data will be populated and it will contain a valid CatalogImage object.

For a more detailed discussion of the Catalog data model, please see the Design a Catalog guide.

Properties

Name Description
id
string

Required

An identifier to reference this object in the catalog. When a new CatalogObject is inserted, the client should set the id to a temporary identifier starting with a "#" character. Other objects being inserted or updated within the same request may use this identifier to refer to the new object.

When the server receives the new object, it will supply a unique identifier that replaces the temporary identifier for all future references.

Min Length 1
type
string

Required

The type of this object. Each object type has expected properties expressed in a structured format within its corresponding *_data field below.

absent_at_location_ids
string [ ]

A list of locations where the object is not present, even if present_at_all_locations is true.

catalog_v1_ids
Catalog​V1​Id [ ]

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.

category_data
Catalog​Category

Structured data for a CatalogCategory, set for CatalogObjects of type CATEGORY.

discount_data
Catalog​Discount

Structured data for a CatalogDiscount, set for CatalogObjects of type DISCOUNT.

image_data
Catalog​Image

Structured data for a CatalogImage, set for CatalogObjects of type IMAGE.

image_id
string

Identifies the CatalogImage attached to this CatalogObject.

is_deleted
boolean

If true, the object has been deleted from the database. Must be false for new objects being inserted. When deleted, the updated_at field will equal the deletion time.

item_data
Catalog​Item

Structured data for a CatalogItem, set for CatalogObjects of type ITEM.

item_option_data
Catalog​Item​Option

Beta

Structured data for a CatalogItemOption, set for CatalogObjects of type ITEM_OPTION.

item_option_value_data
Catalog​Item​Option​Value

Beta

Structured data for a CatalogItemOptionValue, set for CatalogObjects of type ITEM_OPTION_VAL.

item_variation_data
Catalog​Item​Variation

Structured data for a CatalogItemVariation, set for CatalogObjects of type ITEM_VARIATION.

measurement_unit_data
Catalog​Measurement​Unit

Beta

Structured data for a CatalogMeasurementUnit, set for CatalogObjects of type MEASUREMENT_UNIT.

modifier_data
Catalog​Modifier

Structured data for a CatalogModifier, set for CatalogObjects of type MODIFIER.

modifier_list_data
Catalog​Modifier​List

Structured data for a CatalogModifierList, set for CatalogObjects of type MODIFIER_LIST.

present_at_all_locations
boolean

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.

present_at_location_ids
string [ ]

A list of locations where the object is present, even if present_at_all_locations is false.

pricing_rule_data
Catalog​Pricing​Rule

Beta

Structured data for a CatalogPricingRule, set for CatalogObjects of type PRICING_RULE.

product_set_data
Catalog​Product​Set

Beta

Structured data for a CatalogProductSet, set for CatalogObjects of type PRODUCT_SET.

tax_data
Catalog​Tax

Structured data for a CatalogTax, set for CatalogObjects of type TAX.

time_period_data
Catalog​Time​Period

Beta

Structured data for a CatalogTimePeriod, set for CatalogObjects of type TIME_PERIOD.

updated_at
string

Last modification timestamp in RFC 3339 format, e.g., "2016-08-15T23:59:33.123Z" would indicate the UTC time (denoted by Z) of August 15, 2016 at 23:59:33 and 123 milliseconds.

version
integer

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.

Share Feedback

Thanks for visiting the Square API documentation. What's on your mind?