Discussions

Ask a Question
Back to All

Parameter 'item_is_inventoried' in Materials has differing data type

The parameter 'item_is_inventoried' in Materials API is integer when POSTing,

{
"active": 1,
"item_is_inventoried": 0
}

but is returned as string from GET e.g.

{
"uuid": "09b06ae8-bcf0-4a93-97a9-200eec12234b",
"name": "Name - Description",
"price": 150,
"active": 1,
"barcode": "",
"item_number": "Item Code",
"cost": 100,
"quantity_in_stock": 0,
"price_includes_taxes": 0,
"item_is_inventoried": "0",
"edit_date": "2023-06-23 15:52:12",
"tax_rate_uuid": "3c861989-4b4e-42fe-afe7-200ee61cd39b",
"item_description": "Name - Description",
"use_description_for_invoicing": 0
}

This will create a clash with data types in API users class definitions. I suggest this is made consistent and integer would be the correct option as it follows suit with all other API boolean fields.