{
"request" : {
"pageIndex" :1 ,
"pageSize" : 10
}
}
query getInventories ( $request : GetInventoriesRequestInput ) {
inventories ( request : $request ) {
totalRecords ,
inventories {
inventoryId ,
location ,
name ,
products {
productId,
code,
quantity,
canPurchase
}
}
}
}
Get Products from Catalog
{
"request" : {
"pageIndex" :1 ,
"pageSize" : 100
}
}
query getProductsInCatalog ( $request : ProductCatalogApi_GetProductsRequest ! ) {
ProductCatalogApi_GetProducts ( request : $request ) {
totalOfProducts ,
products {
productId,
name,
code,
totalAvailability,
inventories {
inventoryId,
name,
location,
quantity,
canPurchase
}
}
}
}
Create Product in Catalog
{
"request" : {
"productName" : " New Product - 4" ,
"productCode" : " N-PRD-4"
}
}
mutation createProductInCatalog ( $request : ProductCatalogApi_CreateProductRequest ! ) {
ProductCatalogApi_CreateProduct ( request :$request ) {
productId ,
name ,
code
}
}
{
"request" : {
"productId" : " b1bdfa34-3fa2-4314-89be-52b671039c47" ,
"inventoryId" : " 7aa9115d-00d9-4215-98fa-cbd9aceb0744" ,
"quantity" : 5 ,
"canPurchase" : true
}
}
mutation addOrUpdateProductInventory ( $request : AddOrdUpdateProductInventoryRequestInput ) {
addOrUpdateProductInventory ( request : $request ) {
inventoryId ,
productId ,
code ,
inventoryName ,
quantity ,
canPurchase
}
}