Result messages for INVALID_PARAMETER

This topic provides the possible result messages for the result code INVALID_PARAMETER in the responses of the syncStore API, along with additional information about how to resolve them.

Overview

For the result code INVALID_PARAMETER in the responses of the syncStore API, the D-store Platform server provides detailed result messages to help you locate and resolve errors faster.

Note: For more possible result codes in the syncStore API, see Result codes.

Locating errors

This section describes how the result messages for the result code INVALID_PARAMETER are composed of. By understanding the message composition, you can locate where an error is coming from faster.

See the following sample response, which assumes that the specified status for a category does not follow the API specification:

copy
{
  "result": {
    "resultCode": "INVALID_PARAMETER",
    "resultMessage": "Store(id:202210storeid22).menu[0](id:20221012111511000310000000439401).category[0](id:category_id_01):The category status is invalid. The invalid status is 1ACTIVE.",
    "resultStatus": "F"
  }
}

As shown in the value returned to the resultMessage parameter:

  • The error source Store(id:202210storeid22).menu[0](id:20221012111511000310000000439401).category[0](id:category_id_01) specifies the error comes from the category (category_id_01) in the menu (20221012111511000310000000439401) of the store (202210storeid22).
    • menu[0] refers to the first element of the menus array.
    • category[0] refers to the first element of the categories array.

Note: For an array, a postfix expression followed by an expression in brackets ([]) specifies an element of an array. The expression within the brackets is referred to as a subscript. The first element of an array has the subscript zero, and the second element has the subscript one, and so on.

  • The error message The category status is invalidspecifies the reason why the error occurs: The value specified in the status parameter for the category (category_id_01) is invalid. For more possible error messages, see Resolving errors.
  • The error message The invalid status is 1ACTIVE specifies the error in detail: The error value is 1ACTIVE. As defined in the syncStore API documentation, the valid values for the categories.status parameter are ACTIVE and INACTIVE.

Resolving errors

The following sections classify the error messages for INVALID_PARAMETER into seven types and provide the solutions to resolve them:

Required parameters not specified

Reason: The required parameters are not specified with values.

Solution: Make sure your request includes all required parameters. Refer to the syncStore API documentation to learn the required parameters in different business scenarios.

The following table provides the possible error messages:

Error message

The store ID is required.

The store name is required.

The store type is required.

The store location is required.

The contacts parameter is required.

The store serviceSchedules parameter is required.

The area ID is required when the store type is HAWKER.

The address parameter is required.

Either latitude and longitude or postCode must be provided.

The phoneNo parameter is required.

The imageUrl parameter is required.

The landingUrl parameter is required.

The ruleData parameter is required.

The scene parameter is required.

The discounts.discountType parameter is required.

The discounts.discountValue parameter is required.

The supportDays parameter for DELIVERY_SCHEDULE is required.

The supportDays parameter for PICKUP_SCHEDULE is required.

The supportDays parameter for DINE_IN_SCHEDULE is required.

The serviceType parameter for DINE_IN_ORDER is required.

The isTableNoRequired parameter for DINE_IN_ORDER is required.

The weekDays parameter is required.

The timeSlot parameter is required.

The status parameter for SKU_STATUS_RULE is required.

The contents.type parameter is required.

The contents.scene parameter is required.

The contents.value parameter is required.

The value parameter is required.

The startTime parameter is required.

The endTime parameter is required.

The from parameter is required.

The to parameter is required.

The currency parameter is required.

The value parameter is required.

The scheduleType parameter is required.

The schedules parameter is required.

The startTime parameter is required when the endTime parameter is provided.

The endTime parameter is required when the startTime parameter is provided.

The endTime parameter is required when the value of serviceStatus is OFF.

The startTime parameter is required when the value of serviceStatus is OFF.

The menu ID is required.

The menu name is required.

The menu type is required.

The minPrepareMinutes parameter is required when the menu type is DELIVERY.

The category name is required.

The category ID is required.

The item ID is required.

The item status is required.

The item name is required.

The saleType parameter is required.

The max parameter is required.

The min parameter is required.

The max parameter cannot be less than the min parameter.

The originAmount parameter is required.

The saleAmount parameter is required.

The takeAwayFee parameter is required.

The modifier group ID is required.

The modifier group name is required.

The modifierGroup.quantityRule parameter is required.

The modifierGroup.childItems parameter is required.

The sku.Property.Pairs parameter is required.

The SKU ID is required.

The skus is required when the skuPropertyGroups is provided.

The skuPropertyGroups is required when the skus is provided.

The skuGroupId parameter is required.

The propertyId parameter is required.

Parameter length limit

Reason: The value you specify exceeds the maximum length allowed.

Solution: Refer to the syncStore API documentation to learn the maximum length for parameter values.

The following table provides the possible error messages:

Error message

The store ID is too long.

The postcode value is too long.

The phoneNo value is too long.

The imageUrl value is too long.

The landingUrl value is too long.

The recommendItemId value is too long.

The contents.value parameter is too long.

The value in the value Map is too long.

The menu ID is too long.

The category ID is too long.

The item ID is too long.

The modifier group ID is too long.

The SKU ID is too long.

Invalid parameter values

Enumerated types

Reason: The value you specify does not follow the specification defined in the syncStore API.

Solution: Refer to the syncStore API documentation for valid values for parameters of enumerated types.

The following table provides the possible error messages:

Error message

The store type is invalid.

The store status is invalid.

The inQueueScopes value is invalid.

The reservationScopes value is invalid.

The tags value is invalid.

The scene value is invalid.

The discounts.discountType value is invalid.

The serviceType value for DINE_IN_ORDER is invalid.

The weekDays parameter is invalid.

The status value for SKU_STATUS_RULE is invalid.

The contents.scene value is invalid.

The contents.type value is invalid.

The scheduleType value is invalid.

The key for DAILY in the schedules Map is invalid.

The key for WEEKLY in the schedules Map is invalid.

The menu type is invalid.

The menu status is invalid.

The category status is invalid.

The item status is invalid.

The saleType value is invalid.

Other types

Reason: The value you specified is invalid.

The following table provides the error possible messages:

Error message

The latitude value is invalid.

The longitude value is invalid.

The phoneNo value is invalid.

The MCC code is invalid.

The imageUrl value is invalid.

The landingUrl value is invalid.

The ruleData value for DELIVERY_DISTANCE is invalid.

The fee value for DELIVERY_DISTANCE is invalid.

The minimumOrderAmount value for DELIVERY_DISTANCE is invalid.

The discounts.orderThresholdAmount value is invalid.

The discountValue value for REDUCE is invalid.

The discountValue value for PERCENTAGE is invalid.

The ruleData value for DELIVERY_SCHEDULE is invalid.

The ruleData value for PICKUP_SCHEDULE is invalid.

The array in ruleData for PICKUP_SCHEDULE is invalid.

The ruleData value for PICKUP_RULE is invalid.

The minimumOrderAmount value for PICKUP_RULE is invalid.

The ruleData value for DINE_IN_SCHEDULE is invalid.

The ruleData value for PRICE_SCHEDULE is invalid.

The ruleData value for ITEM_STATUS_RULE is invalid.

The ruleData value for SKU_STATUS_RULE is invalid.

The key in the value Map is invalid.

The value in the value Map is invalid.

The startTime value is invalid.

The endTime value is invalid.

The from parameter value is invalid.

The to parameter value is invalid.

The time zone is invalid.

The currency is invalid.

The startTime value is invalid.

The endTime value is invalid.

The supportDays value is invalid.

The minPrepareMinutes value is invalid.

The iconUrl value is invalid.

The sequence value is invalid.

The min value is invalid.

The originAmount currency is invalid.

The originAmount is invalid.

The saleAmount currency is invalid.

The saleAmount is invalid.

The propertyId value is invalid.

The skuGroupId value is invalid.

Array size limit

Reason: The array you specify exceeds the maximum size.

Solution: Refer to the syncStore API documentation for maximum array size.

The following table provides the possible error messages:

Error message

The store.contacts array exceeds the maximum size.

The store.contents array exceeds the maximum size.

The store.serviceSchedules array exceeds the maximum size.

The store.bizRules array exceeds the maximum size.

The banners array exceeds the maximum size.

The recommendItemIds array exceeds the maximum size.

The inQueueScopes array exceeds the maximum size.

The reservationScopes array exceeds the maximum size.

The tags array exceeds the maximum size.

The array in ruleData for DELIVERY_SCHEDULE exceeds the maximum size.

The array in ruleData for DINE_IN_SCHEDULE exceeds the maximum size.

The array in ruleData for PRICE_SCHEDULE exceeds the maximum size.

The array in ruleData for ITEM_STATUS_RULE exceeds the maximum size.

The array in ruleData for SKU_STATUS_RULE exceeds the maximum size.

The value Map exceeds the maximum size.

The schedules Map exceeds the maximum size.

The array in the value of the schedules Map exceeds the maximum size.

The item.contents array exceeds the maximum size.

The item.bizRules array exceeds the maximum size.

The extendInfo.serviceSchedules array exceeds the maximum size.

The modifierGroups array exceeds the maximum size.

The skus array exceeds the maximum size.

The sku.bizRules array exceeds the maximum size.

The skuPropertyGroups array exceeds the maximum size.

The properties array exceeds the maximum size.

Empty objects

The following table provides the possible error messages and solutions:

Error message

The array cannot contain empty objects.

Duplicate parameter values

The following table provides the possible error messages and solutions:

Error message

The inQueueScopes value is duplicated.

The reservationScopes value is duplicated.

The business rule for DELIVERY_DISTANCE is duplicated.

The business rule for DELIVERY_SCHEDULE is duplicated.

The business rule for PICKUP_SCHEDULE is duplicated.

The business rule for PICKUP_RULE is duplicated.

The business rule for DINE_IN_SCHEDULE is duplicated.

The business rule for DINE_IN_ORDER is duplicated.

The business rule for PRICE_SCHEDULE is duplicated.

The business rule for ITEM_STATUS_RULE is duplicated.

The business rule for SKU_STATUS_RULE is duplicated.

The key in the schedules Map is duplicated.

The menu type is duplicated.

The menu ID is duplicated in the same store.

The menu model is duplicated. Contact our technical support to troubleshoot this issue.

The category ID is duplicated in the same menu.

The add-on item ID is duplicated in the same modifier group.

The item ID is duplicated in the same category.

The modifier group ID is duplicated in the same item.

The SKU ID is duplicated.

The skuGroupId value is duplicated.

The propertyId value is duplicated.

The sku.skuPropertyPairs value is duplicated.

Other errors

The following table provides the possible error messages and solutions:

Error message

The area ID does not exist.

The brand ID does not exist.

The area ID cannot be updated.

The brand ID cannot be updated.

The store type cannot be updated.

The from parameter in ruleData is greater than the to parameter.

The defaultLang code does not exist in the value Map.

The time zone is different. Make sure the time zones specified are all the same.

The start time cannot be greater than the end time.

The start time cannot be greater than the end time.

The menu ID does not exist.

The menu type cannot be updated.

The saleType value is incorrect for the single item.

The saleType value is incorrect for the add-on item.

The saleAmount value cannot be less than 0.

The nesting depth for item-group-item exceeds the limit.

The nesting depth for item-group-item exceeds the limit.

The key in skus.skuPropertyPairs cannot be found in SkuPropertyGroups.skuGroupId.

The value in skus.skuPropertyPairs cannot be found in properties.propertyId.

The size of sku.skuPropertyPairs is smaller than that of SkuPropertyGroups.