v1

latestOpenAPI 3.0.0Apache 2.02026-07-143281,4552.1 MB
OrderCustomAttributes

BulkDeleteOrderCustomAttributes

Deletes order custom attributes as a bulk operation.

Use this endpoint to delete one or more custom attributes from one or more orders. A custom attribute is based on a custom attribute definition in a Square seller account. (To create a custom attribute definition, use the CreateOrderCustomAttributeDefinition endpoint.)

This BulkDeleteOrderCustomAttributes endpoint accepts a map of 1 to 25 individual delete requests and returns a map of individual delete responses. Each delete request has a unique ID and provides an order ID and custom attribute. Each delete response is returned with the ID of the corresponding request.

To delete a custom attribute owned by another application, the visibility setting must be VISIBILITY_READ_WRITE_VALUES. Note that seller-defined custom attributes (also known as custom fields) are always set to VISIBILITY_READ_WRITE_VALUES.

post/v2/orders/custom-attributes/bulk-delete

Request body

valuesobject required

A map of requests that correspond to individual delete operations for custom attributes.

Example request

{
  "values": {
    "cover-count": {
      "key": "cover-count",
      "order_id": "7BbXGEIWNldxAzrtGf9GPVZTwZ4F"
    },
    "table-number": {
      "key": "table-number",
      "order_id": "7BbXGEIWNldxAzrtGf9GPVZTwZ4F"
    }
  }
}

Response

Success

valuesobject required

A map of responses that correspond to individual delete requests. Each response has the same ID as the corresponding request and contains either a custom_attribute or an errors field.

Example response

{
  "values": {
    "cover-count": {},
    "table-number": {}
  }
}