get https://storefront.ecwid.com/product-page///static-code
Get static page contents for product category in your store to utilize fast load of store pages on your website.
Headers
Name | Type | Description |
---|---|---|
Authorization | string | oAuth token with mandatory Bearer before it. Example: Bearer e***s0 , where e***s0 should be replaced with your oAuth token. |
Query parameters
Field | Type | Description |
---|---|---|
variation | string | Product variation ID |
lang | string | Set the languages for text labels. If absent, the default store languages are used clean_urls |
clean_urls | boolean | Enable/disable Store SEO format in the product links |
base_url | string | Sets the base URL for clean URLs. Pass it if you set clean_urls as true or if the store widget is added to multiple pages |
tplvar_* | string | Use this to pass any ec.storefront.* appearance option so that the storefront will be generated according to your design settings. Customize appearance |
international_pages | string | URL for alternative translated version of the website. Specify each language URL in a separate parameter. Set the language code in brackets, i.e.: international_pages[ru] . HTML is returned in hrefLangHtml field. Google specification |
Response
A JSON object of type 'Page' with the following fields:
Page
Name | Type | Description |
---|---|---|
cssFiles | Array of strings | List of CSS URLs for the page design to display properly |
htmlCode | string | HTML code for the static page |
metaDescriptionHtml | string | HTML code for the meta title and description |
canonicalUrl | string | Canonical URL for this page |
ogTagsHtml | string | HTML code for Open Graph tags |
jsonLDHtml | string | HTML code for JSON-LD product description |
hrefLangHtml | string | hreflang HTML tag for translated versions of your website. Returned if international_pages request parameter is set. Google specification |
lastUpdated | number | UNIX timestamp for when the page was generated |
Errors
In case of error, Ecwid responds with an error HTTP status code
HTTP codes
HTTP status | Meaning |
---|---|
400 | Request parameters are malformed |