• PXM Catalogs/
    PXM Catalog Latest Releases API for Administrators/
    Get all Hierarchies

    Get all Hierarchies in the Latest Release

    GET Get all Hierarchies from a Catalog Release

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

    Returns the hierarchies from a published catalog.

    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.

    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 \
         -H "Authorization: Bearer XXXX" \
    

    Response Example

    200 OK

    {
        "data": [
            {
                "id": "0e119de2-5fb0-4bca-9b84-b3fc6c903007",
                "type": "hierarchy",
                "attributes": {
                    "created_at": "2021-03-05T21:45:28.395Z",
                    "description": "Free-standing appliances",
                    "name": "Major Appliances",
                    "slug": "Major-Appliances-MA0",
                    "updated_at": "2021-03-05T22:15:44.684Z",
                    "published_at": "2021-04-13T02:36:16.505Z"
                },
                "relationships": {
                    "children": {
                        "links": {
                            "related": "/pcm/catalogs/aea233e7-1300-48ce-9b45-7d0c0b60dde3/releases/latest/hierarchies/0e119de2-5fb0-4bca-9b84-b3fc6c903007/children"
                        }
                    },
                    "nodes": {
                        "links": {
                            "related": "/pcm/catalogs/aea233e7-1300-48ce-9b45-7d0c0b60dde3/releases/latest/hierarchies/0e119de2-5fb0-4bca-9b84-b3fc6c903007/nodes"
                        }
                    },
                    "products": {
                        "links": {
                            "related": "/pcm/catalogs/aea233e7-1300-48ce-9b45-7d0c0b60dde3/releases/latest/hierarchies/0e119de2-5fb0-4bca-9b84-b3fc6c903007/products"
                        }
                    }
                }
            },
            {
                "id": "4a5a476e-f28d-491f-95d7-86e53f05daf9",
                "type": "hierarchy",
                "attributes": {
                    "created_at": "2021-03-05T21:55:39.042Z",
                    "description": "Counter-top appliances",
                    "name": "Small Appliances",
                    "slug": "Small-Appliances-SA0",
                    "updated_at": "2021-03-05T22:13:55.756Z",
                    "published_at": "2021-04-13T02:36:16.505Z"
                },
                "relationships": {
                    "children": {
                        "links": {
                            "related": "/pcm/catalogs/aea233e7-1300-48ce-9b45-7d0c0b60dde3/releases/latest/hierarchies/4a5a476e-f28d-491f-95d7-86e53f05daf9/children"
                        }
                    },
                    "nodes": {
                        "links": {
                            "related": "/pcm/catalogs/aea233e7-1300-48ce-9b45-7d0c0b60dde3/releases/latest/hierarchies/4a5a476e-f28d-491f-95d7-86e53f05daf9/nodes"
                        }
                    },
                    "products": {
                        "links": {
                            "related": "/pcm/catalogs/aea233e7-1300-48ce-9b45-7d0c0b60dde3/releases/latest/hierarchies/4a5a476e-f28d-491f-95d7-86e53f05daf9/products"
                        }
                    }
                }
            }
        ],
        "links": {
            "first": "/pcm/catalogs/aea233e7-1300-48ce-9b45-7d0c0b60dde3/releases/latest/hierarchies?page[offset]=0&page[limit]=25&",
            "last": "/pcm/catalogs/aea233e7-1300-48ce-9b45-7d0c0b60dde3/releases/latest/hierarchies?page[offset]=0&page[limit]=25&",
            "self": "/pcm/catalogs/aea233e7-1300-48ce-9b45-7d0c0b60dde3/releases/latest/hierarchies"
        }
    }
    

    Was this helpful?

    Previous
    Get Latest Release