Breaking Changes - Resource IDs

Deployed Date: 03/15/2024

We just completed an audit of the IDs used in our resources and have to make some breaking changes in order to accomodate our transition to using Square IDs in favour of Square Online IDs.

Cart

The location_id here is being changed to be the Square ID in order to match our other resource location_ids.

{
    "order": {
-       "location_id": "11ee258c8d63597882fa089e019fd17a"
+       "location_id": "L36RW9ABXQTEE"
    }
}

Category

Category incorrectly had the square_online_id in number form instead of string form.

See Item resource for breaking changes.

{
-   "square_online_id": 6,
+   "square_online_id": "6",
    "items": [
        {
            // See Item
        }
    ]
}

CategoryList

See Category and Item resources for breaking changes.

[
    {
        // See Category
        "items": [
            {
                // See Item
            }
        ]
    }
]

DiscountList

present_at_location_ids and absent_at_location_ids have been updated to use the Square IDs in order to match how location IDs are used in the other resources. We’ve also added the Square Item IDs to new match/exclude item IDs properties (match_item_ids and exclude_item_ids). match_square_online_product_ids and exclude_square_online_product_ids incorrectly had their IDs in number form instead of string form.

[
    {
-       "present_at_location_ids": [
-           "11ee2591ce29202a82fa089e019fd17a"
-        ],
+       "present_at_location_ids": [
+           "LWWMQBCQAZ1M6"
+        ],
-       "absent_at_location_ids": [
-           "11ee258c8d63597882fa089e019fd17a"
-        ],
+       "absent_at_location_ids": [
+           "L36RW9ABXQTEE"
+        ],
-       "match_square_online_product_ids": [
-           1
-       ],
+       "match_square_online_product_ids": [ // Note this is being deprecated
+           "1"
+       ],
-       "match_square_online_item_ids": [
-           1
-       ],
+       "match_square_online_item_ids": [
+           "1"
+       ],
+       "match_item_ids": [
+           "G6B62642JJDBTPSZRPWVJNUM"
+       ],
-       "exclude_square_online_product_ids": [
-           2
-       ],
+       "exclude_square_online_product_ids": [ // Note this is being deprecated
+           "2"
+       ],
-       "exclude_square_online_item_ids": [
-           2
-       ],
+       "exclude_square_online_item_ids": [
+           "2"
+       ],
+       "exclude_item_ids": [
+           "BRDGWMYMMB43GTOO6YN7VBRQ"
+       ],
    }
]

Item

Item variations incorrectly had the square_online_item_id and square_online_id in number form instead of string form. Item modifier lists incorrectly had the square_online_item_id in number form instead of string form.

{
    "modifier_lists": [
        {
-           "square_online_item_id": 14,
+           "square_online_item_id": "14",
        }
    ],
    "variations": [
        {
-            "square_online_item_id": 14,
+            "square_online_item_id": "14",
-            "square_online_id": 6,
+            "square_online_id": "6",
        }
    ],
}

ItemList

See Item resource for breaking changes

[
    {
        // See Item
    }
]

Location

We’ve removed the id properties from the DELIVERY areas and couriers as they are currently in the Square Online form and offer no current usage in the Custom Sites platform.

{
    "DELIVERY": {
        "areas": [
            {
-               "id": "11eed730b3e406289af2ca2207028a25",
            }
        ],
        "couriers": [
            {
-               "id": "11eed730b3e4b7c6a99bca2207028a25",
            }
        ]
    }
}

LocationList

See Location resource for breaking changes

[
    {
        // See Location
    }
]