Unicat API Reference

Up - API Reference - Home


/api/p/<project gid>/orderings/move

Requires JWT.

Move enables changing the order in which the orderings are presented.

Request

You must specify the ordering key you want to move. You can also specify the before_ordering, and the ordering will be placed before that one. If you don't provide a before_ordering, the ordering will be moved to the end.

POST /api/p/<project gid>/orderings/move
Authorization: Bearer <JWT>

{
    "ordering": "f6c547a3-23ec-4e70-92bc-1826ae53570a",
    "before_ordering": "e4c44479-56ca-47c0-b1f1-9acf40ee3459"
}

or

POST /api/p/<project gid>/orderings/move
Authorization: Bearer <JWT>

{
    "ordering": "f6c547a3-23ec-4e70-92bc-1826ae53570a"
}

Success response

Authorization: <JWT>

{
    "success": true,
    "result": {
        "project": "<project gid>"
    },
    "data": {
        "cc.projects": {
            "<project gid>": {
                ,
                "options": {
                    "orderings": {
                        "87b53a4e-359d-45c7-81cb-5e1c3ef444ec": "Catalog",
                        "e4c44479-56ca-47c0-b1f1-9acf40ee3459": "Webshop",
                        "f6c547a3-23ec-4e70-92bc-1826ae53570a": "Pricelist"
                    },
                    ,
                    "orderedorderings": [
                        "87b53a4e-359d-45c7-81cb-5e1c3ef444ec",
                        "f6c547a3-23ec-4e70-92bc-1826ae53570a",  // here it is!
                        "e4c44479-56ca-47c0-b1f1-9acf40ee3459"
                    ],
                   
                },
                
            }
        }
    }
}

result

project the current project.

data

cc.projects Project updated with orderedorderings.

Error responses

400 Bad request - missing parameters or wrong type or value
401 Unauthorized - missing or expired JWT
403 Forbidden - not a member of this project