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

Question:

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

Asked By: Scott Briggs

||

Answers:

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.

Answered By: CryptoFool
Categories: questions Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.