Help on: v1/categories -> sortsequence

Started by axel.hennig, December 01, 2017, 08:42:16 PM

Previous topic - Next topic

axel.hennig

Hello,

I need a little bit help understanding the endpoint v1/categories.

I use the following code:


IMWS.get('v1/categories',{
                    path: 'Persons,Date',
                    recursive: false,
                    fields: 'name,sortsequence,children'
                }).then(function(response) {
                    console.log(response);
                });


And the console returns:


{
  "categories": [
    {
      "name": "Date",
      "children": [
        {
          "name": "2000 - 2009",
          "sortSequence": 0
        },
        {
          "name": "2010 - 2019",
          "sortSequence": 0
        },
      ],
      "sortSequence": 0
    },
    {
      "name": "Persons",
      "children": [
        {
          "name": "B",
          "sortSequence": 0
        },
        {
          "name": "C",
          "sortSequence": 0
        },
        {
          "name": "V",
          "sortSequence": 0
        },
        {
          "name": "W",
          "sortSequence": 0
        },
        {
          "name": "Z",
          "sortSequence": 0
        }
      ],
      "sortSequence": 0
    }
  ]
}


Why is sortSequence always 0? I thought it would be something like (for Persons):


name sortSequence
B0
C1
V2
W3
Z4

The help says: The sort sequence (0-based index) for this category, relative to all categories on the same level under the same parent.

So this shouldn't be always 0, or am I missing something?

Kind regards,
Axel

Mario

Did you define a manual sort sequence in the Category View for this?
Else the sort sequence is in the order added or always the same...
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

axel.hennig


Mario

I have extended the documentation to explicitly mention the custom sort sequence part.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook