Breaking Changes - Resources

Deployed 02/27/2024

Changes listed with Deprecation will include both the old and new properties, with the expected date indicating when the old properties will be removed.

Changes listed with Breaking will include the old properties, with the expected date indicating when the old properties will be removed and the new properties added.

Changelog

  • 02/13/2024 - modifier_set_name deprecation on Cart
  • 02/14/2024 - All resources now use updated Money object
  • 02/15/2024 - Add Schedule deprecation date
  • 02/15/2024 - Updated Cart delivery/pickup time properties to be more consistent with the schedule time properties
  • 02/16/2024 - Cart and Location now use a common Duration object for duration properties
  • 02/16/2024 - Remove Square Online properties from Item modifier lists
  • 02/16/2024 - Renamed location_date to date for ScheduleDays and ScheduledTimes
  • 02/21/2024 - Add CustomerAccount breaking changes
  • 02/21/2024 - Fixed fees on Location including all to use the Money object
  • 02/21/2024 - Updated deploy date to 02/27/2024
  • 02/22/2024 - Removed square_online_item_id from breaking changes on the Item modifier lists from 02/16/2024
  • 02/22/2024 - Added clarification around new Money object

Note that all properties involving money will be updated to use a common Money object:

Field Type Description
amount Number Amount in the smallest subunit of the given currency
currency String The ISO 4217 three-letter currency code
formatted String Amount formatted with the symbol of the given currency. Formatted according to the site’s locale

The diffs below show what has changed for the properties to make them match this object.

Cart

Deprecation

{
    "order": {
        "line_items": [
            {
                "modifiers": [
                    {
-                       "modifier_set_name": "Toppings"
+                       "modifier_list_name": "Toppings"
                    }
                ]
            }
        ],
        "fulfillment": {
            "pickup_details": {
-               "pickup_time_unix": 1709081700,
+               "time_unix": 1709081700,
-               "pickup_time": "2024-02-27T19:55:00-05:00",
+               "time": "2024-02-27T19:55:00-05:00",
-               "pickup_time_formatted": "Tuesday, February 27th, at 7:55 PM",
+               "time_formatted": "Tuesday, February 27th, at 7:55 PM"
            },
            "delivery_details": {
-               "delivery_time": "02/27/2024: 8:00 PM - 8:05 PM",
+               "time_formatted": "02/27/2024: 8:00 PM - 8:05 PM",
            }
        }
    }
}

Breaking

{
    "order": {
        "fulfillment": {
            "delivery_details": {
                "order_delivery_fee_total": {
-                   "float_amount": "7.00",
                },
-               "window_duration": "PT5M",
+               "window_duration": {
+                   "rfc3339_interval": "PT5M",
+                   "in_minutes": 5
+               }
            }
        },
        "line_items": [
            {
                "modifiers": [
                    {
                        "base_price_money": {
-                           "amount": 30.0,
+                           "amount": 3000,
-                           "amount_subunits": 3000,
                        },
                        "total_price_money": {
-                           "amount": 30.0,
+                           "amount": 3000,
-                           "amount_subunits": 3000,
                        },
                    }
                ],
                "applied_discounts": [
                    {
-                       "currency": "USD",
                        "applied_money": {
-                           "amount": 10.0,
+                           "amount": 1000,
-                           "amount_subunits": 1000,
                        }
                    }
                ],
                "base_price_money": {
-                   "amount": 30.0,
+                   "amount": 3000,
-                   "amount_subunits": 3000,
                },
                "gross_price_money": {
-                   "amount": 20.0,
+                   "amount": 2000,
-                   "amount_subunits": 2000,
                },
            }
        ],
        "discounts": [
            {
-               "currency": "USD",
                "applied_money": {
-                   "amount": 20.0,
+                   "amount": 2000,
-                   "amount_subunits": 2000,
                }
            }
        ],
        "total_money": {
-           "amount": 48.0,     
+           "amount": 4800,
-           "amount_subunits": 4800,
        },
        "subtotal_money": {
-           "amount": 48.0,     
+           "amount": 4800,
-           "amount_subunits": 4800,
        },
        "total_taxes_and_fees_money": {
-           "amount": 0.0,     
+           "amount": 0,
-           "amount_subunits": 0.0,
        },
    }
}

Category

Breaking

See Item resource for breaking changes

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

CategoryList

Breaking

See Item resource for breaking changes

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

CustomerAccount

Breaking

{
    "orders": [
        {
-           "location": "11ee258c8d63597882fa089e019fd17a",
+           "location_id": "L36RW9ABXQTEE", // Note change to Square ID
-           "total_paid": "5.44",
+           "total_paid": {
+               "amount": 544,
+               "currency": "USD",
+               "formatted": "$5.44"
+           },
            "items": [
                {
-                   "id": "11eecd116db0abb28c6b089e019fd17a",
+                   "id": "Fb4hdcDkvOOPcQ3meHzkr", // Note change to Square ID
                }
            ]
        }
    ]
}

DiscountList

Breaking

[
    {
        "amount_money": {
-           "amount": 30.0,
+           "amount": 3000,
-           "amount_subunits": 3000,
        },
        "minimum_order_amount_money": {
-           "amount": 30.0,
+           "amount": 3000,
-           "amount_subunits": 3000,
        },
        "maximum_amount_money": {
-           "amount": 30.0,
+           "amount": 3000,
-           "amount_subunits": 3000,
        },
    }
]

Item

Breaking

{
    "price": {
-       "currency": "USD",        
-       "high": 18,
-       "high_subunits": 1800,
+       "high": {
+           "amount": 1800,
+           "currency": "USD",
+           "formatted": "$18.00"
+        },
-       "high_with_modifiers": 18,
+       "high_with_modifiers": {
+           "amount": 1800,
+           "currency": "USD",
+           "formatted": "$18.00"
+        },
-       "high_with_subscriptions": 18,
-       "high_with_subscription_subunits": 1800,
+       "high_with_subscriptions": {
+           "amount": 1800,
+           "currency": "USD",
+           "formatted": "$18.00"
+        },
-       "low": 18,
-       "low_subunits": 1800,
+       "low": {
+           "amount": 1800,
+           "currency": "USD",
+           "formatted": "$18.00"
+        },
-       "low_with_modifiers": 18,
+       "low_with_modifiers": {
+           "amount": 1800,
+           "currency": "USD",
+           "formatted": "$18.00"
+        },
-       "low_with_subscriptions": 18,
-       "low_with_subscription_subunits": 1800,
+       "low_with_subscriptions": {
+           "amount": 1800,
+           "currency": "USD",
+           "formatted": "$18.00"
+        },
-       "regular_high": 18,
-       "regular_high_subunits": 1800,
+       "regular_high": {
+           "amount": 1800,
+           "currency": "USD",
+           "formatted": "$18.00"
+        },
-       "regular_high_with_modifiers": 18,
+       "regular_high_with_modifiers": {
+           "amount": 1800,
+           "currency": "USD",
+           "formatted": "$18.00"
+        },
-       "regular_high_with_subscriptions": 18,
-       "regular_high_with_subscriptions_subunits": 1800,
+       "regular_high_with_subscriptions": {
+           "amount": 1800,
+           "currency": "USD",
+           "formatted": "$18.00"
+        },
-       "regular_low": 18,
-       "regular_low_subunits": 1800,
+       "regular_low": {
+           "amount": 1800,
+           "currency": "USD",
+           "formatted": "$18.00"
+        },
-       "regular_low_with_modifiers": 18,
+       "regular_low_with_modifiers": {
+           "amount": 1800,
+           "currency": "USD",
+           "formatted": "$18.00"
+        },
-       "regular_low_with_subscriptions": 18,
-       "regular_low_with_subscriptions_subunits": 1800
+       "regular_low_with_subscriptions": {
+           "amount": 1800,
+           "currency": "USD",
+           "formatted": "$18.00"
+        },
    },
    "modifier_lists": [
        {
-           "square_online_item_modifier_id": 1924629406,
-           "square_online_item_modifier_set_id": 2344168866,
            "modifiers": [
                {
                    "price_money": {
-                       "amount": 10.0,
+                       "amount": 1000,
-                       "amount_subunits": 1000,
                    }
                }
            ]
        }
    ],
    "variations": [
        {
            "price": {
-               "currency": "USD",
-               "current": 18,
+               "current": {
+                   "amount": 1800,
+                   "currency": "USD",
+                   "formatted": "$18.00"
+               },
-               "current_subunits": 1800,
-               "regular": 18,
+               "regular": {
+                   "amount": 1800,
+                   "currency": "USD",
+                   "formatted": "$18.00"
+               },
-               "regular_subunits": 1800,
-               "sale": 18,
+               "sale": {
+                   "amount": 1800,
+                   "currency": "USD",
+                   "formatted": "$18.00"
+               },
-               "sale_subunits": 1800,
-               "high": 18,
+               "high": {
+                   "amount": 1800,
+                   "currency": "USD",
+                   "formatted": "$18.00"
+               },
-               "high_subunits": 1800
            }
        }
    ],
    "subscriptions": [
        {
            "subscription_plan_data": {
                "subscription_plan_variations": [
                    {
                        "subscription_plan_variation_data": {
                            "phases": [
                                {
                                    "pricing": {
-                                       "regular_high": 18,
-                                       "regular_high_formatted": "$18.00",
-                                       "regular_high_subunits": 1800,
+                                       "regular_high": {
+                                           "amount": 1800,
+                                           "currency": "USD",
+                                           "formatted": "$18.00"
+                                       },
-                                       "regular_high_subscription": 17.1,
-                                       "regular_high_subscription_formatted": "$17.10",
-                                       "regular_high_subscription_subunits": 1710,
+                                       "regular_high_subscription": {
+                                           "amount": 1710,
+                                           "currency": "USD",
+                                           "formatted": "$17.10"
+                                       },
-                                       "regular_low": 18,
-                                       "regular_low_formatted": "$18.00",
-                                       "regular_low_subunits": 1800,
+                                       "regular_low": {
+                                           "amount": 1800,
+                                           "currency": "USD",
+                                           "formatted": "$18.00"
+                                       },
-                                       "regular_low_subscription": 17.1,
-                                       "regular_low_subscription_formatted": "$17.10",
-                                       "regular_low_subscription_subunits": 1710,
+                                       "regular_low_subscription": {
+                                           "amount": 1710,
+                                           "currency": "USD",
+                                           "formatted": "$17.10"
+                                       },
-                                       "high": 18,
-                                       "high_formatted": "$18.00",
-                                       "high_subunits": 1800,
+                                       "high": {
+                                           "amount": 1800,
+                                           "currency": "USD",
+                                           "formatted": "$18.00"
+                                       },
-                                       "high_subscription": 17.1,
-                                       "high_subscription_formatted": "$17.10",
-                                       "high_subscription_subunits": 1710,
+                                       "high_subscription": {
+                                           "amount": 1710,
+                                           "currency": "USD",
+                                           "formatted": "$17.10"
+                                       },
-                                       "low": 18,
-                                       "low_formatted": "$18.00",
-                                       "low_subunits": 1800,
+                                       "low": {
+                                           "amount": 1800,
+                                           "currency": "USD",
+                                           "formatted": "$18.00"
+                                       },
-                                       "low_subscription": 17.1,
-                                       "low_subscription_formatted": "$17.10",
-                                       "low_subscription_subunits": 1710,
+                                       "low_subscription": {
+                                           "amount": 1710,
+                                           "currency": "USD",
+                                           "formatted": "$17.10"
+                                       },
                                    }
                                }
                            ]
                        }
                    }
                ]
            }
        }
    ]
}

ItemList

Breaking

See Item resource for breaking changes

[
    {
        // See Item
    }
]

Location

Breaking

{
-   "service_fee": 0,
    "PICKUP": {
-       "prep_time": "PT30M",
+       "prep_time_duration": {
+           "in_minutes": 30,
+           "rfc3339_interval": "PT30M"
+       },
-       "order_subtotal_minimum": 0,
+       "order_subtotal_minimum": {
+           "amount": 0,
+           "currency": "USD",
+           "formatted": "$0.00"
+       },
    },
    "DELIVERY": {
-       "prep_time": "PT30M",
+       "prep_time_duration": {
+           "in_minutes": 30,
+           "rfc3339_interval": "PT30M"
+       },
-       "estimated_max_duration_minutes": 10,
+       "estimated_max_duration": {
+           "in_minutes": 10,
+           "rfc3339_interval": "PT10M"
+       },
-       "estimated_min_duration_minutes": 5,
+       "estimated_min_duration": {
+           "in_minutes": 5,
+           "rfc3339_interval": "PT5M"
+       },
-       "order_subtotal_minimum": 0,
+       "order_subtotal_minimum": {
+           "amount": 0,
+           "currency": "USD",
+           "formatted": "$0.00"
+       },
-       "fee_maximum_enabled": true,
+       "odd_fee_maximum_enabled": true,
-       "fee_maximum": 20.0,
+       "odd_fee_maximum": {
+           "amount": 2000,
+           "currency": "USD",
+           "formatted": "$20.00"
+       },
+       "service_fee_money": {
+           "amount": 125,
+           "currency": "USD",
+           "formatted": "$1.25"
+       },
+       "service_fee_percentage": 1.25,
-       "fee": 0
+       "min_fee": {
+           "amount": 500,
+           "currency": "USD",
+           "formatted": "$5.00"
+       },
+       "max_fee": {
+           "amount": 500,
+           "currency": "USD",
+           "formatted": "$5.00"
+       },
    },
+   "free_fulfillment_conditions": [
+       {
+           "fulfillment_type": "SHIPMENT",
+           "min_order": {
+               "amount": 10000,
+               "currency": "USD",
+               "formatted": "$100.00"
+           },
+           "coverage": "country"
+       }
+   ]
}

LocationList

Breaking

See Location resource for breaking changes

[
    {
        // See Location
    }
]

LoyaltyProgram

Breaking

{
    "reward_tiers": [
        {
            "amount_money": {
-               "amount": 30.0,
+               "amount": 3000,
-               "amount_subunits": 3000,
            },
            "maximum_amount_money": {
-               "amount": 30.0,
+               "amount": 3000,
-               "amount_subunits": 3000,
            },
        }
    ],
    "accrual_rules": [
        {
            "visit_minimum_amount_money": {
-               "amount": 30.0,
+               "amount": 3000,
-               "amount_subunits": 3000,
            },
            "spend_amount_money": {
-               "amount": 30.0,
+               "amount": 3000,
-               "amount_subunits": 3000,
            },  
        }
    ]
}

Schedule

Deprecation

Will be removed in favor of ScheduleDays and ScheduleTimes

ScheduleDays

Deprecation

{
    "earliest_time": {
-       "location_date": "2024-01-17",
+       "date": "2024-01-17",
    }
}

ScheduleTimes

Deprecation

{
    "earliest_time": {
-       "location_date": "2024-01-17",
+       "date": "2024-01-17",
    }
}