API:Parts

From Aligni Wiki

Jump to: navigation, search

Contents

List

Command: GET /part

Description: Retrieve the list of all parts.

Request/Response:

<parts>
  <part>
    ...
  </part>
  <part>
    ...
  </part>
</parts>


Show

Command: GET /part/#{part_id}

Description: Retrieve one particular part by its id.

Request/Response:

<part>
  ...
</part>


Create

Command: POST /part

Description: Create a new part.

Request/Response:

<part>
  <manufacturer_pn>C0603C104K4RACTU</manufacturer_pn>
  <manufacturer_id>147</manufacturer_id>
  <parttype_id>47</parttype_id>
  <unit_id>2</unit_id>
  <comment>SM-0603, 10%, 16v, X7R</comment>
  <description>Ceramic capacitor</description>
  <value_text>0.1 u</value_text>
  <rohs>1</rohs>
  <committed>true</committed>
  <active>true</active>
  <inventory_price>0.009</inventory_price>
</part>
<part>
  ...
</part>


Update

Command: PUT /part/#{part_id}

Description: Updates a part record.

Request/Response:

<part>
  <comment>SM-0603, 10%, 16v, X7R</comment>
  <description>Ceramic capacitor</description>
</part>
<part>
  ...
</part>


Delete

Command: DELETE /part/#{part_id}

Description: Delete a part by its id.

Request/Response: None


Sample Record

<part>
  <id>728</id>
  <partnumber>000019</partnumber>
  <manufacturer_pn>C0603C104K4RACTU</manufacturer_pn>
  <manufacturer_id>147</manufacturer_id>
  <parttype_id>47</parttype_id>
  <comment>SM-0603, 10%, 16v, X7R</comment>
  <description>Ceramic capacitor</description>
  <value>1.0e-07</value>
  <value_text>0.1 u</value_text>
  <allow_fractional>false</allow_fractional>
  <rohs>1</rohs>
  <committed>true</committed>
  <active>true</active>
  <created_on>Wed Jan 25 04:11:47 UTC 2006</created_on>
  <inventory_price>0.009</inventory_price>

  <quotes>...</quotes>
  <vendor_part_numbers>...</vendor_part_numbers>
  <alternate_parts>...</alternate_parts>
  <inventory>...</inventory>
  <partlist_parts>...</partlist_parts>
</part>
Views
Personal tools