Back to Aligni.com

Create a Subpart for an assembly.
Note: items may only be added to a draft assembly revision.

Examples

# request when creating a subpart from its partnumber.
curl -X POST -H 'Accept: application/xml' -H 'Content-Type: application/xml' -d "
<subpart>
  <part_id>754</part_id>
  <part_revision_id>209</part_revision_id>
  <partnumber>000252</partnumber>
  <quantity>69</quantity>
  <designator>C22, C52</designator>
  <comment>An important piece.</comment>
  <no_load>false</no_load>
  <build_sequence>123</build_sequence>
</subpart>" \
https://demo.aligni.com/api/v2/oid3vLgynoy_Yl1gZkrgkLEq3J/subpart

# request when creating a subpart from its manufacturer_pn
# and subpart_part_revision_id.
curl -X POST -H 'Accept: application/xml' -H 'Content-Type: application/xml' -d "
<subpart>
  <part_id>754</part_id>
  <part_revision_id>209</part_revision_id>
  <manufacturer_pn>H52Z0805E601R-10</manufacturer_pn>
  <quantity>69</quantity>
  <subpart_part_revision_id>247</subpart_part_revision_id>
  <designator>C22, C52</designator>
  <comment>An important piece.</comment>
  <no_load>false</no_load>
  <build_sequence>123</build_sequence>
</subpart>" \
https://demo.aligni.com/api/v2/oid3vLgynoy_Yl1gZkrgkLEq3J/subpart

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

Params

Param name Description
api_token
required

Your API token.


Value: Must be a String
part_id
required

ID of the assembly's part record.


Value: Must be a Integer
part_revision_id
required

ID of the assembly's revision to which the item will be added.
Note: items may only be added to a draft assembly revision.


Value: Must be a Integer
partnumber
required

Either partnumber or manufacturer_pn must be specified.


Value: Must be a String
manufacturer_pn
required

Either partnumber or manufacturer_pn must be specified.


Value: Must be a String
subpart_part_revision_id
optional

Use this to specify a specific revision of the child item. The default (and recommended) behavior is to apply the active revision.


Value: Must be a Integer
quantity
required

The item's quantity on the subassembly. The unit of measure is always the item's UoM.
Quantity can be a decimal value when the item's unit of measure allows fractional numbers.


Value: Must be a number.
designator
optional

Reference designator string for the item.


Value: Must be a String
comment
optional

Comment string for the item.


Value: Must be a String
no_load
optional

Defaults to false if not specified.


Value: Must be one of: <code>true</code>, <code>false</code>.
build_sequence
optional

Build sequence number for the item.


Value: Must be a Integer