<- Order Custom Attributes API

Order Custom Attributes API

Bulk upsert order custom attributesBeta

POST

 /v2/orders/custom-attributes/bulk-upsert

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 BulkUpsertOrderCustomAttributes endpoint accepts a map of 1 to 25 individual upsert requests and returns a map of individual upsert responses. Each upsert request has a unique ID and provides an order ID and custom attribute. Each upsert response is returned with the ID of the corresponding request.

To create or update 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.

Permissions:ORDERS_WRITE
Link to section

Request body

Example code

Link to section

values

Required

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

Link to section

Response fields

Link to section

errors

Any errors that occurred during the request.

Link to section

values

Required

A map of responses that correspond to individual upsert operations for custom attributes.