Create Catalog Image Error

Hi,

I am trying create Catalog İmage from API explorer with this link.

It is giving the following error.

How can I solve this problem.

Thank you.
,

"errors": [
    {
      "category": "INVALID_REQUEST_ERROR",
      "code": "INVALID_CONTENT_TYPE",
      "detail": "Received multiple request parts. Please only supply zero or one `parts` of type application/json or application/x-protobuf."
    }
  ]

:wave: I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:

Additional Documentation

Upload and Attach Images
Catalog API Overview
Build a Simple Catalog

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.

The error message indicates that the API request received multiple parts, which is not expected. The CreateCatalogImage endpoint expects a single part in the request, which should be either of type application/json or application/x-protobuf.

When using the API Explorer to create a Catalog Image, you should provide the necessary details in the provided fields and the tool will construct the appropriate request for you. Make sure you’re only providing one part in your request. If you’re trying to upload an image file, ensure that the file is correctly selected in the ‘Image File’ field.

If you’re constructing the request manually outside of the API Explorer, ensure that you’re correctly formatting your request as a multipart request with a single part. The part should contain the JSON request body or protobuf request body, and the image file to be uploaded.

This answer was reviewed by @Bryan-Square.