Skip to main content
Solved

How do we get Company by GSID using the API

  • June 8, 2024
  • 1 reply
  • 47 views

I have a company GSID from another API call.

Now I want to fetch company information using that GSID

I tried using this documentation - https://support.gainsight.com/gainsight_nxt/API_and_Developer_Docs/Company_and_Relationship_API/Company_API_Documentation#Read_API

 

The POST body that I am using is below

{
  "select": [
    "gsid",
    "Name",
    "Industry",
    "Stage",
    "Users"
  ],
  "where": {
    "conditions" : [
      {
        "name": "gsid",
        "alias": "A",
        "value" : "<GSID VALUE HERE>",
        "operator": "EQ"
      }
    ],
    "expression": "A"
  },
  "limit": 100,
  "offset": 0
}

I keep getting a HTTP 500
 

{
    "result": false,
    "errorCode": "GSOBJ_1017",
    "errorDesc": "Server Error Occurred, Please contact support",
    "localizedErrorDesc": null,
    "requestId": "132e0b79-1064-4b74-8ea0-0ceb0e728dda",
    "data": null,
    "message": "Internal Server Error Occurred. Please contact support team.",
    "localizedMessage": null
}

 

Also, where can I find documentation for the query language used in the documentation

Best answer by maheshavoma

Figured it out, the “value” expects an array. It would be nice to have some documentation of the query language.

 

This worked!

{
  "select": [
    "gsid",
    "Name",
    "Industry",
    "Stage",
    "Users"
  ],
  "where": {
    "conditions" : [
      {
        "name": "gsid",
        "alias": "A",
        "value" : ["<GSID VALUE HERE>"],
        "operator": "IN"
      }
    ],
    "expression": "A"
  },
  "limit": 100,
  "offset": 0
}

 

View original
Did you find this topic helpful?

1 reply

  • Author
  • Helper ⭐️
  • 1 reply
  • Answer
  • June 8, 2024

Figured it out, the “value” expects an array. It would be nice to have some documentation of the query language.

 

This worked!

{
  "select": [
    "gsid",
    "Name",
    "Industry",
    "Stage",
    "Users"
  ],
  "where": {
    "conditions" : [
      {
        "name": "gsid",
        "alias": "A",
        "value" : ["<GSID VALUE HERE>"],
        "operator": "IN"
      }
    ],
    "expression": "A"
  },
  "limit": 100,
  "offset": 0
}

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings