Back to Questions
Questions
Jani Iivari's picture

Intelex API SysLocationEntity

I'm trying to post a new location with API

Method: POST
URI: https://intelex_url/api/v2/object/SysLocationEntity

Header: Content-type: Application/json

Body:

{

    "Deleted": false,

    "Address1": null,

    "Address2": null,

    "Area": null,

    "BusinessUnits": null,

    "City": null,

    "County": null,

    "Depth": 1,

    "Description": null,

    "District": null,

    "Division": null,

    "EmResponsePhone": null,

    "Fax": null,

    "GeneInformation": null,

    "IsInput": true,

    "License": null,

    "LocationCode": "Test2",

    "Name": "Test2",

    "NbIndicators": "0",

    "Path": "\\Root\\Test2",

    "Phone": null,

    "PostalCode": null,

    "ProductGroup": null,

    "SiteIDNumber": null,

    "State": null,

    "UserLicenseCode": null,

    "WasteGenerator": false

}

 

Getting an error:

 

{

    "error": {

        "code": "",

        "message": "Only one top location is allowed. Please select parent location."

    }

}

 

What is the attribute for parent location? Tried "ParentLocation"

 

"ParentLocation2": "\\Root",

Received an error:

{

    "error": {

        "code": "",

        "message": "A 'PrimitiveValue' node with non-null value was found when trying to read the value of the navigation property 'ParentLocation'; however, a 'StartArray' node, a 'StartObject' node, or a 'PrimitiveValue' node with null value was expected."

    }

}

May 21, 2021 @ 06:46 AM EDT

This question hasn't been answered yet.
or to be the first to answer it!