Skip to content

Latest commit

 

History

History
38 lines (29 loc) · 1.04 KB

retrieve-snippet-response.md

File metadata and controls

38 lines (29 loc) · 1.04 KB

Retrieve Snippet Response

Represents a RetrieveSnippet response. The response can include either snippet or errors.

Structure

Retrieve Snippet Response

Fields

Name Type Tags Description
errors List Error Optional Any errors that occurred during the request.
snippet Snippet Optional 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.

Example (as JSON)

{
  "snippet": {
    "content": "<script>var js = 1;</script>",
    "created_at": "2021-03-11T25:40:09.000000Z",
    "id": "snippet_5d178150-a6c0-11eb-a9f1-437e6a2881e7",
    "site_id": "site_278075276488921835",
    "updated_at": "2021-03-11T25:40:09.000000Z"
  },
  "errors": [
    {
      "category": "MERCHANT_SUBSCRIPTION_ERROR",
      "code": "INVALID_EXPIRATION",
      "detail": "detail6",
      "field": "field4"
    }
  ]
}