Square: Snippets schemas
5 Square schemas with complete fields and constraints.
← Snippets operations · All schemas
Delete Snippet — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a `DeleteSnippet` response. |
errors | array | Optional | Any errors that occurred during the request. |
errors[] | Model | Each item | Expand Get Shift — response body — errors item |
Referenced models: Get Shift — response body — errors item
Retrieve Snippet — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a `RetrieveSnippet` response. The response can include either `snippet` or `errors`. |
errors | array | Optional | Any errors that occurred during the request. |
errors[] | Model | Each item | Expand Get Shift — response body — errors item |
snippet | Model | Optional | Expand Upsert Snippet — response body — snippet The retrieved snippet. |
Referenced models: Get Shift — response body — errors item, Upsert Snippet — response body — snippet
Upsert Snippet — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents an `UpsertSnippet` request. |
snippet | Model | Required within parent | Expand Upsert Snippet — response body — snippet The snippet for the site. |
Referenced models: Upsert Snippet — response body — snippet
Upsert Snippet — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents an `UpsertSnippet` response. The response can include either `snippet` or `errors`. |
errors | array | Optional | Any errors that occurred during the request. |
errors[] | Model | Each item | Expand Get Shift — response body — errors item |
snippet | Model | Optional | Expand Upsert Snippet — response body — snippet The new or updated snippet. |
Referenced models: Get Shift — response body — errors item, Upsert Snippet — response body — snippet
Upsert Snippet — response body — snippet
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents the snippet that is added to a Square Online site. The snippet code is injected into the `head` element of all pages on the site, except for checkout pages. |
content | string | Required within parent | The snippet code, which can contain valid HTML, JavaScript, or both. Maximum length: 65535 Minimum length: 1 |
created_at | string | Optional | The timestamp of when the snippet was initially added to the site, in RFC 3339 format. Read only: true |
id | string | Optional | The Square-assigned ID for the snippet. Maximum length: 48 Read only: true |
site_id | string | Optional | The ID of the site that contains the snippet. Read only: true |
updated_at | string | Optional | The timestamp of when the snippet was last updated on the site, in RFC 3339 format. Read only: true |