links
POST /v1/content/posts/{postId}/placements
Schedule this post onto one of your sites.
Pagpapatotoo
Magpadala ng API key bilang bearer token. Ang endpoint na ito ay hindi naglatag ng tiyak na pahintulot sa pagtutukoy, kaya ibigay sa iyong key ang pinakamababang kailangan nito at suriin ang tugon sa halip na umasa.
Ang endpoint na ito ay hindi nangangailangan ng id ng organisasyon. Natutukoy na ng iyong key ang organisasyong kinabibilangan nito, at nakatuon ang tugon dito.
Subukan ito
Palitan ang anuman sa loob ng mga panaklong na may anggulo ng iyong sariling mga halaga, at ang placeholder ng key na may key mula sa iyong dashboard.
curl -X POST https://api.zinndigital.com/v1/content/posts/{postId}/placements \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "site_id": <string>, "publish_at": <string> }'Nakalagda? Ang API console sa iyong dashboard ay awtomatikong naglalagay ng iyong tunay na ID ng organisasyon at sariling susi, at pinapatakbo ang kahilingan laban sa live na API upang makita mo ang aktwal na tugon. Buksan ang endpoint na ito sa console ng API
Mga Detalye
Publishes the post to that site, in that WordPress category, at that time — V1's `PostTask`. The category is a **name**, not a term id, because a term id is per-site and one post goes to many sites. Refused with 409 if the post is already scheduled or live on that site: publishing the same content twice to one site is a duplicate-content footprint on the line whose premise is not leaving one. Gated on `links.edit`.
Mga Parameter
| Pangalan | Uri | Kailangan | Ano ito |
|---|---|---|---|
postId (path) | string | Oo | — |
Katawan ng kahilingan
| Pangalan | Uri | Kailangan | Ano ito |
|---|---|---|---|
site_id | string | Oo | — |
publish_at | string | Oo | — |
category | string | Hindi | — |
Tugon
| Pangalan | Uri | Kailangan | Ano ito |
|---|---|---|---|
id | string | Oo | — |
post_id | string | Oo | — |
post_title | string | Oo | — |
site_id | string | Oo | — |
site_domain | string | Oo | — |
category | string | Oo | The WordPress category NAME. Empty means the site's default category. A name rather than a term id because term ids are per-site and one post goes to many. |
publish_at | string | Oo | When the sweep may publish it — not a promise about the second. |
status | string<scheduled, publishing, published, failed, cancelled> | Oo | — |
wp_post_id | integer | Oo | Null until the post is live. Nullable rather than `0`, because "not published yet" and "published as post 0" are different facts and a zero renders as a broken link. |
wp_post_url | string | Oo | — |
target_kind | string<, wordpress, headless_rest, git_static> | Oo | Which adapter published it. Empty until it publishes. A placement is no longer necessarily a WordPress post — `wp_post_id`/`wp_post_url` above are the WordPress projection of th… |
remote_post_id | string | Oo | What the destination calls the thing it created. A **string**, because a Ghost id is a hex ObjectId, a Shopify id is a GID URL and a Git target's is a commit sha — only WordPres… |
remote_post_url | string | Oo | Where it lives. Empty when the destination does not report a URL. |
dropped_capabilities | string[][] | Oo | What the destination could not carry, and why — `[["featured_image", "this destination has nowhere to attach a featured image"], …]`. ⛔ Empty is the normal case and means nothin… |
error | string | Oo | A machine code the client localises, never a sentence. One of `site_not_active`, `site_changed_owner`, `no_adapter`, `no_target_configured`, `no_credential`, `no_repository`, `m… |
published_at | string | Oo | — |
created_at | string | Oo | — |
Mga error na maibabalik ng endpoint na ito
401 · 403 · 404 · 409 · 422