LocationCustomAttributes
UpsertLocationCustomAttribute
Creates or updates a custom attribute for a location. Use this endpoint to set the value of a custom attribute for a specified location. A custom attribute is based on a custom attribute definition in a Square seller account, which is created using the CreateLocationCustomAttributeDefinition endpoint. To create or update a custom attribute owned by another application, the visibility setting must be VISIBILITY_READ_WRITE_VALUES.
post/v2/locations/{location_id}/custom-attributes/{key}
Path parameters
location_idstring required
The ID of the target location.
keystring required
The key of the custom attribute to create or update. This key must match the key of a custom attribute definition in the Square seller account. If the requesting application is not the definition owner, you must use the qualified key.
Request body
Example request
{
"custom_attribute": {
"value": "hot cocoa"
}
}Response
Success
Example response
{
"custom_attribute": {
"created_at": "2023-01-09T19:02:58.647Z",
"key": "bestseller",
"updated_at": "2023-01-09T19:21:04.551Z",
"value": "hot cocoa",
"version": 2,
"visibility": "VISIBILITY_READ_WRITE_VALUES"
}
}