Reputation: 3060
I have an bigcommerce headless ecom site. I keep data synced to my own database so I dont have to rely on bc api calls for every user.
Problem now is that certain data changes often. Like prices. — How can i use the BigCommerce api to get a list of only prices/name/id the list would loook like the below.
[
{
name: xxx,
id: xxx,
calculated_price: xxx,
},
{
name: xxx,
id: xxx,
calculated_price: xxx,
},
]
Upvotes: 0
Views: 270
Reputation: 684
You can use the ?include_fields
parameter to control the fields in the response when using the V3 Catalog API.
For example:
GET /v3/catalog/products?include_fields=calculated_price,name
IDs will always be returned.
From there you could apply other filters to control which items are returned in the collection.
If you also need variant prices, try including the variants with ?include=variants
Upvotes: 4