Skip to content

Error: Printify SDK: 400 Bad Request when attempting products.updateOne() #43

@greergan

Description

@greergan

Describe the bug

Request: PUT https://api.printify.com/v1/shops/24827369/products/69019022ef37eb2d810bd55e.json
Printify SDK: 400 Bad Request - Requested URL: https://api.printify.com/v1/shops/24827369/products/69019022ef37eb2d810bd55e.json
node:internal/modules/run_main:123
triggerUncaughtException(
^

[Error: Printify SDK: 400 Bad Request - Requested URL: https://api.printify.com/v1/shops/24827369/products/69019022ef37eb2d810bd55e.json]

To Reproduce

const printify = new Printify({
accessToken: authorization_token,
shopId: shop_id,
enableLogging: true,
});
const products_list_array = await printify.products.list();

loop over the products_list_array
loop over the products_list_array.variants array
update variant.price

const updated_product_object = await printify.products.updateOne(product_object.id, product_object);

Expected behavior

the products.updateOne function should work

Code snippets

OS

Linux

Node version

v20.19.5

Library version

printify-sdk-js 1.4.0

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions