links
POST /v1/content/posts/{postId}/placements
Schedule this post onto one of your sites.
Аутентификация
Передайте API-ключ в качестве маркера носителя (bearer token). Эта конечная точка не указывает конкретное разрешение в спецификации, поэтому предоставьте своему ключу минимум необходимых прав и проверьте ответ, вместо того чтобы делать предположения.
Этот эндпоинт не принимает идентификатор организации. Ваш ключ уже определяет организацию, к которой он принадлежит, и ответ ограничивается ее рамками.
Попробовать
Замените всё в угловых скобках на собственные значения, а плейсхолдер ключа — на ключ из вашей панели управления.
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> }'Вошли в систему? Консоль API в вашей панели управления автоматически подставляет реальный идентификатор вашей организации и ваш собственный ключ, а также выполняет запрос к работающему API, чтобы вы могли увидеть актуальный ответ. Откройте эту конечную точку в API-консоли
Подробнее
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.
Параметры
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
postId (path) | string | Да | — |
Тело запроса
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
site_id | string | Да | — |
publish_at | string | Да | — |
category | string | Нет | — |
Ответ
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
id | string | Да | — |
post_id | string | Да | — |
post_title | string | Да | — |
site_id | string | Да | — |
site_domain | string | Да | — |
category | string | Да | 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 | Да | When the sweep may publish it — not a promise about the second. |
status | string<scheduled, publishing, published, failed, cancelled> | Да | — |
wp_post_id | integer | Да | 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 | Да | — |
target_kind | string<, wordpress, headless_rest, git_static> | Да | 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 the… |
remote_post_id | string | Да | 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 WordPress… |
remote_post_url | string | Да | Where it lives. Empty when the destination does not report a URL. |
dropped_capabilities | string[][] | Да | 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 nothing… |
error | string | Да | 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,… |
published_at | string | Да | — |
created_at | string | Да | — |
Ошибки, которые может возвращать этот эндпоинт
401 · 403 · 404 · 409 · 422