When not used temporarily, a catalog item can be archived. An archived catalog item is not displayable in Square Seller Dashboard or on Square POS devices. Otherwise, it is fully functional. In particular, it can be updated to become unarchived and thus becomes displayable again in the Seller Dashboard or POS.
Operationally speaking, an archived item has the is_archived field set to true on the CatalogItem instances. They become unarchived when the is_archived field is set to false.
If the item ID is not known, the archived catalog item can be queried by calling SearchCatalogItems with the archived_state=ARCHIVED_STATE_ARCHIVED query expression. The archived_state filter can take other ArchivedState value to support returning not archived catalog items or both of archived and not archived items.
Unlike a deleted object, an archived item remains operable, except for not being displayable in the Square Seller Dashboard or on Square POS devices.
For example, given the item ID, you can call RetrieveCatalogObject to retrieve an archived item.
Link to section
Request: retrieve an archived item
The following example shows how to call the RetrieveCatalogObject endpoint to return an archived item that is identified by the specified item ID (XOHN3EEAZAM37VLUSQD52BN6):
If the item has not been changed since it is last archived, the response is identical to that returned when the the item was archived. For an example response, see Response: archive an item
Link to section
Search for archived items
When archived item IDs are not known, you can query archived items by calling the SearchCatalogItems endpoint while specifying the archived_state query filter to ARCHIVED_STATE_ARCHIVED.
Link to section
Request: search for archived items
The following example shows how to call SearchCatalogItems to query archived items:
An archived item can be unarchived and become displayable again in the Square Seller Dashboard or on Square POS devices. To do so, call the UpsertCatalogObject while specifying the archived item ID, setting the is_archived field to true, and keeping other write-able properties intact.
Link to section
Request: unarchive an item
The following example request shows how to unarchive an archived item.