In Merchant API - is business location_id unique?

hey does anyone know: in the Merchants API - is the business main_location_id unique across all Square businesses or should I rely on it being unique only within the context of a single business? or a single country or other region?
I wonder the same thing about the location_id in the Locations API - is there a boundary on the uniqueness that is specified?

Hello! The location_id is unique across all of Square so the main_location_id will also be unique.

2 Likes

The uniqueness of identifiers like main_location_id in the Square Merchants API and location_id in the Locations API depends on the scope defined by Square. In general, these identifiers are unique within the context of a single Square business.

  • main_location_id (Merchants API): This identifier is typically unique within the context of a single business. It represents the main (or primary) location for a specific business account.
  • location_id (Locations API): This identifier is unique within the context of a specific business or location. It is used to distinguish between different physical locations associated with a single Square business account.

Square’s API documentation should provide more specific details on the scope of uniqueness for these identifiers. It’s essential to refer to the official Square API documentation or reach out to Square support for the most accurate and up-to-date information. Always follow the guidelines and recommendations provided in the official documentation to ensure proper usage of these identifiers in your application.