Object Graph Depth

The PUBLIC API always returns JSON formatted data. By default, we will return data for 2 levels of the object hierarchy. This should be enough for most applications but sometimes you may need additinal levels and a deeper object graph.

{

Level1: {
Level2: {
Level3: { }
}
}

In these cases, you can use the?_depth parameter to request a specific number of levels.

GET https://kalkiospace.spaces.nexudus.com/en?_resource=Business&_depth=1

{
    "Name": "Kalkio Space - East Side",
    "WebAddress": "kalkiospace",
    "Address": "1-3 Brixton Road, \r\nSW9 6DE\r\nLondon",
    "Phone": null,
    "Fax": null,
    "EmailContact": null,
    "WebContact": null,
    "CookiePolicyUrl": null,
    "PrivacyPolicyUrl": null,
    "Quote": null,
    "NativeHomeUrl": "https://kalkiospace.spaces.nexudus.com",
    "NativeHomeUrlWithLanguage": "https://kalkiospace.spaces.nexudus.com/en",
    "HomeUrl": "https://kalkiospace.spaces.nexudus.com",
    "HomeUrlWithLanguage": "https://kalkiospace.spaces.nexudus.com/en",
    "TransactionFee": 1,
    "Country": {},
    "Currency": {},
    "SimpleTimeZone": {},
    "Businesses": [],
    "AboutUs": null,
    "ShortIntroduction": null,
    "BillingName": "Kalkio Space",
    "BillingAddress": "1-3 Brixton Road",
    "BillingCity": "London",
    "BillingPostCode": "SW9 6DE",
    "BillingBankName": "",
    "BillingAccountCode": "",
    "BillingSortCode": "",
    "TermsAndConditions": "Terms",
    "Longitude": 0,
    "Latitude": 0,
    "IsChildLocation": true,
    "HasLogo": true,
    "HasBanner": true,
    "Id": 1004930927,
    "IdString": "1004930927",
    "UpdatedOn": "2020-06-07T15:06:36",
    "CreatedOn": "2019-04-28T17:23:25",
    "UniqueId": "a596d492-5f26-4645-a971-600ccf9a61e2",
    "IsNull": false
}

 

GET https://kalkiospace.spaces.nexudus.com/en?_resource=Business&_depth=2

{
    "Name": "Kalkio Space - East Side",
    "WebAddress": "kalkiospace",
    "Address": "1-3 Brixton Road, \r\nSW9 6DE\r\nLondon",
    "Phone": null,
    "Fax": null,
    "EmailContact": null,
    "WebContact": null,
    "CookiePolicyUrl": null,
    "PrivacyPolicyUrl": null,
    "Quote": null,
    "NativeHomeUrl": "https://kalkiospace.spaces.nexudus.com",
    "NativeHomeUrlWithLanguage": "https://kalkiospace.spaces.nexudus.com/en",
    "HomeUrl": "https://kalkiospace.spaces.nexudus.com",
    "HomeUrlWithLanguage": "https://kalkiospace.spaces.nexudus.com/en",
    "TransactionFee": 1,
    "Country": {
        "Name": "United States",
        "Id": 1221,
        "IdString": "1221",
        "UpdatedOn": "2012-01-23T14:35:50",
        "CreatedOn": "2012-01-23T14:35:50",
        "UniqueId": "e5ea470a-1440-4b37-ac9c-1949b6a70830",
        "IsNull": false
    },
    "Currency": {
        "Name": "US Dollar (USD)",
        "Code": "USD",
        "Format": "$0.00",
        "Id": 3004,
        "IdString": "3004",
        "UpdatedOn": "2013-05-25T14:49:16",
        "CreatedOn": "2012-01-23T14:35:50",
        "UniqueId": "29fe8a0f-fb71-4b42-a3eb-c2f29cfcd8e2",
        "IsNull": false
    },
    "SimpleTimeZone": {
        "Name": "GMT Standard Time",
        "Iana": "Europe/London",
        "TimeOffset": "0",
        "UsesSummerTime": true,
        "OffsetInMinutes": 60,
        "Id": 2023,
        "IdString": "2023",
        "UpdatedOn": "2013-05-11T14:51:22",
        "CreatedOn": "2012-01-23T14:35:50",
        "UniqueId": "12d47167-0964-42e8-aab6-e58f441ae9b3",
        "IsNull": false
    },
    "Businesses": [],
    "AboutUs": null,
    "ShortIntroduction": null,
    "BillingName": "Kalkio Space",
    "BillingAddress": "1-3 Brixton Road",
    "BillingCity": "London",
    "BillingPostCode": "SW9 6DE",
    "BillingBankName": "",
    "BillingAccountCode": "",
    "BillingSortCode": "",
    "TermsAndConditions": "Terms",
    "Longitude": 0,
    "Latitude": 0,
    "IsChildLocation": true,
    "HasLogo": true,
    "HasBanner": true,
    "Id": 1004930927,
    "IdString": "1004930927",
    "UpdatedOn": "2020-06-07T15:06:36",
    "CreatedOn": "2019-04-28T17:23:25",
    "UniqueId": "a596d492-5f26-4645-a971-600ccf9a61e2",
    "IsNull": false
}

 

Use this with caution as additional levels of data will require additional processing and more data, which will basically degrade performance and make your requests hit the rate limits quicker.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Please sign in to leave a comment.