Hanzo
OpenapiContent

Moves one content item to a new lifecycle state and, on the move to published,…

Moves one content item to a new lifecycle state and, on the move to published, fans it out to the item's channels.

POST /v1/content/{doctype}/{name}/transition

Addresshttps://api.hanzo.ai/v1/content/{doctype}/{name}/transition
MethodPOST
Operationpost_content_by_doctype_by_name_transition
AuthAuthorization: Bearer $HANZO_API_KEY

Moves one content item to a new lifecycle state and, on the move to published, fans it out to the item's channels. The edge must be legal for the item's current state — an illegal move is refused with 409 — and the status write re-validates it at the storage boundary. Distribution is best effort: its honest state is reported on the result and a distribution failure never rolls the status change back.

Request

6 fields, body application/json (required).

FieldInTypeRequiredDescription
doctypepathstringyesDocType is the content type to act on, from the path.
namepathstringyesName is the document to act on, from the path.
doctypebodystringDocType is the content type to act on, from the path.
namebodystringName is the document to act on, from the path.
scheduleAtbodystringScheduleAt is an ISO-8601 go-live time handed to the channel's own scheduler; "" distributes now.
tobodystringTo is the lifecycle state to move to.

Response

StatusBodyMeaning
200TransitionResultok

200 body — 20 fields.

FieldInTypeAlwaysDescription
distributionbodyPublishResult
distribution.channelsbodystring[]Channels is the channel list read off the content document — integration ids or provider names, as the item declares them.
distribution.externalIdsbodyobjectExternalIDs maps channel id → the post id that channel returned, merged with everything earlier publishes recorded.
distribution.externalIds.*bodystring
distribution.resultsbodyChannelResult[]Results is the outcome per channel — which went out, which did not and why — covering the whole fan-out including failures, so partial success is never…
distribution.results[].channelbodystringthe social integration id targeted
distribution.results[].errorbodystringshort reason, when it failed
distribution.results[].externalIdbodystringsocial post id, when it went out
distribution.results[].providerbodystring"x" | "instagram" | ...
distribution.results[].statusbodystring"distributed" | "scheduled" | "failed"
distribution.statusbodystringStatus is the ONE headline, drawn from: "distributed" (something is on record and went out now), "scheduled" (same, handed to the channel's own scheduler for…
doctypebodystringDocType is the content type that moved — Campaign, SocialPost or Asset — echoed from the path.
frombodystringFrom is the state the item held when it was read.
namebodystringName is the document that moved, echoed from the path.
storefrontbodyStorefrontResult
storefront.imageUrlbodystringImageURL is the absolute URL the listing's headerImage now points at.
storefront.slugbodystringSlug is the product handle the image was attached to.
storefront.statusbodystringStatus is one of "published" (the product image was set), "not_configured" (no commerce edge, no store provisioned for the org, or a token that is not admin on…
storefront.storebodystringStore is the commerce store id the image landed in, resolved for the org mid-call.
tobodystringTo is the state it holds now.

Failure carries the platform error shape — see Errors.

Examples

hanzo content doctype transition <doctype> <name>

Content API · All Hanzo APIs · Interactive reference

How is this guide?

On this page