How to do the lowest price js

184 views
Skip to first unread message

José Luis García Hernández

unread,
Apr 5, 2016, 12:44:35 PM4/5/16
to Octopart API
I want show the lowest price preferred from api octopart how todo do it?

Andres Morey

unread,
Apr 5, 2016, 12:49:32 PM4/5/16
to octopa...@googlegroups.com
Hi Jose,

Thanks for your email. To sort the part results by price you can use sort by "avg_price asc"

To pick the lowest priced offer you can sort the offers client-side.

Hope that helps! Let me know if you have any other questions.

Andres

Andres Morey
Octopart


On Tue, Apr 5, 2016 at 11:05 AM, José Luis García Hernández <ghdz....@gmail.com> wrote:
I want show the lowest price preferred from api octopart how todo do it?

--

---
You received this message because you are subscribed to the Google Groups "Octopart API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to octopart-api...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

José Luis García Hernández

unread,
Apr 5, 2016, 8:49:25 PM4/5/16
to Octopart API
Thanks, and I can sort by preferred offers? like mouser digikey and newark.
Something like the search for the lowest price preferred in octopart bom tool

Andres Morey

unread,
Apr 6, 2016, 9:37:52 AM4/6/16
to octopa...@googlegroups.com
Hi Jose,

You can limit your search to Parts that have Offers from Digi-Key or Mouser by using search filters:

For example, you can use these url arguments to limit your search to Parts that have Offers from Digi-Key or Mouser:
"&filter[fields][offers.seller.name][]=Digi-Key&filter[fields][offers.seller.name][]=Mouser"

Note, that the API returns all the offers so if other distributors also stock those parts you'll see them in the result set as well.

The BOM Tool retrieves results from the Octopart API and choses the lowest price preferred using client-side logic.

Hope that helps!

Andres

Andres Morey
Octopart


On Tue, Apr 5, 2016 at 8:49 PM, José Luis García Hernández <ghdz....@gmail.com> wrote:
Thanks, and I can sort by preferred offers? like mouser digikey and newark.
Something like the search for the lowest price preferred in octopart bom tool

Reply all
Reply to author
Forward
0 new messages