Errors

Product API

Product API Errors

Here are the most common errors you will run into while using the Product API and how to resolve them. This list is not exhaustive of all possible errors.

ErrorsError DescriptionRemedy
BLANK_BARCODE_VALUEBarcode value is blankProduct_barcode field cannot be null. If you are experiencing this error, leave the bracket empty to create a product with no product barcodes.
BLANK_NAME_VALUEName value cannot be blankWhen creating a product the name field needs to have value in order to create a product.
DUPLICATE_LAB_RESULT_TYPEDuplicate [LAB_RESULT_TYPE] are not accepted.Products cannot have duplicates of the same lab results. Change the duplicate lab result to a unique value and the product will be generated.
FAILED_TO_BUILD_RESPONSEAn unknown exception occurred while processing the request. Contact: [email protected]If this error is encountered please report it to the API support team ([email protected]) in order to get this error investigated.
INVALID_CATEGORY_TYPECategory type cannot be blankAdjust the query parameter to 1 of 13 approved category_type options: BEVERAGE, PLANT, PREROLL, MERCH, NON-INV, TINCTURE, MISC, TOPICAL, CARTRIDGE, FLOWER, PILL, EXTRACT, or EDIBLE.
INVALID_PRICE_FIELD1. When price_type is FLAT, price_sell is a required field and tier_name needs to be null.

2. When price_type is TIER, price_sell needs to be null and tier_name is a required field.

3. price_sell field should have a positive quantitative value. It can be a number or decimal.

4. [Price_type] is not correct. Possible values are TIER or FLAT.
1. When creating a product with a price_type FLAT, price_sell must be included in the call and the tier_name needs to be set to null in order to get a successful response.

2. When creating a product with a price_type TIER, price_sell must be null and a tier_name needs to be provided in order to get a successful response.

3. In order to get a successful response the price_sell must be set to a value greater than zero.

4. Price_type must be either FLAT or TIER in order to get a successful response.
LAB_RESULTS_RANGE1. Lab result [Lab Result Used] defined wrong range. [Minimum_value field] is set greater than the [Maximum_value field]. Please correct and try again.

2. Lab result [Lab Result Used] has undefined range. [Minimum_Value field] is expected when [Maximum_Value field] is defined. Please correct and try again.

3. Lab result [Lab Result Used] is incorrect. [Minimum_Value field] and [Maximum_Value field] are expected.
1. The minimum_value field cannot be greater than the maximum_value field in order to get a successful response.

2. One of the value ranges in the lab_results array is empty. Populate the empty field to get a successful response.

3. When result_type is populated in the lab_result array the minimum_value and maximum_value need to be provided in order to get a successful response.
NULL_OR_INCORRECT_INPUT1. Product configurable fields are missing.

2. AMOUNT cannot be negative.

3. TOTAL_MG_CBD cannot be negative.

4. TOTAL_MG_THC cannot be negative.

5 [categoryType] type must have a subtype.
1. Required configurable fields are missing from your POST request. The error response will provide details on what is required to be able to get a successful response.

2. Adjust the amount field to a positive value.

3. Adjust total_mg_cbd to a positive value.

4. Adjust total_mg_thc to a positive value.

5. category_type must have a subtype listed when creating a product.
PRODUCT_FORMAT_ERROR-If this error is encountered please report it to the API support team ([email protected]) in order to get this error investigated.
INDEX_PAGE_MUST_BE_GREATER_THAN_ZEROThe index page can never be negative or 0. It should be a positive value. Please try again.The page used in the call needs to be greater than 0 in order to get a successful response.
INTERNAL_ERROR-If this error is encountered please report it to the API support team ([email protected]) in order to get this error investigated.
INVALID_ABOVE_THRESHOLD_PARAMETER[Value from Query Parameter] is not a valid value for above_threshold parameter. Possible values are: true, false, 1, 0The approved values for the above_threshold query parameters are true, false, 1, and 0. Use one of these values to get a successful response.
INVALID_ACTIVE_PARAMETER[Value for active Query Parameter] is not a valid value for the active parameter. Possible values are: true, false, 1, 0, allThe accepted values for the Active query parameter are true, false, 1, 0, or all. This query parameter needs to be updated in order to get a successful response.
INVALID_LAST_UPDATED_AT[Last_Updated_At value] does not match yyyy-MM-dd'T'HH:mm:ss.SSSXXX formatThe accepted format for the Last_Updated_At value is yyyy-MM-dd'T'HH:mm:ss.SSSXXX . The format needs to be updated in order to get a successful response.
INVALID_OFFSETOffset must be greater than zero.Offset defined in the request needs to be greater than 0.
INVALID_PAGINATION_PARAMETERSRequest can be processed by either using page and pagesize OR limit and offset. Both cannot be entered.Use pagesize OR limit and offset when you encounter this error.
INVALID_SEARCH_PARAMETER1. Cannot fetch more than 50 products by ID per request.

2. sellable_quantity_in_location parameter cannot be empty.

3. Invalid sellable_quantity_in_type, possible values are: ADULT, MEDICAL.
1. Decrease the number of product IDs you are searching for as query parameters. The GET/ List of product IDs can only search for 50 product IDs at a time.

2. When using the sellable_quantity_in_location a valid location must be passed to get products in your response

3. Set the sellable_quantity_in_type parameter to either ADULT or MEDICAL.
INVALID_TYPE[value for category_type used] product type not found.update the parameter used for the category_type to one of the available product types in Treez.

category_type options: BEVERAGE, PLANT, PREROLL, MERCH, NON-INV, TINCTURE, MISC, TOPICAL, CARTRIDGE, FLOWER, PILL, EXTRACT, or EDIBLE.
LIMIT_MUST_BE_GREATER_THAN_ZEROLimit must be greater than zero.Limit set in the endpoint must be greater than 0.
PAGESIZE_MUST_BE_GREATER_THAN_ZEROPage size can never be negative or 0. Please try again.The page used in the call needs to be greater than 0 in order to get a successful response.
PAGE_SIZE_IS_TOO_LARGEPlease further refine the query to decrease the page size. Current value: [Page_Size_Used], maximum value : 200Reduce page size to below the maximum value of 200.
RESPONSE_LIMIT_EXCEEDSThe response limit requested is [Limit Used] which exceeds the maximum response limit. Do not exceed 200.The limit that is being used in the call needs to be dropped to the maximum of 200.
PRODUCT_NOT_FOUND1. Product id value is empty or null.

2. Cannot find product by id [Product ID used]
1. A valid product_ID is required to get a successful response.

2. The product_ID used with this endpoint cannot be found and a valid product ID must be used.
FILE_SIZE_EXCEEDEDThe file to be uploaded is too big. The maximum size allowed is 5MB.Use a file smaller than or equal to 5MB.
INCORRECT_FILE_EXTENSIONIncorrect [file extension] used. File extensions accepted are: gif, .jpg, .jpeg, .pngUse one of the accepted file extensions: gif, .jpg, .jpeg, .png
INTERNAL_ERROR1. Error uploading image

2. Unable to detect file type.

3. Unable to read configured applicable file types.
If these errors is encountered please report it to the API support team ([email protected]) in order to get this error investigated.
NULL_OR_INCORRECT_INPUT1. File cannot be empty

2. productId cannot be null or empty
1. Upload an image file.

2. Enter a valid product_Id in the call
USER_NOT_FOUNDUnable to detect the user who made the API request.If this error is encountered please report it to the API support team ([email protected]) in order to get this error investigated.