Skip to content

Square: Snippets schemas

5 Square schemas with complete fields and constraints.

← Snippets operations · All schemas

Delete Snippet — response body

FieldTypePresenceDescription and constraints
$objectRootRepresents a `DeleteSnippet` response.
errorsarrayOptionalAny errors that occurred during the request.
errors[]ModelEach itemExpand Get Shift — response body — errors item

Referenced models: Get Shift — response body — errors item

Retrieve Snippet — response body

FieldTypePresenceDescription and constraints
$objectRootRepresents a `RetrieveSnippet` response. The response can include either `snippet` or `errors`.
errorsarrayOptionalAny errors that occurred during the request.
errors[]ModelEach itemExpand Get Shift — response body — errors item
snippetModelOptionalExpand 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

FieldTypePresenceDescription and constraints
$objectRootRepresents an `UpsertSnippet` request.
snippetModelRequired within parentExpand Upsert Snippet — response body — snippet
The snippet for the site.

Referenced models: Upsert Snippet — response body — snippet

Upsert Snippet — response body

FieldTypePresenceDescription and constraints
$objectRootRepresents an `UpsertSnippet` response. The response can include either `snippet` or `errors`.
errorsarrayOptionalAny errors that occurred during the request.
errors[]ModelEach itemExpand Get Shift — response body — errors item
snippetModelOptionalExpand 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

FieldTypePresenceDescription and constraints
$objectRootRepresents 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.
contentstringRequired within parentThe snippet code, which can contain valid HTML, JavaScript, or both.
Maximum length: 65535
Minimum length: 1
created_atstringOptionalThe timestamp of when the snippet was initially added to the site, in RFC 3339 format.
Read only: true
idstringOptionalThe Square-assigned ID for the snippet.
Maximum length: 48
Read only: true
site_idstringOptionalThe ID of the site that contains the snippet.
Read only: true
updated_atstringOptionalThe timestamp of when the snippet was last updated on the site, in RFC 3339 format.
Read only: true

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand how our website, product, and documentation are used.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

Advertising

Shares visits and sign-ups with Meta, Reddit, and X so we can measure which of our ads work.

You can change these choices at any time from Cookie settings.