Working with Dates
All Square endpoints expect dates and timestamps as strings in UTC (e.g., "2013-01-15T00:00:00Z") or offset from UTC to indicate time zone (e.g., "2013-01-15T00:00:00-08:00" for 8 hours behind UTC). Clients must account for daylight saving time when providing offset dates.
In Connect v1, date and timestamp strings always use ISO 8601 format:
Fields that only require a date value can use
YYYY-MM-DDnotation. For example, "2007-04-05".
Fields that only require a time value can use 24-hour notation (
HH:MM:SS). For example, "14:30:00".
Fields that require a data and time value use
YYYY-MM-DDTHH:MMnotation. For example, "2007-04-05T14:30".
In Square APIs, fields may require 1 of 2 possible formats depending on how the field is used and whether it represents a date or a timestamp:
Endpoints that accept an optional date range with
end_time parameters also accept an optional order parameter, which indicates whether results are returned in chronological (
ASC) or reverse-chronological (
For chronological ordering,
begin_timeis inclusive and
For reverse-chronological ordering,
begin_timeis exclusive and