Unable to create THEME VIA API

Ramiz251
New Member
1 0 0

Hi guys, 

 
I am trying to create a theme using the REST API using the formatted payload found in the docs however, unable to create the theme with a ZIP File. I have many stores so i'm using the public app to publish it to all the stores. The following error i am getting back via Laravel(Php).  I ensured the method is POST and the end point is /admin/themes.json. I have tried using different REST Clients and still getting no joy. 

 

 

[errors] => stdClass Object
(
[src] => Array
(
[0] => execution expired
)

)

 

 

The following payload is provided. 

 

 

{
  "theme": {
    "name": "mytheme",
    "src": "https://40d77ea1.ngrok.io/repos/theme.zip",
    "role": "main"
  }
}

If i don't provide a src path the the theme is created however, it will just be a blank theme with no files. 

 

 

Replies 3 (3)
Josh
Shopify Staff
Shopify Staff
1134 82 213

Hey there, 

 

Do you have a test store that you could use to test uploading the theme after hosting it elsewhere (somewhere public, maybe Dropbox)? I have a sneaking suspicion that having the file hosted locally is the culprit here, but the only way to know for sure would be to try hosting your file elsewhere.

 

Let me know how it goes! 

Josh | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

ViktorasssIT
Shopify Partner
5 0 1

Hey there,

I'm facing the same problem.

Have you found out what was the issue?

davidkean
Shopify Partner
50 1 13

Hi @Josh,

Same problem for me. I stored the zip file in public hosting. When I paste the URL of the zip file into the browser, the browser downloaded my zip file easily. It seems there is a problem IF the app's status is "DRAFT". But I need to work on my app in the development store before releasing the app. Do you have any idea about this problem?

David Kean
CoFounder at Boostheme team
https://boostheme.com