Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Validation error when attempting to upload an image with postman via printify api upload image endpoint

I am attempting to upload an image with postman using printify’s upload image endpoint, however I am getting an error message saying these fields are required. The authentication token is definitely working as other GET request are returning fine, it’s probably a simple fix as I’m new to this stuff but please see the image below for more details. Thanks!!

enter image description here

I tried to post an image expecting a correct response, but got a validation error instead

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You are connecting to an endpoint that expects the incoming POST request to contain information in JSON format. But from your Postman screen dump, it appears that you are providing the information as form-encoded data. If you send a payload that provides your data fields in a JSON dictionary, I expect you’ll have better results.

Take a look at the docs for the API: https://developers.printify.com/#uploads. It provides a clear example of how to make the call to the endpoint in question.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading