Missing fields in product_update mutation

In the old API we can update a product with the following data. That is not possible with the GraphQL API:

  • images
  • value
  • value_currency
  • price
  • customs_value
  • active (status)
  • brand (seems to be removed completely - why is that?)

We need to be able to update images, value, price and customs_value!

  • Also the following isn’t possible to set on product create:
  • value_currency
  • active

Since value_currency is removed, does that mean all currencies will use the default currency? What if a product uses another currency than the default, and we want to switch?

How do we disable/change the active state on a product with the new API?

Can I please get a reply on this issue?

Hi @Webtimisten!
I apologize I missed your post here.

As for product Images you can find it on the product_update Mutation, something like this:

mutation {
  product_update(
    data: { sku: "123456", images: { src: "image1.png", position: 1 } }
  ) {
    request_id
    complexity
  }
} 

Because they will be the same for all of the warehouses. But for the others you will have to use the warehouse_product_update Mutation because they are specific to each warehouse, something like this:

mutation {
  warehouse_product_update(
    data: {
      sku: "1122334473"
      warehouse_id: "V2FyZWhvdXNlOjExNzkw"
      value: "0.10"
      value_currency: "USD"
      price: "1.00"
      customs_value: "2.00"
    }
  ) {
    request_id
    complexity
  }
}

As for Brand it was deprecated because it was not being used in the code or displayed in the UI.
To be able to set a product as Inactive currently the only way of doing that is on the UI, but if you want I could create a Feature Request for that to be added as well.

For the value_currency when creating the Product, you should also be able to find it under the warehouse_products connection, this is:

mutation {
  product_create(
    data: {
      sku: "TESTsku"
      name: "TESTsku"
      warehouse_products: {
        on_hand: 0
        warehouse_id: "V2FyZWhvdXNlOjExNzkw"
        value_currency: "USD"
      }
    }
  ) {
    request_id
    complexity
  }
}

Thanks again for the patience! and please let me know if there is anything else I could help with
Tom

Thanks, Tom.

We need a way to set outdated products to inactive via API, so please prioritize the option to do that.

Absolutely @Webtimisten!
I submitted the ticket for that and will let you know as soon as it gets approved for the change
Thanks again!
Tom

Hi @tomasw ! I was wondering if there’s been any update on including the “active” field in a mutation. Like with webtimisten, we also need to be able to do a mass update and mark products as inactive via the API.

Thanks,
Jeremy

Hi, sorry to revive an old thread but we’d also like to set the active/inactive status of products via the GraphQL API - is there any update on when that might be available?

2 Likes