• PXM Catalogs/
    PXM Catalog Latest Releases API for Administrators/
    Get a Hierarchyʼs Children

    Get a Hierarchyʼs Child Nodes in the Latest Release

    GET Get the Child Nodes for a Hierarchy from a Catalog Release

    https://api.moltin.com/pcm/catalogs/:catalogId/releases/latest/hierarchies/:hierarchyId/children
    

    Returns the parent nodes for the specified hierarchy from a published catalog.

    Parent Nodes

    In the bread_crumb metadata, you can identify the parent nodes that a node is associated with. This is useful if you want to improve how your shoppers search your store, for example. For more information, see Catalog Releases Overview.

    Currently, published catalogs are limited to the current release and two releases prior to the current release.

    Use releaseId to delete a specific release than the latest catalog.

    Parameters

    Path parameters

    NameRequiredTypeDescription
    catalogIdRequiredstringThe unique identifier of the catalog.
    releaseIdRequiredstringThe unique identifier of a published release of the catalog or latest for the most recently published version.
    hierarchyIdRequiredstringThe unique identifier of a hierarchy.

    Headers

    NameRequiredTypeDescription
    AuthorizationRequiredstringThe Bearer token to grant access to the API. Note that this must be a client credentials token.

    Query parameters

    NameRequiredTypeDescription
    page[limit]OptionalstringThe number of items to return per page. Minimum value is 1.
    page[offset]OptionalstringThe number of items to offset the results by. Offset is zero-based.

    Request Example

    curl -X GET https://api.moltin.com/pcm/catalogs/aea233e7-1300-48ce-9b45-7d0c0b60dde3/releases/latest/hierarchies/0e119de2-5fb0-4bca-9b84-b3fc6c903007/children \
         -H "Authorization: Bearer XXXX" \
    

    Response Example

    200 OK

    {
        "data": [
            {
                "id": "e2f3372c-89ed-49ae-a9c7-0dc1888f10ec",
                "type": "node",
                "attributes": {
                    "created_at": "2021-03-05T21:48:32.874Z",
                    "description": "All stoves and ovens",
                    "name": "Ranges",
                    "slug": "Ranges-MA1",
                    "updated_at": "2021-03-05T21:48:32.874Z",
                    "published_at": "2021-04-13T02:36:16.505Z"
                },
                "meta": {
                    "bread_crumb": [
                      "04e748f1-83db-4013-85c8-9edfb0e1b5fa",
                      "94b882fa-85de-470e-acb3-5b11358e02de",
                      "a96a898b-444c-40b6-9c27-5fc74d08e685"
                    ]
               },
                "relationships": {
                    "children": {
                        "links": {
                            "related": "/pcm/catalogs/aea233e7-1300-48ce-9b45-7d0c0b60dde3/releases/latest/nodes/e2f3372c-89ed-49ae-a9c7-0dc1888f10ec/relationships/children"
                        }
                    },
                    "hierarchy": {
                        "data": {
                            "id": "0e119de2-5fb0-4bca-9b84-b3fc6c903007",
                            "type": "hierarchy"
                        },
                        "links": {
                            "related": "/pcm/catalogs/aea233e7-1300-48ce-9b45-7d0c0b60dde3/releases/latest/hierarchies/0e119de2-5fb0-4bca-9b84-b3fc6c903007"
                        }
                    },
                    "parent": {
                        "data": {
                            "id": "0e119de2-5fb0-4bca-9b84-b3fc6c903007",
                            "type": "node"
                        },
                        "links": {
                            "related": "/pcm/catalogs/aea233e7-1300-48ce-9b45-7d0c0b60dde3/releases/latest/nodes/0e119de2-5fb0-4bca-9b84-b3fc6c903007"
                        }
                    },
                    "products": {
                        "links": {
                            "related": "/pcm/catalogs/aea233e7-1300-48ce-9b45-7d0c0b60dde3/releases/latest/nodes/e2f3372c-89ed-49ae-a9c7-0dc1888f10ec/relationships/products"
                        }
                    }
                }
            },
            {
                "id": "39f96a3f-5577-473f-a263-f21fb2013469",
                "type": "node",
                "attributes": {
                    "created_at": "2021-03-08T17:50:14.629Z",
                    "description": "All cooling units for food",
                    "name": "Refrigerators",
                    "slug": "Refrigerators-MA1",
                    "updated_at": "2021-03-08T17:50:14.629Z",
                    "published_at": "2021-04-13T02:36:16.505Z"
                },
                "relationships": {
                    "children": {
                        "links": {
                            "related": "/pcm/catalogs/aea233e7-1300-48ce-9b45-7d0c0b60dde3/releases/latest/nodes/39f96a3f-5577-473f-a263-f21fb2013469/relationships/children"
                        }
                    },
                    "hierarchy": {
                        "data": {
                            "id": "0e119de2-5fb0-4bca-9b84-b3fc6c903007",
                            "type": "hierarchy"
                        },
                        "links": {
                            "related": "/pcm/catalogs/aea233e7-1300-48ce-9b45-7d0c0b60dde3/releases/latest/hierarchies/0e119de2-5fb0-4bca-9b84-b3fc6c903007"
                        }
                    },
                    "parent": {
                        "data": {
                            "id": "0e119de2-5fb0-4bca-9b84-b3fc6c903007",
                            "type": "node"
                        },
                        "links": {
                            "related": "/pcm/catalogs/aea233e7-1300-48ce-9b45-7d0c0b60dde3/releases/latest/nodes/0e119de2-5fb0-4bca-9b84-b3fc6c903007"
                        }
                    },
                    "products": {
                        "links": {
                            "related": "/pcm/catalogs/aea233e7-1300-48ce-9b45-7d0c0b60dde3/releases/latest/nodes/39f96a3f-5577-473f-a263-f21fb2013469/relationships/products"
                        }
                    }
                }
            }
        ],
        "links": {
            "first": "/pcm/catalogs/aea233e7-1300-48ce-9b45-7d0c0b60dde3/releases/latest/hierarchies/0e119de2-5fb0-4bca-9b84-b3fc6c903007/children?page[offset]=0&page[limit]=25&",
            "last": "/pcm/catalogs/aea233e7-1300-48ce-9b45-7d0c0b60dde3/releases/latest/hierarchies/0e119de2-5fb0-4bca-9b84-b3fc6c903007/children?page[offset]=0&page[limit]=25&",
            "self": "/pcm/catalogs/aea233e7-1300-48ce-9b45-7d0c0b60dde3/releases/latest/hierarchies/0e119de2-5fb0-4bca-9b84-b3fc6c903007/children"
        }
    }
    

    Was this helpful?

    Previous
    Get a Hierarchy