• Example searches: “transaction”, “CreateOrder”, “/v2/locations”, “inventory”, “delete customer”

You are viewing an old version of the API
Delete catalog object

DELETE /v2/catalog/object/{object_id}

Deletes a single CatalogObject based on the provided ID and returns the set of successfully deleted IDs in the response.

Deletion is a cascading event such that all children of the targeted object are also deleted. For example, deleting a CatalogItem will also delete all of its CatalogItemVariation children.


Permissions
ITEMS_WRITE
Try in API Explorer
Name Description
object_id
string

Required

The ID of the catalog object to be deleted. When an object is deleted, other objects in the graph that depend on that object will be deleted as well (for example, deleting a catalog item will delete its catalog item variations).

Response Fields

Name Description
errors
Error [ ]

Information on any errors encountered.

deleted_object_ids
string [ ]

The IDs of all catalog objects deleted by this request. Multiple IDs may be returned when associated objects are also deleted, for example a catalog item variation will be deleted (and its ID included in this field) when its parent catalog item is deleted.

deleted_at
string

The database timestamp of this deletion in RFC 3339 format, e.g., 2016-09-04T23:59:33.123Z.

Examples for January 25th, 2020 6:25:34pm Pacific Standard Time:

UTC: 2020-01-26T02:25:34Z

Pacific Standard Time with UTC offset: 2020-01-25T18:25:34-08:00

Examples

You are viewing an old version of the API
DELETE /v2/catalog/object/{object_id}
cURL
  • cURL
  • Ruby
  • Python
  • C#
  • Java
  • PHP
curl https://connect.squareup.com/v2/catalog/object/7SB3ZQYJ5GDMVFL7JK46JCHT \
  -X DELETE \
  -H 'Square-Version: 2020-09-23' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json'
Response JSON
{
  "deleted_object_ids": [
    "7SB3ZQYJ5GDMVFL7JK46JCHT",
    "KQLFFHA6K6J3YQAQAWDQAL57"
  ],
  "deleted_at": "2016-11-16T22:25:24.878Z"
}

Share Feedback

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