Enable/Disable "Hide on Square Online" for Item Modifier via api

is it possible to Enable/Disable “Hide on Square Online” for Item Modifier via api

:wave: I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:

Additional Documentation

Square Online
API Explorer
Inventory API Requirements

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.

Yes, you can enable or disable the “Hide on Square Online” option for an Item Modifier using the Catalog API. You would need to use the UpsertCatalogObject endpoint to update the CatalogModifier object. In the CatalogModifier object, there is a field called hide_on_squares_online_store which you can set to true to hide the modifier on Square Online, or false to show it.

This answer was reviewed by @Bryan-Square.

I could not find hide_on_squares_online_store in any document.
could you provide some example python code?