Uploaded image for project: 'PrestaShop 1.7'
  1. PrestaShop 1.7
  2. BOOM-4588

API inconsistency between categories and category images

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: No change required
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Tests & Expected Results:
      N/A
    • Documentation Change:
      N/A

      Description

      Hello,

       I found the following inconsistency in the API between categories and category images:

       

      When you use www.example.com/ api/categories to get the categories you don’t get disabled categories.

      When you call www.example.com /api/images/categories you get images for all categories and all category IDs including the IDs of the disabled categories you can’t fetch with the first call

      This could lead to inconsistent data, when you use the API for a data import because you have images and no data for them.

       

      There are two possible way to solve this:

      The easy way would be to modify the images/categories call, so that only the images for active categories are returned.

      The better way would be to deliver all categories over the API and set a flag if the category is active or not.

       

      The second solution has some important advantages if you use PrestaShop in combination with an ERP system.

      Larger shops normally manage the data central in the ERP system and the ERP system uses the API of different platforms to upload the modified data and also cares about data exchange like EDI.

      So if the business of a Presta user grows and he starts to use an ERP system, it should be possible to import the complete data to the ERP system which will be used to manage the data from this point.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              vario Stephan Sonntag
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: