Get order of categories

GET https://app.ecwid.com/api/v3/{storeId}/categories/sort?parentCategory={categoryId}

Request and response example

Request:

GET /api/v3/1003/categories/sort?parentCategory=0 HTTP/1.1
Authorization: Bearer secret_token
Host: app.ecwid.com

Response:

{
  "sortedIds": [
    172786255,
    172966754
  ]
}

Required access scopes

Your app must have the following access scopes to make this request: read_catalog

Path params

All path params are required.

Param
Type
Description

storeId

number

Ecwid store ID.

Query params

Request supports only one required query param.

Param
Type
Description

parentCategory

number

Internal ID of the parent category. Use 0 value to receive a sorted list of categories inside the lop-level category named "Store front page". Required

Headers

The Authorization header is required.

Header
Format
Description

Authorization

Bearer secret_ab***cd

Access token of the application.

Response JSON

A JSON object with the following fields:

Field
Type
Description

sortedIds

array of numbers

List of categories inside their parent category order in the same way as they are listed in Ecwid admin and on the storefront.

Last updated

Was this helpful?