Home > Enterprise >  Validation error when attempting to upload an image with postman via printify api upload image endpo
Validation error when attempting to upload an image with postman via printify api upload image endpo

Time:01-09

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

CodePudding user response:

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.

  • Related