Stores Catalog V3: POST /stores/v3/products-with-inventory returns 400 “Expected an object” (no field details)

Hi everyone,

I’m building a product feed integration: I fetch products from my own system and create them in Wix Stores Catalog V3 using the REST API.

I’m calling:

POST https://www.wixapis.com/stores/v3/products-with-inventory

But some of my products are failed to be created with 400 HTTP status code and json body:

{
    "message": "Expected an object",
    "details": {}
}

The problem is that the error response doesn’t tell which field is wrong (which “object” is expected), so it’s hard to debug.

Example request body №1:

{
  "product": {
    "name": "Force",
    "productType": "PHYSICAL",
    "description": "XAN FORCE xanthan is a high-performance...",
    "physicalProperties": {},
    "mainCategoryId": "bb2367d5-67dc-40f1-bb6d-565d0bfc322b",
    "media": {
      "itemsInfo": {
        "items": [
          {
            "url": "https://example.com/testimportasset.jpg"
          },
          {
            "url": "https://example.com/testimportasset2.jpg"
          }
        ]
      }
    },
    "variantsInfo": {
      "variants": [
        {
          "sku": "XF005",
          "choices": [],
          "price": {
            "actualPrice": {
              "amount": "27.72"
            }
          },
          "physicalProperties": {
            "weight": "8.05"
          },
          "inventoryItem": {
            "inStock": true
          }
        }
      ]
    }
  }
}

Example request body №2:

{
  "product": {
    "name": "VacMax_Plus",
    "productType": "PHYSICAL",
    "description": "VACMAX PLUS is used coat...",
    "physicalProperties": {},
    "mainCategoryId": "bb2367d5-67dc-40f1-bb6d-565d0bfc322b",
    "media": {
      "itemsInfo": {
        "items": [
          {
            "url": "https://example.com/image1.jpg"
          },
          {
            "url": "https://example.com/image2.jpg"
          }
        ]
      }
    },
    "variantsInfo": {
      "variants": [
        {
          "sku": "VMP012J",
          "choices": [],
          "price": {
            "actualPrice": {
              "amount": "7.48"
            }
          },
          "physicalProperties": {
            "weight": "4.09"
          },
          "inventoryItem": {
            "inStock": true
          }
        }
      ]
    }
  }
}

Example request body №3:

{
  "product": {
    "name": "Thin",
    "productType": "PHYSICAL",
    "description": "THIN FORCE is a low molecular weight...",
    "physicalProperties": {},
    "mainCategoryId": "bb2367d5-67dc-40f1-bb6d-565d0bfc322b",
    "media": {
      "itemsInfo": {
        "items": [
          {
            "url": "https://example.com/testimportasset.jpg"
          },
          {
            "url": "https://example.com/testimportasset2.jpg"
          }
        ]
      }
    },
    "variantsInfo": {
      "variants": [
        {
          "sku": "TF0012",
          "choices": [],
          "price": {
            "actualPrice": {
              "amount": "12.95"
            }
          },
          "physicalProperties": {
            "weight": "5.06"
          },
          "inventoryItem": {
            "inStock": true
          }
        }
      ]
    }
  }
}

I have seen this error before after spending a few hours i found that if i am sending “physicalProperties“ section as an array “[]” not as an object API was returning same “Expected an object” error. but in cases above i don’t understand the reason of the error. Please advice.
So:

  1. What does “Expected an object” refer to in this endpoint? Is it the root body, product, media.itemsInfo.items, price.actualPrice, or something else.
  2. Is there any way to get more detailed validation errors from this API (like a field path)
  3. What number of requests (per minute or per hour) is set in Wix Stores Catalog API as a rate limiting. I didn’t manage to find this information in documentation. I found that API can respond with 429 HTTP status code (here: About Errors ) but there are no information about actual number of requests allowed per minute for example. I found somewhere on this forum that it is set to 200 requests per minute which i have set in my internal rate liming and it appears to be false. but when i set it to 100 per minute seems to be working find. But i’d like to know exact number of requests per minute or another mechanism that is used by Wix Catalog API

Thanks!

It’s hard to tell exactly what is wrong - and I don’t have a full setup to hand to test fully.

The only thing that stands out at the moment that may be wrong is the description. Based on the docs, it’s expecting plainDescription in the format of a string of valid HTML.

If I understand correctly, when you use description it should be in the format of RichContent, which is JSON

Thank you. Yeah, you are right! My bad, it works now. Do you have any information up on the rate limiting? Maybe it is somewhere in docs but i didn’t find it. Probably you can help me with this. Thanks!