Update a blog article
Partial-updates an article. Send any subset of the create fields
(title, bodyHtml, handle, tags, author, excerpt, image,
seo, isPublished, publishDate); at least one field is required
(an empty body returns 400). isPublished and publishDate behave as
on create: isPublished: false unpublishes back to a draft and a
future publishDate schedules publication natively on the platform.
Supported on Shopify (platform shopify). Accounts on platforms
without blogs support return 400; a blogs-capable platform that lacks
this specific operation returns 405.
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
Connected Shopify SocialAccount id.
Platform-native numeric blog id. Non-numeric values return 400.
^\d+$Platform-native numeric article id. Non-numeric values return 400.
^\d+$1 <= lengthArticle body as HTML.
URL slug of the article.
Replaces the full tag list.
Display name of the article author.
Short summary shown in blog listings.
Featured image. The platform downloads it, so the URL must be publicly reachable.
Search-engine overrides. Maps to Shopify global metafields (title_tag and description_tag).
Set false to unpublish the article back to a draft.
ISO 8601 datetime with offset (or Z). A future date schedules publication natively on the platform.
date-timeResponse Body
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.blogs.updateBlogArticle({ path: { accountId: 'account_abc123', blogId: 'blog_abc123', articleId: 'article_abc123', }, body: { title: 'Example', bodyHtml: 'string', handle: 'string', },});console.log(data);{
"platform": "shopify",
"article": {
"id": "string",
"blogId": "string",
"platform": "shopify",
"title": "string",
"bodyHtml": "string",
"handle": "string",
"tags": [
"string"
],
"author": "string",
"excerpt": "string",
"image": {
"url": "string",
"altText": "string"
},
"isPublished": true,
"publishedAt": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
}{
"error": "string",
"type": "invalid_request_error",
"code": "string",
"param": "string",
"platform": "string",
"platformError": {},
"details": {}
}{
"error": "Unauthorized"
}Get a blog GET
Fetches a single blog. `blogId` is the platform's numeric blog id from `GET /v1/accounts/{accountId}/blogs`, not a Zernio id. Supported on Shopify (platform `shopify`). Accounts on platforms without blogs support return 400; a blogs-capable platform that lacks this specific operation returns 405.
Update a blog PATCH
Partial-updates a blog. Send any subset of `title` and `handle`; at least one field is required (an empty body returns 400). Supported on Shopify (platform `shopify`). Accounts on platforms without blogs support return 400; a blogs-capable platform that lacks this specific operation returns 405.