action squareup_retrieve_snippet { label: "RetrieveSnippet" description: "Retrieves your snippet from a Square Online site. A site can contain snippets from multiple snippet applications, but you can retrieve only the snippet that was added by your application.\n\nYou can call [ListSites](https://developer.squareup.com/reference/square_2021-08-18/sites-api/list-sites) to get the IDs of the sites that belong to a seller.\n\n\n__Note:__ Square Online APIs are publicly available as part of an early access program. For more information, see [Early access program for Square Online APIs](https://developer.squareup.com/docs/online-api#early-access-program-for-square-online-apis)." provider: squareup method: GET path: "/v2/sites/{site_id}/snippet" encoding: json input: { type: "object" properties: { site_id: { type: "string" } } required: ["site_id"] additionalProperties: false } output: { type: "object" description: "Represents a `RetrieveSnippet` response. The response can include either `snippet` or `errors`." properties: { errors: { type: "array" description: "Any errors that occurred during the request." items: { type: "object" description: "Represents an error encountered during a request to the Connect API.\n\nSee [Handling errors](https://developer.squareup.com/docs/build-basics/handling-errors) for more information." required: ["category", "code"] properties: { category: { type: "string" description: "The high-level category for the error." } code: { type: "string" description: "The specific code of the error." } detail: { type: "string" description: "A human-readable description of the error for debugging purposes." } field: { type: "string" description: "The name of the field provided in the original request (if any) that\nthe error pertains to." } } } } snippet: { type: "object" description: "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." required: ["content"] properties: { content: { type: "string" description: "The snippet code, which can contain valid HTML, JavaScript, or both." } created_at: { type: "string" description: "The timestamp of when the snippet was initially added to the site, in RFC 3339 format." } id: { type: "string" description: "The Square-assigned ID for the snippet." } site_id: { type: "string" description: "The ID of the site that contains the snippet." } updated_at: { type: "string" description: "The timestamp of when the snippet was last updated on the site, in RFC 3339 format." } } } } } }