Future Publish Date for Product via API

Shopify Partner
1 0 0

We are trying to update products via the Product API so that they have a published date set sometime in the future.

 

We have found some old posts suggesting to use the publish_on field and some others that suggest adding the header `X-Shopify-Api-Features` = `future-publishables` to the call. Neither of these solutions seem to be working now.

 

Does anyone know a solution that currently works?

 

Thanks in advance!

 

0 Likes
Shopify Partner
508 111 157

Hello dgrajeda,

 

You can use the "published_at" field to published date set sometime in the future.

published_at.png

 

For more details please check this link: https://help.shopify.com/en/api/reference/products/product#create

 

Thank you,

Tejas

Shopify Expert | skype: tejas.nadpara
- Feel free to contact me on support@hexaecommerce.com regarding any help
- Like and Mark as an Accepted Solution if reply helpful
0 Likes
Shopify Partner
1838 173 568

@dgrajeda

 

Sorry to break the bad news, but as far as I am aware of, you cannot set future publishing dates on resources as of yet. Still waiting for response from Shopify as to why not / when yes this will be available given that the API is already prepped for it and we're just missing access scopes.

 

Meanwhile, you can set the published_at field to null i.e. it won't be published. Once you want to publish it, you will need to update the product yet again - won't happen on its own. You cannot set published_at to a future date - think of it - published << past tense so how would that work with a future date?

 

Best wishes!

I turn coffee in to code - since 1998
0 Likes
New Member
3 0 0

Thank you for this.  We are looking to just retrieve whether future published has been set and the date.  We have a large number of products and need to make sure we aren't missing anything for future publishing.  The only way to do that through the UI is to click into each one.  Thoughts?

 

thanks!

 

0 Likes
New Member
2 0 1

If you set publish_on instead of published_at to a date in the future.  It will publish at the date you specified in the publish_on date.  I do not believe this method is documented, but it does work.  We have been doing this for some time.

1 Like
New Member
2 0 0

Thanks @Ben_Miller4 !!! Definitely didn't see this documented anywhere

0 Likes
New Member
2 0 1

Agreed, it is not documented, probably for a reason.  Which also means it is use at your own risk.  

 

Side note, I think we ran into an issue with this functionality.  IF you submit a future date/time that falls too close to the current time (my best guess right now is within 24 hours or same day) then Shopify decides to go ahead and publish it NOW.  I have not 100% proven this, it is just my best guess.  

So my advice would be to make sure you take steps to avoid submitting a publish_on date that is within 24 hours of now.  I have actually taken steps to avoid it within 48 hours just to be safe.  In my case the products were all set up to publish at the right time then a message was sent with the same time it already had in the system but because it was same day Shopify just went ahead and published it at the time of the updated_at for no reason.  

0 Likes