Value of attribute_name in CatalogQuerySortedAttribute

In the Catalog Search API as seen in (https://developer.squareup.com/reference/square/catalog-api/search-catalog-objects) we have property in the request body called sorted_attribute_query which has parameters attribute_name and sort_order. Can I know what are the possible attribute_name values that are valid? There is nothing mentioned in the API docs with respect to this? The only thing that seems to work out is ‘name’, but if I pass in any other attribute I get the error below:

   {
        "errors": [
            {
                "category": "INVALID_REQUEST_ERROR",
                "code": "INVALID_VALUE",
                "detail": "Unknown attribute definition name \"updated_at\".",
                "field": "sorted_attribute_query.attribute_name"
            }
        ]
    }

Am I missing something over here?

Hi @PavanVasan welcome to the forums!

I believe only attributes within the xxx_data object are usable, which unfortunately does not included updated_at. You can search for last modified at using the begin_time, but that will not sort it by the updated time.

Hey @sjosey thanks for the response. What would you mean by xxx_data? Is there any future plan to enable the sorting of the data using the ‘updated_at’ value? Please do let me know. Thanks.

Sorry, I meant anything in like “item_data” or “item_variation_data” (the data fields of the particular object). Not sure about future plans, but I can update this to be a feature request so PMs can see!