Parts Library API Documentation

COMPONENT SEARCH

Sample Call
URL: api/components/search?keywords=200ma&manufacturer_slug=jcet&type_slug=diode-schottky&package_slug=sod-123
Parameters
keywords Optional search keyword that will search for the bom component record
manufacturer_slug Optional manufacturer slug on which manufacturer to limit search
type_slug Optional type slug on which type to limit search
package_slug Optional package slug on which package to limit search


Response
component_id Bom Component ID
m_name Manufacturer's Name
c_value Components Value
c_pins Components Number of Pins
c_rohs Components ROHS
c_type Component Type
free If its FREE?
m_partnumber Manufacturer's Part Number
p_min_qty Min Quantity
placement_cost Placement Cost
setup_cost Setup Cost
stocked If its a Stocked ?
unit_cost Component Unit Cost

Sample Response (JSON)

{"components":[{"component_id":"1681","m_name":"JCET","manufacturer_slug":"jcet","m_partnumber":"BAT43W","m_partnumber_slug":"bat43w","m_datasheet":"http:\/\/dangercore.dev\/assets\/datasheets\/BAT43W.pdf","c_type":"diode schottky","type_slug":"diode-schottky","c_value":"200mA 30V 4A surge","c_package":"SOD-123","c_package_slug":"sod-123","c_pins":2,"c_rohs":1,"c_attributes":"{\"Vreverse\":\"30V\",\"If(av)\":\"200mA\\\/4A surge\",\"Vforward\":\"0.45 @ 15mA\"}","file_hash":null,"file_name":null,"file_url":null,"details_url":"http:\/\/dangercore.dev\/bom\/details\/1681-jcet-bat43w","quote":{"stocked":1,"free":0,"setup_cost":0,"component_cost":{"100":0.06051724137931,"200":0.057491379310345,"500":0.054465517241379,"1000":0.051439655172414},"pins":2,"placement_cost":0.089655172413793,"overage":33},"free":0,"stocked":1},{"component_id":"1682","m_name":"JCET","manufacturer_slug":"jcet","m_partnumber":"BAT43WS","m_partnumber_slug":"bat43ws","m_datasheet":"http:\/\/dangercore.dev\/assets\/datasheets\/BAT43WS.pdf","c_type":"diode schottky","type_slug":"diode-schottky","c_value":"200mA 30V 4A surge","c_package":"SOD-123","c_package_slug":"sod-123","c_pins":2,"c_rohs":1,"c_attributes":"{\"Vreverse\":\"30V\",\"If(av)\":\"200mA\\\/4A surge\",\"Vforward\":\"0.45 @ 15mA\"}","file_hash":null,"file_name":null,"file_url":null,"details_url":"http:\/\/dangercore.dev\/bom\/details\/1682-jcet-bat43ws","quote":{"stocked":1,"free":0,"setup_cost":0,"component_cost":{"100":0.065948275862069,"200":0.062650862068966,"500":0.059353448275862,"1000":0.056056034482759},"pins":2,"placement_cost":0.089655172413793,"overage":33},"free":0,"stocked":1}]}

LIST OF MANUFACTURERS

Sample Call
URL: /api/components/manufacturers?q=ch
Parameters
q Optional search keyword for manufacturer name


Response
array of manufacturers Array of manufacturers with attributes id, name, and slug

Sample Response (JSON)

[{"name":"AMS","slug":"ams"},{"name":"CJ","slug":"cj"},{"name":"Epson","slug":"epson"},{"name":"LC","slug":"lc"},{"name":"Richtek","slug":"richtek"},{"name":"SGMicro","slug":"sgmicro"},{"name":"Torex","slug":"torex"},{"name":"Unisonic (Taiwan)","slug":"unisonic-taiwan"}]

LIST OF TYPES

Sample Call
URL: /api/components/types?q=ch
Parameters
q Optional search keyword for component type name


Response
array of types Array of component types with attributes id, type, and slug

Sample Response (JSON)

[{"type":"crystal","slug":"crystal"},{"type":"crystal timekeeping","slug":"crystal-timekeeping"},{"type":"oscillator","slug":"oscillator"},{"type":"voltage regulator","slug":"voltage-regulator"}]

LIST OF PACKAGES

Sample Call
URL: /api/components/packages?q=2.0mm
Parameters
q Optional search keyword for package


Response
array of packages Array of packages with attribute package

Sample Response (JSON)

[{"package":"10X1P 2.0mm"},{"package":"11X1P 2.0mm"},{"package":"12X1P 2.0mm"},{"package":"13X1P 2.0mm"},{"package":"14X1P 2.0mm"},{"package":"15X1P 2.0mm"},{"package":"16X1P 2.0mm"},{"package":"2X1P 2.0mm"},{"package":"3X1P 2.0mm"},{"package":"4X1P 2.0mm"},{"package":"5X1P 2.0mm"},{"package":"6X1P 2.0mm"},{"package":"7X1P 2.0mm"},{"package":"8X1P 2.0mm"},{"package":"9X1P 2.0mm"}]

LIST OF COMPONENTS BY MANUFACTURER AND/OR TYPE

Sample Call
URL: /api/components/browse?manufacturer=richtek&type=voltage-regulator
Parameters (Optional)
manufacturer Manufacturer Slug
type Type Slug


Response
array of components Array of components with info and pricing

Sample Response (JSON)

[{"m_name":"Richtek","manufacturer_slug":"richtek","m_partnumber":"RT9193-18GB","m_partnumber_slug":"rt9193-18gb","m_datasheet":"RT9193-18GB.pdf","c_type":"voltage regulator","type_slug":"voltage-regulator","c_value":"1.8V 150mA w\/ENABLE","c_package":"SOT-23-5","c_package_slug":"sot-23-5","c_pins":"5","c_rohs":"1","c_attributes":"{\"Iout\":\"150mA\",\"Vin(max)\":\"6V\"}","file_hash":null,"file_name":null,"file_url":null,"details_url":null,"quote":null},{"m_name":"Richtek","manufacturer_slug":"richtek","m_partnumber":"RT9193-25GB","m_partnumber_slug":"rt9193-25gb","m_datasheet":"RT9193-25GB.pdf","c_type":"voltage regulator","type_slug":"voltage-regulator","c_value":"2.5V 150mA w\/ENABLE","c_package":"SOT-23-5","c_package_slug":"sot-23-5","c_pins":"5","c_rohs":"1","c_attributes":"{\"Iout\":\"150mA\",\"Vin(max)\":\"6V\"}","file_hash":null,"file_name":null,"file_url":null,"details_url":null,"quote":null},{"m_name":"Richtek","manufacturer_slug":"richtek","m_partnumber":"RT9193-33GB","m_partnumber_slug":"rt9193-33gb","m_datasheet":"RT9193-33GB.pdf","c_type":"voltage regulator","type_slug":"voltage-regulator","c_value":"3.3V 150mA w\/ENABLE","c_package":"SOT-23-5","c_package_slug":"sot-23-5","c_pins":"5","c_rohs":"1","c_attributes":"{\"Iout\":\"150mA\",\"Vin(max)\":\"6V\"}","file_hash":null,"file_name":null,"file_url":null,"details_url":null,"quote":null}]

COMPONENT DETAILS

Sample Call
URL: /api/components/details/35-sgmicro-sgm2019-adjyn5g
Parameters
{component_id}-{manufacturer_slug}-{manufacturer_part_number_slug} A slug composed of the component id, manufacturer slug, and manufacturer part number slug.


Response
component Component with info, pricing, and comments

Sample Response (JSON)

{"m_name":"SGMicro","manufacturer_slug":"sgmicro","m_partnumber":"SGM2019-ADJYN5G","m_partnumber_slug":"sgm2019-adjyn5g","m_datasheet":"SGM2019-ADJYN5G.pdf","c_type":"voltage regulator","type_slug":"voltage-regulator","c_value":"2.5-6V ADJUST 150mA w\/ENABLE","c_package":"SOT-23-5","c_package_slug":"sot-23-5","c_pins":"5","c_rohs":"1","c_attributes":"{\"Iout\":\"150mA\",\"Vin(max)\":\"6V\"}","file_hash":null,"file_name":null,"file_url":null,"details_url":null,"quote":{"stocked":1,"free":"0","setup_cost":0,"component_cost":{"100":0.17948275862069,"200":0.17050862068966,"500":0.16153448275862,"1000":0.15256034482759},"pins":"5","placement_cost":0.22413793103448,"overage":"33"},"comments":[{"comment_id":"15","user_name":"ian","comments":"eyrt","post_date":"2016-09-08 12:17:34"},{"comment_id":"16","user_name":"ian","comments":"tesy","post_date":"2016-09-08 12:23:12"}]}

LIST OF SUPPLIERS

Warning! Admin permission required.

Sample Call
URL: /api/components/suppliers?q=uy
Parameters
q Optional search keyword for supplier name


Response
array of suppliers Array of suppliers with attributes id, name, and website

Sample Response (JSON)

[{"supplier_id":"3","name":"hqbuy","website":null},{"supplier_id":"6","name":"ouyangweiye","website":null}]

LIST OF PLACEMENTS

Warning! Admin permission required.

Sample Call
URL: /api/components/placements?q=TO
Parameters
q Optional search keyword for placement name


Response
array of placements Array of placements with attributes code id and name

Sample Response (JSON)

[{"placement_code_id":"1","pc_name":"0402","pc_cost_buy":"0.200000","pc_cost_markup":"30","pc_cost_sell":null,"pc_cost_setup":null,"pc_weight":"0.00","pc_smd":"1"}]