Hello,
Is there a way to retrieve just a few product fields using Get Product REST API endpoint instead of getting the whole fields set for every returned item? E.g. return product ID and warehouse ID only.
Thanks.
Hi ihnatk!
You could achieve that by using the GraphQL API, and a query as this:
query {
product(sku: "example-sku-123") {
request_id
complexity
data {
id
legacy_id
warehouse_products {
id
legacy_id
}
}
}
}
But as for the Rest API, it will always return all of the fields (and that API will be deprecated eventually)
Hope this helps!
Thanks!