帖子
编辑帖子
任何网络开始发送前,可替换 targets、设置 scheduledAt,或在 draft 与 scheduled 之间切换,其余字段不变。
授权
Authorizationstring必填你的个人密钥或 OAuth 访问令牌,以
Bearer <token>发送。
路径参数
idstring必填帖子的标识符。
请求体
application/json
targetsobject[]全部目标,整体重写(文案、媒体、格式、账号);省略则保持不变
显示子属性
platformstring必填目标网络
允许的值:
instagramfacebookxlinkedintiktoktextstring必填在此网络上发布的文案
mediaobject[]附加的媒体
显示子属性
idstring门店媒体库中某个媒体的标识符(否则用
url和type)urlstring媒体的公开地址(正式模式下为 https);不提供标识符时使用
typestring按地址提供的媒体的类型
允许的值:
imagevideo
formatstring格式(
post、reel、story、carousel等);默认为该网络会采用的格式accountIdstring正式模式:负责发布的已连接账号,在门店于该网络有多个账号时使用(
GET /v1/establishments/:id/accounts)
scheduledAtstring<date-time>新的未来时间:帖子将在此时间排期发布
statusstringdraft:退回草稿(保留内容,丢失时间);scheduled:按scheduledAt排期,或按原来的时间允许的值:
draftscheduled
响应
200application/json
编辑后的帖子。
idstring必填帖子的标识符
statusstring必填跨所有网络的状态;
partial:在一个网络发布成功,在另一个失败允许的值:
draftscheduledpublishingpublishedsent_to_inboxfailedpartialestablishmentIdstring必填帖子所属的门店
createdAtstring<date-time>必填帖子的创建时间
targetsobject[]必填每个网络和账号一条:同一网络上的两个账号对应两条
显示子属性
platformstring必填目标所在的网络
accountIdstring必填负责发布的账号(
GET /v1/establishments/:id/accounts)statestring必填目标在其网络上的状态
允许的值:
draftscheduledpublishingpublishedsent_to_inboxfailedpublishedAtstring<date-time>目标发布的时间
permalinkstring指向网络上已发布帖子的链接
errorstring网络拒绝的原因
scheduledAtstring<date-time>帖子计划发布的时间
402
subscription_required。
403
测试应用返回 live_mode_required,或缺少 posts:write scope。
404
post_not_found:令牌无法访问该帖子。
409
post_not_editable:某个网络已发送或正在发送。
422application/json
post_refused:某个网络、门店或 Publishing 会拒绝编辑后的帖子。同一网络上有两个目标时返回 duplicate_platform。
4XXapplication/json
其他任何错误,以错误结构返回。