Part type in the API Reference, or open the GraphiQL editor in ION from Developer Platform > GraphQL.
Query parts
The queries below list parts by a filter or get a specific part. List parts with a filter:"isLatestRevision": { "eq": true } to filters.
Get a single part by ID:
Create a part
The part number and revision must be unique. If you supply no revision in the mutation, the part defaults to revision A. Once created, you cannot update the revision of a part. Instead, use thecreatePartRevision mutation to iterate a part’s revision.
Create the part with this mutation:
Update a part
You can update the tracking type to eitherserial or lot only if all existing inventory objects related to the part conform to the new tracking type.
Update the part with this mutation:
Create a part revision
You can generate a revision from any part. For example, if your part “ion-13” has existing revisions A and B, you can generate a third revision C from either revision A or B. All information in the new revision is copied from the old revision unless you explicitly override it in the mutation input. The new revision is the next valid alphabetic character from the part’s latest revision. If the part’s latest revision is C, the new revision is D. If the part’s latest revision is Z, the new revision is AA. Create a revision with this mutation:Delete a part
Deleting a part cascades to delete the mBOM and mBOM substitutes associated with the part. You cannot delete a part that has existing inventory or that was used within a run. Delete the part with this mutation:Custom part revision scheme
ION lets you define custom schemes for part revisioning. You define these schemes in your organization’s settings. The mutation below creates a new scheme. You first need the ID and etag of the organization before you can update its settings. Four additional variables define a part revision scheme:- name (string): The name of the new revision scheme.
- default (boolean): If
true, all newly created parts inherit this revision scheme. - allowOverflow (boolean): Defines whether ION raises an error when the revision scheme reaches its max iteration, or overflows to the next available value.
- format (array of strings): Defines how the values of a revision scheme appear. The string values in the array can be
NUMERIC,ALPHABETICAL, or single-character-length constants. The format below defines part revisions like00-1or95-7.
Update a part revision scheme
Once a part revision scheme exists in your organization’s settings, you can update it. The only fields you can update on a part revision scheme areallowOverflow and default.
Update the revision scheme with this mutation:
Convert the revision scheme of an existing part
Two strategies change the revision scheme of an existing part. Both set therevisionScheme for a part in either the updatePart or createPartRevision mutation above. Set revisionScheme to the name of one of the schemes in your organization’s settings.
- Setting
revisionSchemein theupdatePartmutation casts the part’s revision. For example, if a part currently has revisionDand you update that part to use the revisionScheme “new scheme” created above, the revision is set to00-4. - Setting
revisionSchemein thecreatePartRevisionmutation resets the part’s revision, starting it over from the initial revision of the new scheme. If a part has revisionDand you update the part’srevisionSchemein thecreatePartRevisionmutation, it is set to00-1.