I am using the Square API mostly to enable/disable store items based on availability in a third party system. I remove or add the present at location property.
I am also running the square online store and need to flag the items as available/unavailable as well. How do I change the “ecom_visibility” property using the .NET SDK?
{
"object": {
"type": "ITEM",
"id": "G6VYBZ3Q7WJSU2CI247PID32",
"updated_at": "2021-07-06T16:14:23.13Z",
"version": 1625588063130,
"is_deleted": false,
"present_at_all_locations": true,
"present_at_location_ids": [
"43QY7RVQK1JJQ"
],
"item_data": {
"name": "Bread Pudding",
"visibility": "PRIVATE",
"category_id": "IAYMQMWBWRQFY7B2WKNIN3MB",
"tax_ids": [
"Z4BSMGYUWTHJZFTH4U6OBZOS"
],
"variations": [
{
"type": "ITEM_VARIATION",
"id": "TMHURNQVW7WCTWE6PJJ4W6Y4",
"updated_at": "2021-07-06T16:14:23.13Z",
"version": 1625588063130,
"is_deleted": false,
"present_at_all_locations": true,
"present_at_location_ids": [
"43QY7RVQK1JJQ"
],
"item_variation_data": {
"item_id": "G6VYBZ3Q7WJSU2CI247PID32",
"name": "Regular",
"sku": "BreadPudding",
"ordinal": 1,
"pricing_type": "FIXED_PRICING",
"price_money": {
"amount": 800,
"currency": "USD"
},
"stockable": true
}
}
],
"product_type": "REGULAR",
"skip_modifier_screen": true,
"ecom_available": false,
"ecom_visibility": "UNINDEXED"
}
}
}