MONEI / Shopify-api-node

Node Shopify connector sponsored by MONEI
https://monei.com/shopify-payment-gateway/
MIT License
947 stars 278 forks source link

Unable to add a product with a metafield list #608

Closed alexislepresle closed 1 year ago

alexislepresle commented 1 year ago

Hi! I can create the product with simple metafields, but as soon as I add a metafield list, it doesn't work. return HTTPError: Response code 400 (Bad Request).

My code :

const features = ['test', 'test'];
...
metafields: [
        {
          key: 'features',
          value: features,
          value_type: 'single_line_text_field',
          namespace: 'custom'
        },
        ...
 ]

Package version: ^3.12.3

Thank you!

lpinca commented 1 year ago

as I add a metafield list, it doesn't work.

AFAIK this is not supported by the Shopify REST Admin API. You have to create one at time.

alexislepresle commented 1 year ago

Oh right, thanks for your reply, I hadn't seen that :)