- API Reference
- Access Points
- API Calls
- Batches
- Bins
- Carriers
- Clients
- Cost Centers
- Images (Supplements)
- Kits
- Kit Lines
- Locations
- Location Contents
- Materials
- Material Codes
- Material Properties
- Orders
- Order Lines
- Reports
- Report Rows
- Settings
- Shelves
- Snapshots
- Stations
- Storage Rules
- Storage Units
- Transactions
- Users
- Warehouses
- Work Order Lines
- Zones
Material Codes
Attributes
-
name
string
The alternate lookup code.
- id uuid
-
materialId
uuid
The ID of the material.
-
packSize
integer
Deprecated.
Endpoints
List Material Codes
get /api/material_codesGet the material codes from the PPG database and return a JSON response.
Arguments
-
name
string
Only return material codes that have the given name.
-
materialId
uuid
Return codes for the material with this ID.
-
packSize
integer
Deprecated.
-
limit
integer
A limit on the number of objects to be returned. Limit can range between 1 and 1000.
Default value: 250
-
page
integer
Page-numbering is based on the value of the "limit" argument. If limit=20, then page=0 will display the hits from 1 to 20. (Page numbers are zero-based.) Using page without a limit returns all items.
-
orderBy
string, array
Order the response by the selected field. Multiple values can be passed, separated by a comma.
-
countOnly
boolean
When "true", will only return a count of the amount of items in the query.
Default value: false
{ "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" } ] }
Create Material Code
post /api/material_codesAdd a new material code to a material in the PPG database and return a response.
Body Parameters
-
name
string
REQUIRED
The material code
-
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" } ] }
Show Material Code
get /api/material_codes/[id]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 Material Code
put /api/material_codes/[id]Update a material code by ID and get a response.
Arguments
-
name
string
The material code
-
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 Material Code
delete /api/material_codes/[id]Delete a material code from the PPG database.