The two fields
activeis an on/off switch. When it’sfalse, the resource is never live, whatever itsstatus. Products usepublicfor this switch when you write them.statusis the lifecycle state:draft,scheduled,published, orarchived. Pages, media, playlists, and enrollment packs have noarchivedstate.
status is published, and any publish_at time has passed.
There is no separate publish endpoint. You publish, unpublish, and schedule by updating these fields.
Lists show only live resources
A public list, such asGET /api/v202604/posts, returns live resources only. Drafts, scheduled resources that haven’t gone live yet, and resources switched off never appear in it. Neither do they appear in the product list of a category or collection.
The company list, GET /api/v202604/company/<resource>, returns everything, whatever its state.
Slug lookups also return drafts
A public slug lookup, such asGET /api/v202604/posts/{slug}, is looser than a list. It returns a resource that isn’t live — a draft, a scheduled resource before its time, or one switched off — so that preview and pre-launch links work.
A slug lookup returns 404 only when the resource no longer exists:
When a slug lookup returns a resource that isn’t live, its
seo.indexable is false. The storefront page for it tells search engines not to index it.
Publish a resource
Switch it on and setstatus to published:
public: true instead of active: true.
Unpublish a resource
Either switch it off, which keeps itsstatus:
status back to draft. Both remove it from public lists, but its slug still loads.
To make the slug return 404 as well, set status to archived on a resource that supports it, or delete the resource.
Schedule a resource to go live
Switch it on, setstatus to scheduled, and set publish_at to the go-live time:
publish_at passes, the resource reads as published and appears in public lists. You don’t need a second request. Until then it’s left out of lists but still loads by slug, so you can preview it.
There is only a go-live time. To take a resource down at a set time, update it at that time: switch it off, or archive or delete it.
What else can hide a resource from a list
- Country availability. When a list is filtered by country, a resource limited to other countries is left out. Countries never affect a slug lookup. See Country availability.
- Language. When a list is filtered by
filter[language], a resource not translated into that language is left out. - Restricted media. A medium with restricted visibility, or one uploaded by a rep, is never listed publicly, but it still loads by slug.
- Products not sold in the country. A product with no variant sold in the requested
countryis left out of the list.
Next steps
- SEO — how
seo.indexableis decided. - Slugs and URLs — the slug a lookup uses.