List Site Settings
GET /v2/sites/{site_id}/settings
Lists all settings for a Square Online site, or filters for a specific setting by name. This operation returns files under settings
in the site
directory of the site.
Permissions: ONLINE_STORE_CUSTOM_THEME_READ
Path parameters
Name | Type | Description |
---|---|---|
site_id | string | Required The ID of the site. |
Query parameters
Name | Type | Description |
---|---|---|
name | string | The name of the settings file to retrieve (without the file extension). If not specified, all settings files are returned. |
Response fields
Name | Type | Description |
---|---|---|
errors | Error [ ] | Any errors that occurred during the request. |
settings | SiteSetting [ ] | All settings files or the requested settings file. Returns empty object ({ } ) if none are found. |
Example requests
List all settings:
curl https://connect.squareup.com/v2/sites/site_id0/settings \
-H 'Square-Version: 2023-09-25' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-H 'Content-Type: application/json'
Retrieve a specific setting:
curl https://connect.squareup.com/v2/sites/site_id0/settings?name=settings_file_name1 \
-H 'Square-Version: 2023-09-25' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-H 'Content-Type: application/json'
Example response
{
"settings": [
{
"name": "settings",
"properties": "{\"default\": \"dark\"}"
}
]
}