Retrieve a list of products
OData
P4W utilizes OData when querying database through API calls. Following example retrieves first 20 products, including assigned clients if applicable.
GET
https://{tenant_name}.p4warehouse.com/odata/Product
Retrieves a list of first 20 products and product assigned clients when possible.
Query Parameters
Name
Type
Description
$expand*
String
Client base
$orderby*
String
SKU
$top*
Integer
Number of products to retrieve
$count*
Boolean
Whether to displays total number of products available
Headers
Name
Type
Description
ApiKey*
String
System API key
{
"@odata.context": "https://doc1.p4warehouse.com/odata/$metadata#Product(Client(Id,Name))",
"@odata.count": 21,
"value": [
{
"Sku": "1234",
"Upc": null,
"BarcodeValue": null,
"BarcodeType": null,
"Category": null,
"Description": null,
"SubstituteGroup": null,
"HtsCode": null,
"CountryOfOrigin": null,
"ReferenceNumber": null,
"Reference1": null,
"Reference2": null,
"Reference3": null,
"ClientId": null,
"BomWorkflowId": null,
"Height": null,
"Width": null,
"Length": null,
"DimsLengthUnitOfMeasure": "M",
"Weight": null,
"FreightClass": null,
"IsHazMat": false,
"Nmfc": null,
"CommodityDescription": null,
"DimsWeightUnitOfMeasure": "Kg",
"Cube": null,
"IsBillOfMaterial": false,
"IsLotControlled": false,
"LotPattern": null,
"IsSerialControlled": false,
"SerialPattern": null,
"IsExpiryControlled": false,
"IsDecimalControlled": false,
"IsPacksizeControlled": false,
"IsDiscontinued": false,
"UnitOfMeasure": null,
"CartonizationBehaviour": "Inherit",
"Info1": null,
"Info2": null,
"Info3": null,
"Info4": null,
"Info5": null,
"Info6": null,
"Info7": null,
"Info8": null,
"Info9": null,
"Info10": null,
"Id": "935bfda9-e615-4966-8606-ac037dfcc3fb",
"DateCreated": "2023-08-15T18:36:06.3294549Z",
"Client": null
},
{
"Sku": "PRODUCT_A",
"Upc": "1153453189306",
"BarcodeValue": "1153453189306",
"BarcodeType": "Code128",
"Category": null,
...
Use OData syntax (https://www.odata.org/documentation/) to personalize queries through API calls.
Example of OData query
https://{tenant_name}.p4warehouse.com/odata/Product
$expand=Client($select=Id,Name)&$orderby=Sku&$top=20&$count=true