帖子获取帖子

帖子

获取帖子

返回帖子及各网络的状态、发布后的链接和失败时的错误。正式模式可读 Workspace 内任何帖子,测试模式读模拟帖子。

GEThttps://api.sofia-post.com/api/v1/posts/{id}
GET/v1/posts/{id}
curl -X GET 'https://api.sofia-post.com/api/v1/posts/{id}' \
  -H "Authorization: Bearer $SOFIA_API_KEY"

授权

  • Authorizationstring必填

    你的个人密钥或 OAuth 访问令牌,以 Bearer <token> 发送。

路径参数

  • idstring必填

    帖子的标识符。

响应

200application/json

帖子及各目标的状态。

  • idstring必填

    帖子的标识符

  • statusstring必填

    跨所有网络的状态;partial:在一个网络发布成功,在另一个失败

    允许的值: draftscheduledpublishingpublishedsent_to_inboxfailedpartial

  • establishmentIdstring必填

    帖子所属的门店

  • createdAtstring<date-time>必填

    帖子的创建时间

  • targetsobject[]必填

    每个网络和账号一条:同一网络上的两个账号对应两条

    显示子属性
    • platformstring必填

      目标所在的网络

    • accountIdstring必填

      负责发布的账号(GET /v1/establishments/:id/accounts)

    • statestring必填

      目标在其网络上的状态

      允许的值: draftscheduledpublishingpublishedsent_to_inboxfailed

    • publishedAtstring<date-time>

      目标发布的时间

    • permalinkstring

      指向网络上已发布帖子的链接

    • errorstring

      网络拒绝的原因

  • scheduledAtstring<date-time>

    帖子计划发布的时间

401

令牌缺失、未知、已过期或已被撤销。

403

令牌没有 posts:read scope。

404

post_not_found:不在该 Workspace 内(测试模式下为不在授权范围内)。

4XXapplication/json

其他任何错误,以错误结构返回。