Get Promotion Calendar via API

Hi

Is it possible to get the promotion calendar we see in the dashboard via an API.

I have seen: https://developer.spreadshirt.net/display/API/Discount+Resources is this the right end point?

/v1/shops/{shopId}/discountScales

discountScales to me should be discountSales is that a typo?

The API docs here seem limited, I see no mention of whether we need to pass an apiKey here.

Since these are global discounts for the whole spreadshop domain why are we passing shopId here too?

A nice easy public endpoint like: https://api.spreadshirt.net/api/v1/spreadshopPromotions would be great.

If anyone can shed some light. I want to automate our promotional banner we show on our main site.

Thanks

You mean for Shop Promotions? You know that we automatically show the Promotions in your Shop right?

This is the public Link!

1 Like

As an alternative, you can also use this: https://codepen.io/thimo1/pen/eLOoPW

Yes I know that, but we have other banners around our site that promote the discounts.

You can see here: https://snag.gy/GWgkKC.jpg

You can easily read and parse the google calender feed as @Lena_Spreadshop mentioned.

Google calender API:
https://developers.google.com/calendar/v3/reference/events/list

1 Like

I want to display adverts outside of the spreadshop on our main site.

Yes I guess I could query the spreadshop each day and look for the promo code divs as per your example.

But this seems like such an overkill.

I don’t see why being able to access your promotion calendar via an API would be bad thing? Is it currently not possible?

OK thanks, I will go with that route. How stable is this calendar URL? Will it ever change?

An official API would be great. Is this something you can consider?

We use Google Calendar for our Promotions so the Google calendar API is the official one :slight_smile:

OK cool.

Thanks for the info!

Cheers

1 Like

Just added some sample code to my previous post here: :spreadshop: Tipps und Tricks: Die besten Lifehacks
Maybe that helps :slight_smile:

1 Like

Awesome many thanks!

1 Like