Bootstrapped Resources Reference
There are a number of bootstrapped resources available on the top level square
namespace that you will see referenced in the documentation.
The following are more detailed documentation on the bootstrapped resources.
Resource | Description |
---|---|
Site Styles | Access site style data. |
Square Namespaces
The namespaces (e.g. square.page
) under square
are:
Field | Type | Description |
---|---|---|
page | Page | Page details |
render_mode | String | Flag to signify the rendering context of the page, which could be ‘editor’, ‘preview’, or ‘published’ |
settings | Settings | Settings details |
site | Site | Site details |
store | Store | Store settings and information |
trackers | Trackers | Tracker details |
Page
Page details.
Field | Type | Description |
---|---|---|
url | String | Absolute URL to the current page |
Settings
Global settings.
This resource is deprecated. Please refer to store-info
to use the store-info resource instead.
Field | Type | Description |
---|---|---|
application_id | String | Application ID |
square_web_payments_sdk | String | Location of the JS SDK |
Site
Site details.
Field | Type | Description |
---|---|---|
classic_site_id | String | Classic site ID |
communications_scripts | String | Content of platform-provided snippets |
current_locale | String | The locale from the HTTP source. See the localization guide for more detail. |
favicon | String | Relative URL to favicon |
language | String | Site language |
logo | String | Site logo |
merchant_id | String | The Square merchant ID |
meta_tags | String[] | Site icon meta tags |
root_url | String | Root hostname of the site |
site_icon_settings | SiteIconSettings | Icon images and settings for various client types |
site_id | String | Site ID |
snippets_api | String | Content of Snippet API provided snippets |
square_web_payments_sdk | String | Location of the JS SDK |
styles | Styles | the global site style configuration |
title | String | Site name |
user_id | Number | Site owner ID |
xsrf_cookie_name | String | XSRF cookie name |
seo | Object | Object where each key represents a route for a specific SEO configuration |
social | Object | Object where each key represents a route for a specific social configuration |
Store
Store settings and information.
This resource is deprecated. Please refer to store-info
to use the store-info resource instead.
Field | Type | Description |
---|---|---|
accepting_orders | Boolean | If the store is accepting orders right now |
allowed_to_sell | Boolean | If the store is allowed to sell |
currency | String | Default site currency |
fulfillment_support | FulfillmentSupport | Which fulfillment methods are supported by the store |
has_multi_location | Boolean | Whether the store has multiple locations or not |
has_shippable_item | Boolean | Stores may have locations that do shipping with no shippable items. Returns if store has any shippable items |
has_time_based_categories | Boolean | Whether the store has any time-based categories |
item_low_stock_threshold | Number | Number of item units in stock (less than or equal to) for an item to be considered low stock |
item_reviews_enabled | Boolean | Whether item reviews are enabled on the site |
language | String | Default site language |
locale | String | Default site locale |
locations_counts | LocationsCounts | Aggregate information for the number of this store’s location that offer the available fulfillment types |
merchant_id | String | The Square merchant ID |
payment_methods | PaymentMethods | Settings for specific payment methods, including Afterpay, Apple Pay and Google Pay |
return_policy | String | Text description of the store’s return policy |
seller_preferred_fulfillment | String | The preferred fulfillment of the seller |
shipping_location_id | String | The ID of the default shipping location |
shipping_policy | String | Text description of the store’s shipping policy |
show_low_stock_section | Boolean | Whether to show the low-stock section on the site |
show_on_sale_section | Boolean | Whether to show the on-sale section on the site |
show_out_of_stock_section | Boolean | Whether to show the out-of-stock section on the site |
show_pdp_buy_now_button | Boolean | Whether to display the Buy Now button on the item display page |
Trackers
Tracker details.
Field | Type | Description |
---|---|---|
bing_verification | String | Bing verification tag |
cookie_banner | String | Cookie consent script |
custom_codes | String[] | Any custom codes to include in the site |
facebook_capi_enabled | String | Whether facebook CAPI is enabled, as a boolean string |
facebook_pixel_id | String | Facebook pixel ID |
google_analytics_id | String | Google Analytics ID |
google_tag_developer_id | String | Google developer ID tag |
google_verification | String | Google verification tag |
pinterest_conversion_tag | String | Pinterest conversion tag |
pinterest_site_verification | String | Pinterest site verification |
Resources of Note
SiteIconSettings
Icon images and settings for various client types for a site.
Field | Type | Description |
---|---|---|
android_icon_images | IconImage | Android icon settings |
ios_icon_images | IconImage | iOS icon settings |
splash_images | IconImage | Icon settings for the splash page on web |
updatedAt | Number | Unix timestamp when the icon settings were last updated |
FulfillmentSupport
Fulfillment methods supported by a store.
Field | Type | Description |
---|---|---|
DELIVERY | Boolean | Whether or not this online store can accept delivery orders. This is true if there is at least one location with delivery enabled |
DIGITAL | Boolean | Whether or not this online store can accept digital orders. This is true if there is at least one location with digital enabled |
DINE_IN | Boolean | Whether or not this online store can accept dine-in orders. This is true if there is at least one location with dine-in enabled |
MANUAL | Boolean | Whether or not this online store can accept manual orders. This is true if there is at least one location with manual enabled |
PICKUP | Boolean | Whether or not this online store can accept pickup orders. This is true if there is at least one location with pickup enabled |
SHIPMENT | Boolean | Whether or not this online store can accept shipping orders. This is true if there is at least one location with shipping enabled |
LocationsCounts
Aggregate information about available fulfillment types from a store.
Field | Type | Description |
---|---|---|
BRICK_AND_MORTAR_FULFILLMENT | Number | Number of locations that offer either pickup, delivery, or dine-in |
DELIVERY | Number | Number of locations that offer delivery |
DINE_IN | Number | Number of locations that offer dine-in fulfillment |
PICKUP_OR_DELIVERY | Number | Number of locations that offer either pickup or delivery |
PICKUP | Number | Number of locations that offer pickup |
SHIPMENT | Number | Number of locations that offer shipping. (This is always 1 as of now) |
TOTAL | Number | Number of locations for this site |
PaymentMethods
Information about about payment method settings and parameters.
Field | Type | Description |
---|---|---|
afterpay.enabled | Boolean | Whether or not Afterpay checkout is available for this site |
afterpay.restrictions | AfterpayRestrictions | Min and max item and order amounts available for Afterpay |
afterpay.limits.min | Number | Afterpay country-based minimum limit |
afterpay.limits.max | Number | Afterpay country-based maximum limit |
apple_pay.enabled | Boolean | Whether or not Apple Pay checkout is available for this site |
google_pay.enabled | Boolean | Whether or not Google Pay checkout is available for this site |
AfterpayRestrictions
Information about about payment method settings and parameters.
Field | Type | Description |
---|---|---|
item_price_min | Money | Lower bound for item prices |
item_price_max | Money | Upper bound for item prices |
checkout_order_price_min | Money | Lower bound for order totals |
checkout_order_price_max | Money | Upper bound for order totals |
Money
Information about monetary amounts.
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 |
SEO
SEO configuration for a specific route
Field | Type | Description |
---|---|---|
title | String | SEO title |
description | String | SEO description |
Social
Social configuration for a specific route
Field | Type | Description |
---|---|---|
title | String | Social title |
description | String | Social description |
image | String | Social image URL path. Empty if not configured |