貼文取得貼文

貼文

取得貼文

回傳貼文及各網路的狀態、發布後的連結和失敗時的錯誤。正式模式可讀 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

其他任何錯誤,以錯誤結構回傳。