Back to Aligni.com

GET /api/v2/:api_token/parttype
List parttypes.

Retrieve the list of all parttypes.

Examples

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

# response
<parttypes>
  <parttype>
    <id>47</id>
    <name>Capacitor</name>
    <attrition>5.0</attrition>
    <is_non_material>false</is_non_material>
    <part_next>3</part_next>
    <partnumber_key>PK-0</partnumber_key>
    <parent_id>46</parent_id>
    <parent>Important</parent>
    <parent_only>false</parent_only>
    <label_id>2</label_id>
    <label>Capacitor</label>
  </parttype>
  <parttype>
    ...
  </parttype>
</parttypes>

Params

Param name Description
api_token
required

Your API token.


Value: Must be a String

GET /api/v2/:api_token/parttype/:id
Show a parttype.

Retrieve one particular parttype by its id.

Examples

# request
curl -H 'Accept: application/xml' -H 'Content-Type: application/xml' \
https://demo.aligni.com/api/v2/oid3vLgynoy_Yl1gZkrgkLEq3J/parttype/47

# response
<?xml version="1.0" encoding="UTF-8"?>
<parttype>
  <id>47</id>
  <name>Capacitor</name>
  <attrition>5.0</attrition>
  <is_non_material>false</is_non_material>
  <part_next>3</part_next>
  <partnumber_key>PK-0</partnumber_key>
  <parent_id>46</parent_id>
  <parent>Important</parent>
  <parent_only>false</parent_only>
  <label_id>2</label_id>
  <label>Capacitor</label>
</parttype>

Params

Param name Description
api_token
required

Your API token.


Value: Must be a String
id
required

Value: Must be a number.

POST /api/v2/:api_token/parttype
Create a new parttype.

Also see show action for detailed XML parttype response example.

Create a new parttype.

Examples

# request
curl -X POST -H 'Accept: application/xml' -H 'Content-Type: application/xml' -d "
<parttype>
  <name>Condenser</name>
  <attrition>6.0</attrition>
  <is_non_material>false</is_non_material>
</parttype>" \
https://demo.aligni.com/api/v2/oid3vLgynoy_Yl1gZkrgkLEq3J/parttype

# response (for detailed parttype XML see show action)
<parttype>
  ...
</parttype>

Params

Param name Description
api_token
required

Your API token.


Value: Must be a String

PUT /api/v2/:api_token/parttype/:id
Update a parttype.

Also see show action for detailed XML parttype response example.

Updates a parttype record.

Examples

# request
curl -X PUT -H 'Accept: application/xml' -H 'Content-Type: application/xml' -d "
<parttype>
  <name>Condenser #2</name>
  <attrition>5.5</attrition>
</parttype>" \
https://demo.aligni.com/api/v2/oid3vLgynoy_Yl1gZkrgkLEq3J/parttype/63

# response (for detailed parttype XML see show action)
<parttype>
  ...
</parttype>

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/parttype/:id
Delete a parttype.

Delete a parttype 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/parttype/63

# no response

Params

Param name Description
api_token
required

Your API token.


Value: Must be a String
id
required

Value: Must be a number.