- Resource Central
- Material Codes
Material Codes
Alternate lookup codes/part numbers for materials. Material codes must be unique to other codes and material names.
Attributes
-
name
string
The alternate lookup code. Material codes must be unique to other codes and material names.
-
id
uuid
The ID of the code.
-
materialId
uuid
The ID of the material.
-
packSize
integer
Deprecated.
Endpoints
Get a list of material codes from the PPG database. View the guide on adding filters to List API calls.
Body Parameters
-
name
string
Only return material codes that have the given name.
-
materialId
uuid
Return codes for the material with this ID.
-
packSize
integer
Deprecated.
-
countOnly
boolean
When "true", will only return a count of the amount of items in the query.
Default value:
false -
limit
integer
A limit on the number of objects to be returned.
Default value:
1000 -
page
integer
Page numbering is zero-based and uses the value of the "limit" argument. (For example, if limit=20, then page=0 will display the hits from 1 to 20.)
-
orderBy
string, array
Order the response by the selected field. Multiple values can be passed, separated by a comma.
{ "material_codes": [ { "id": "FBB20FCE-6CBC-48EB-8879-914865BA116A", "packSize": null, "name": "SampleCode", "materialId": "EBD286D1-4D5A-41C3-B24A-E62FC1008E57" }, { "id": "DA38F9D1-5144-4C20-AF12-735E88A7332E", "packSize": null, "name": "SampleCode2", "materialId": "EBD286D1-4D5A-41C3-B24A-E62FC1008E57" } ] }
Add a new material code to a material in the PPG database and return a response. Material codes must be unique to other codes and material names.
Body Parameters
-
name
string
REQUIRED
The material code. Must be unique to other codes and material names.
-
materialId
uuid
REQUIRED
The ID of the material this code belongs to.
-
packSize
integer
Deprecated.
-d '{ "materialId": "EBD286D1-4D5A-41C3-B24A-E62FC1008E57", "name": "SampleCode" }'
{ "material_code": [ { "id": "FBB20FCE-6CBC-48EB-8879-914865BA116A", "packSize": null, "name": "SampleCode", "materialId": "EBD286D1-4D5A-41C3-B24A-E62FC1008E57" } ] }
Get a specific material code by its ID from the PPG database and return a JSON response. The order will be pulled from the Material table.
Update a material code by ID and get a response.
Body Parameters
-
name
string
The material code. Must be unique to other codes and material names.
-
packSize
integer
Deprecated
-d '{ "name": "UpdatedCode" }'
{ "material_code": [ { "id": "FBB20FCE-6CBC-48EB-8879-914865BA116A", "packSize": null, "name": "UpdatedCode", "materialId": "EBD286D1-4D5A-41C3-B24A-E62FC1008E57" } ] }
Delete a material code from the PPG database.