Skip to content

Put Catalog Required Fields Type Error #27

Description

@ChrisDalley

Hey folks - just started playing around with this package and so far it's been great!

I did encounter a Type error issue with the V3 Managed API for both the /catalog/products/{product_id} and /catalog/products endpoints.

It seems that the PUT request (updateProduct) has the same required fields as the POST request (createProduct) so the below throws a Type error requiring weight, price and type however only product_id should be required (https://developer.bigcommerce.com/api-reference/b3A6MzU5MDQyODk-update-a-product).

 this.bigcommerceClient.v3.put('/catalog/products/{product_id}', {
           path: {
               product_id: 123
           },
           body: {
               name: "Updated Name",
           }
          }).then(
            result => { // 200 -> response.body.data; 204 -> null
              console.dir(result);
            },
            error => { // non-2xx
              console.error(error);
            },
          )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions