Hierarchy Service

saveHierarchyV1

Create a new hierarchy. Update a hierarchy's details. Delete a hierarchy.

post/cruise/hierarchy/v1/saveHierarchy

Request

  • Base URL
    //webservices-test.net-chef.com (relative, and the document’s source URL is not known)
  • URL
    //webservices-test.net-chef.com/cruise/hierarchy/v1/saveHierarchy
  • Auth
    none declared. Required headers: authenticationtoken, sitename

Headers

authenticationtokenstring required

Secure token for API authentication.

passwordstring

Password for the Crunchtime Application User.

sitenamestring required

Crunchtime site identifier. (test or production)

useridstring

User ID for the Crunchtime Application User.

X-B3-TraceIdstring

Optional trace identifier for troubleshooting.

Request body

Example request

{
  "hierarchyDetails": {
    "hierarchyDetailDetails": [
      {
        "levelNumber": 1,
        "levelName": "Corp",
        "levelDescription": "Corporate",
        "logicalName": "Corporate",
        "parentLogicalName": "",
        "locationCode": ""
      },
      {
        "levelNumber": 2,
        "levelName": "Region",
        "levelDescription": "Regions",
        "logicalName": "Northeast",
        "parentLogicalName": "Corporate",
        "locationCode": ""
      },
      {
        "levelNumber": 3,
        "levelName": "Store",
        "levelDescription": "Stores",
        "logicalName": "",
        "parentLogicalName": "Northeast",
        "locationCode": "300004"
      },
      {
        "levelNumber": 3,
        "levelName": "Store",
        "levelDescription": "Stores",
        "logicalName": "",
        "parentLogicalName": "Northeast",
        "locationCode": "300004"
      }
    ],
    "hierarchyHeaderDetails": {
      "deleteFlag": "N",
      "hierarchyType": "Corporate Structure",
      "locationCode": "129000"
    }
  }
}

Response

Success

object required

Changes

No recorded changes to this operation across all 1 revision of this API.