Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Put Catalog Required Fields Type Error #27

Open
ChrisDalley opened this issue Mar 7, 2022 · 0 comments
Open

Put Catalog Required Fields Type Error #27

ChrisDalley opened this issue Mar 7, 2022 · 0 comments

Comments

@ChrisDalley
Copy link

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);
            },
          )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant