Introduction

This API will update a hierarchy level (also known as "division") in your existing Hierarchy.

Good to know

API response format:

Our APIs return data in either JSON or XML format (depending on request by .json or .xml).


About this API

Resource Information

Response formats
JSON (default), XML
HTTP Method
PUT
Response family
Hierarchy
Header
Authorization: api_key XXXXX


Resource URL

Europe Production Server: https://api.eu.customergauge.com/v4.1/hierarchy.json

US Production Server: https://api.us.customergauge.com/v4.1/hierarchy.json

Australia Production Server: https://api.au.customergauge.com/v4.1/hierarchy.json


How to call

PUT Data

Update data as key value.


Parameters

Key
Data
division (required)
Amsterdam
division_to_update
North Holland
parent
Netherlands


Example Request

To call this API through cURL:

curl -H "Authorization: api_key XXXXX" -X PUT https://api.eu.customergauge.com/v4.1/hierarchy.json -d division=Amsterdam -d division_to_update="North Holland"


Example Result

Message reported on successful operation:

{
  "Data": {
    "message": "Division has been updated successfully"
  }
}


Message reported on failed operation:

{
  "Error": {
    "Message": "Required field 'id' not supplied",
    "Code": 300004
  }
}


Not the API you're looking for?

Related APIs:


Or view: