[error] => category_has_children

  • numismatica_ibercoin_dev

    1 message

    Espagne

    I am receiving the error [error] => category_has_children when attempting to use certain categories.

    I would like to understand the following:
    1. Which Categories Are Selectable?
    Could you please provide a list or criteria for which categories are valid for selecting when creating or updating an item?

    2. Understanding the Error [category_has_children]:
    What does this error mean, and how can I resolve it? Does it indicate that the category I am trying to use has subcategories or is otherwise not valid for direct item assignment?

    Any guidance or documentation on how to handle category selection and this specific error would be greatly appreciated.
  • @fred
    Administrateur

    103 messages

    Belgique

    I am receiving the error [error] => category_has_children when attempting to use certain categories.

    I would like to understand the following:
    1. Which Categories Are Selectable?
    Could you please provide a list or criteria for which categories are valid for selecting when creating or updating an item?

    2. Understanding the Error [category_has_children]:
    What does this error mean, and how can I resolve it? Does it indicate that the category I am trying to use has subcategories or is otherwise not valid for direct item assignment?

    Any guidance or documentation on how to handle category selection and this specific error would be greatly appreciated.
    • Posté le 14 août 2024 à 01:42
    • #1782840
    Hi numismatica_ibercoin_dev,

    The categories are organised in a balanced tree. You can only select a "leaf" category, a last-level category without any subcategories.

    The "category_has_children" error means the selected category is not a "leaf" category and is not selectable.

    You can find all category ids on the website here : Lien (https)
    Or you can use the /category endpoint to get information on all categories. There is a <selectable> tag in the response
    Lien (https)

    Fred

Rejoignez la communauté des collectionneurs !

S'inscrire Se connecter