Back to Aligni.com

POST /api/v2/:api_token/subpart
Add a Subpart.

Add a Subpart. Required fields are quantity and manufacturer_pn or partnumber (only one is required).

Examples

# request
curl -X POST -H 'Accept: application/xml' -H 'Content-Type: application/xml' -d "
<subpart>
  <part_id>754</part_id>
  <part_revision_id>210</part_revision_id>
  <subpart_part_revision_id>378</subpart_part_revision_id>
  <manufacturer_pn>C0603C104K4RACTU</manufacturer_pn>
  <partnumber>000238</partnumber>
  <quantity>69</quantity>
  <build_sequence>123</build_sequence>
  <designator>C22, C52</designator>
  <no_load>0</no_load>
  <comment>An important piece.</comment>
</subpart>" \
https://demo.aligni.com/api/v2/oid3vLgynoy_Yl1gZkrgkLEq3J/subpart

# response
<subpart>
  <id>351</id>
  <subpart_id>773</subpart_id>
  <quantity>69</quantity>
  <build_sequence>123</build_sequence>
  <designator>C22, C52</designator>
  <comment>An important piece.</comment>
  <no_load>false</no_load>
</subpart>

Params

Param name Description
api_token
required

Your API token.


Value: Must be a String

PUT /api/v2/:api_token/subpart/:id
Update a Subpart.

Updates a Subpart. If manufacturer_pn or part_id is specified it will also change related part for this subpart.

Examples

# request
curl -X PUT -H 'Accept: application/xml' -H 'Content-Type: application/xml' -d "
<subpart>
  <manufacturer_pn>C0603C104K4RACTU</manufacturer_pn>
  <part_id>574</part_id>
  <quantity>15</quantity>
  <build_sequence>123</build_sequence>
  <designator>C22, C52</designator>
  <no_load>0</no_load>
  <comment>The most important piece.</comment>
</subpart>" \
https://demo.aligni.com/api/v2/oid3vLgynoy_Yl1gZkrgkLEq3J/subpart/178

# response
<subpart>
  <id>178</id>
  <subpart_id>574</subpart_id>
  <quantity>15</quantity>
  <build_sequence>123</build_sequence>
  <designator>C22, C52</designator>
  <comment>The most important piece.</comment>
  <no_load>false</no_load>
</subpart>

Params

Param name Description
api_token
required

Your API token.


Value: Must be a String
id
required

Value: Must be a number.

DELETE /api/v2/:api_token/subpart/:id
Delete a Subpart.

Delete a Subpart by its id.

Examples

# request
curl -X DELETE -H 'Accept: application/xml' -H 'Content-Type: application/xml' \
https://demo.aligni.com/api/v2/oid3vLgynoy_Yl1gZkrgkLEq3J/subpart/178

# no response

Params

Param name Description
api_token
required

Your API token.


Value: Must be a String
id
required

Value: Must be a number.