Table of Contents |
---|
Inventory API Query
<Rockstar description here>
How to get the Bearer Token
...
Set the bearer token from the collection settings
Create a POST request from the request URL above
Set the body as GraphQL and formulate a query
Perform a request
...
Visit postman documentation to learn how to write test cases
Testing Graphql via browser
...
item_variation_suffix
unitPrice
}
}
}
...
CREATE (POST) requests
Create Inventory :
VARIABLES:
...
if is_default is not specified for the pricing, it is automatically set to true
if no supplier and SKU is provided for the pricing, an SKU is automatically generated for the pricing. This is usually the case for Inventories under service categories.
UPDATE ( POST ) Requests
Update Inventory
VARIABLES:
...
METHOD:
updateInventory
...
VARIABLES:
...
METHOD:
savePricing
...
DELETE REQUEST
DELETE INVENTORY
VARIABLES :
id : required, inventory id to be deleted
METHOD:
deleteInventoryByPk
...
METHOD:
deleteInventoryByPk
...
SEARCH (POST) REQUESTÂ
Search Inventory
METHOD:
Inventories
...
Code Block |
---|
{ "data": { "InventoryPricings": [ { "id": "24399", "inventory_id": "29505", "supplier_id": "293", "code": "ET Solar ET-M572190", "unit_price": 2, "markup_value": 12, "markup_is_percentage": "1", "unit_of_measure_string": "/ kW Solar PV", "unit_of_measure": "2", "item_variation_suffix": "", "spare_qty": 0, "quantity": 0 }, { "id": "15459", "inventory_id": "29505", "supplier_id": null, "code": "ET-M572190", "unit_price": 200, "markup_value": 12, "markup_is_percentage": "1", "unit_of_measure_string": "/ item", "unit_of_measure": "0", "item_variation_suffix": "", "spare_qty": 0, "quantity": 0 } ] } } |
IMPORTANT DATA :
INVENTORY MODEL:
CATEGORY VALUESÂ
1 Mounting
2 Isolators - DC
...