Utilisation CURL et php, fonctionne plus depuis MAJ de API

thats the same code i wrote to you :wink:

I knew you came up with this, so here’s some peace of working code I just built for you:

It does following:
You provide a url parameter like: XXX.php?url=https://www.spreadshirt.fr/dj+hip+hop+mix-A13407398 and the script will read the url and parse the article id of your given url. Then it will request spreadshirt eu marketplace to get information of specific article and returns as xml.

You only need to read the xml data provided and do what you like to do :wink:

You could also modify that code to read all designs of your given SellerIds or similar things. With the API you have a lot of more options and will always receive a response with same structure which makes everything easier.

yes yes with what you told me on the security news and yes it’s the same as you but I scream to win too fast.

I arrive to create a basket, I manage to create a box url, but it does not register the products in the basket.

because is it expensive?

I added a var_dump of $ _SESSION [‘articles’]

You could also modify that code to read all designs of your given SellerIds or similar things. With the API you have a lot of more options and will always receive a response with same structure which makes everything easier.

thank you <3 I’m seeing all that with your code to get the info as before, but I’m not comfortable with XML and DOM so I go slowly.

But actually it will be more reliable than recovering the hml code

Thats quite easy with: https://secure.php.net/manual/fr/simplexmlelement.construct.php

1 Like

I must go sleep my little girl and eat again :slight_smile: I tell you tomorrow.
Good evening

so it works well for url like this


but for this one no

I cross that it’s the url of the new account no?

lol yes my code must not be very very pretty: p

Hey guys!
I read everything but didn’t understand all ot it (I’m a Rubyist, I don’t know much PHP :slight_smile: ), but do we agree that Spreadshirt doesn’t allow us anmymore to add other seller’s designs in our shop to sell them?
They was a button before to add and sort design by categories in the shop, but it disappears since the new spreadshirt version. The told me the feature shouldn’t be develop, neither in the spreadshirt website, neither in the API…
Did you guys find a way to pass through this (all legaly of course)?

Hello @Arpsara,

if you can with the use of https://spreadshirt.github.io/apps/sketchomat and the design id in the settings you can sell any design on your shop.

in the parameters of tom account spreadshirt it is necessary to have activated the sale of the designs of other sellers for it to work it seems to me.

you must create your topic, otherwise it will quickly be this mix if we put several topics on the same subject

What kind of information do you need exactly? We could then switch to designs’ data to avoid it.

I understand nothing :disappointed_relieved: I created a product addition, and the same code for the basket on a test page it works very well.

HTTP / 1.1 201 Created

and on the site it does not work

HTTP / 1.1 400 Bad Request

edit :

the basket functione: 'D ouhaiiiiiii … lol finally !!!

I cross (I’m not sure) that one of the problems came from the basketItem.xml matrix files

I thought I would never get there

Thank you for your support !!

he i need only the id design after from the i can all get back thanks to the api as you showed me.

id-design, title, description, tag, image

You can get the DesignId maybe this way:

And/or get the DesignId from the image url

using following script: https://pastebin.com/3NSgMNrK
Or, if you’ve got the DesignId already, modify the script so you just need to provide the DesignId to get the Design details.

ha it’s a good idea!
I will do this for the designs that I add other users and I will use the “api shop” to recover those of my shop to me.

or even easier, if you know a way to access


the API requests sessionId but I do not really know what it is.

This is not possible, only the owner of the account can query his designs. But you can query the marketplace here again e.g. https://api.spreadshirt.net/api/v1/shops/205909/designs?locale=fr_FR&fullData=true&limit=10&offset=0&query=USERNAME
whereas USERNAME is the username.

You may get designs of other users listed too, but it’s worth a try. More informations about searching the marketplace with api: https://developer.spreadshirt.net/display/API/Searching+on+Spreadshirt’s+Design+Marketplace+Using+Spreadshirt+API+v1

1 Like

I speak for my designs for all imported but it may be better “shop”.

in all this thank you for all his information you helped me a lot and I am told a lot about the API thanks to you!

I still have one or two small questions but I will first test all that, that’s a lot of information already :).

for your own, use https://api.spreadshirt.net/api/v1/users/ID-USER/designs or https://api.spreadshirt.net/api/v1/shops/ID-SHOP/designs

Let me know if I can help you any further :slight_smile:

1 Like

Hi lovetee

I am doing everything with the API is great, I even managed to do the sessions!

So I open a session to view my drawings and see those I want registered and on the other hand with query I searched via my website directly.

I still have some problem can you still help me :smile:

if I use the url


‘id’ => string ‘144401990’ (length = 9)
‘weight’ => string ‘0.0’ (length = 3)
public ‘created’ => string ‘2018-02-18T11: 51: 29Z’ (length = 20)
public ‘modified’ => string ‘2018-02-28T09: 53: 43Z’ (length = 20)
public ‘version’ => string ‘1518954734’ (length = 10)
public ‘name’ => string ‘Tonton 2018’ (length = 11)
public ‘description’ => string ‘This pattern is ideal for future tontons of the year 2018, it is available on t-shirt, tank top, mug, sweater, sweatshirt and many accessories.’ (length = 165)
public ‘tags’ => string ‘uncle in 2018, uncle, uncle, birth, idea, pregnancy, future, future, family, pregnant, from, gift, gift, soon, announcement, 2018’ = 148)

I can recover everything I want.

But if I use his url I miss the * tag * and the * description *, I only have the name.

-> https://api.spreadshirt.net/api/v1/users/ID-USER/designs/id_design
-> https://api.spreadshirt.net/api/v1/shops/205909/designs/’.$idDesignSpreadshirt.’?locale=fr_FR&fullData=true

‘id’ => string ‘144401990’ (length = 9)
public ‘name’ => string ‘uncle 2018’ (length = 11)
public ‘legalStatus’ => string ‘ONLINE’ (length = 6)

you will not have a solution?

Could you please provide a sample URL with IDs?

Hello, the id is the one indicated in the quotes I used in the example.


for the search I made “Tonton + 2018” and I look for my design (144401990) in the list (there is the tag and the description)


however when I use my data there is no tag or description

-> https://api.spreadshirt.net/api/v1/users/8568956/designs/144401990
-> https://api.spreadshirt.net/api/v1/shops/205909/designs/144401990?locale=fr_FR&fullData=true

This should work (if its your user id):

This might not work:

ok so (sorry I have a little trouble with all this: p)

it’s ok (thx :slight_smile: ) I have all the info (tag and description ok) with


on the other hand I can not find a url that displays all the information of a design if this design is not a month.
I can only get the tag and description in a search list, but I can not get it on one design.
Otherwise I should save in GET / POST the information of the research then recorded in BDD.