Trouble updating Numeric (Type O/N) features via PUT /products/:id API

Hey everyone,

Hoping someone might have run into this before. I’m using the REST API to add/update products, and I’m hitting a wall specifically with numeric features (like Type O - Others: Number, or maybe Type N).

Here’s what’s happening:

  1. I can’t include product_features when creating a product (POST /products) because it throws a 500 Error (TypeError: mysqli::real_escape_string()). So, I’m doing a two-step: first create the product with basic info, then update it with features using PUT /products/:id.
  2. The PUT request works perfectly fine for Selectable (S/E/M) and Text/Date (T/D) features. I send these as simple strings ("FEATURE_ID": "VARIANT_ID" or "FEATURE_ID": "VALUE"), and they save correctly. The API gives a 200 OK.
  3. However, Numeric (O/N) features just won’t save. I’ve tried sending the value in various ways ("FEATURE_ID": "3000", "FEATURE_ID": {"value": "3000"}, "FEATURE_ID": {"value_int": "3000"}, {"feature_type": "O", "value": "3000"}, etc.), and while the API always returns 200 OK, the numeric value itself is never actually saved to the product (checked via GET /products/:id?extend=features).

My Questions:

  • Does anyone know the correct JSON format to send numeric features (specifically Type O) within product_features when using the PUT /products/:id API? The official docs only show an example for Type T ({"feature_type": "T", "value": "..."}) and no examples for numeric or selectable types in this context.
  • Could this just be a bug in the update_product API for numeric features?

Right now, my only option is to skip updating numeric features via the API, which isn’t ideal.

Has anyone else encountered this or found a working format for updating numeric features via PUT /products/:id? Any help or pointers would be awesome!

Thanks!