Products API expected String to be a Hash

ArunSinghal
New Member
1 0 0

Hi,

I am trying to create a product using Product API, but every time I receive a message "expected String to be a Hash",

i also tried passing header with "application/json; charset=utf-8" params but then i receive "BAD REQUEST". 

i simulated the same in POSTMAN and it is working absolutely fine.

FYI, i am developing in Deluge.

Please suggest..

x-request-id":"054b95e6-604f-4f6a-82a8-a40dd0ced576"

0 Likes
Don
Shopify Staff
Shopify Staff
1298 79 171

Hey there @ArunSinghal!

Don here from Shopify.

I just wanted to let you know I have moved your query here to our dedicated API forums, as this would be the best place for you to get a good response.

These forums and moderated and responded to by our own developers and Partners, so you would be best served to share API questions here as we're not able to provide this kind of support through our regular channels.

Hopefully, a member of our Community will be able to chip in from their own experience and provide some useful info for you here.

All the best!

 

Regards,

Don

Don | Social Care @ 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

0 Likes
Kevin_A
Shopify Staff
Shopify Staff
293 36 47

Hey @ArunSinghal 

If you simulated in Postman and it worked, then the issue is likely with the encoding or text format in your app. It looks like we aren't reading the product title as JSON but as raw text which is likely the issue. 

Kevin_A | Developer Support @ 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 Shopify.dev or the Shopify Web Design and Development Blog

0 Likes