PUT Product Request to API Fails Due to Spaces in Text

bpmark
New Member
3 0 0

I'm performing a very simple edit/PUT request to an existing Shopify Product using the admin API, simply to change the product_type.

Attempting to set "WeddingBand" succeeds. Attempting to set it "Wedding Band" fails with the error shown below...seems pretty obvious, it does not like my space. 

I've seen suggestions that I need to substitute another encoding of the space character, but have not had much success getting clarification of what character that is.

Any assistance is greatly appreciated.

Capture.JPG

0 Likes
_JB
Shopify Staff
Shopify Staff
824 97 179

Hey @bpmark,

This appears to be an issue with the client being used to send the call, as the error message terminates where the space appears. Escaping the space character will depend on that client. The URL encoded value for a space is %20, for HTML it's  , or you can try using a \ in front of the space character. If that doesn't work I recommend reaching out to the developer who maintains that API client.

JB | 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
bpmark
New Member
3 0 0

Thanks for this, I will check it out!

0 Likes
bpmark
New Member
3 0 0

No go on those 3 character recommendations, but I appreciate the response, and will see if Postman offers any insight.

Thanks again.

0 Likes