Use Lime Go's GraphQL API to search for and update data on Persons

Available data

This is the only data that can be requested from our API. If you have any additional wishes, please contact us.

KeyDescription
idId
nameName of the person
phoneNumberPhone number related to the person
employerNameName of the organization the person belongs to.
employerOrganization the person belongs to. Contains the same data as available when fetching Organizations
customFieldsAvailable custom fields on the person (title, type and value)

Queries

The different ways to fetch one or more persons and it's related data.

Get a specific person by id.

person(id: "pase1578159") {
  id
  name
  email
  phoneNumber
  employerName
  employer {
    id
    name
    city
    email
    phoneNumber
    organizationNumber
    responsibleCoworker {
      id
      name
      email
      phoneNumber
  	}
    customFields {
      title
      type
      value
    }
    integrationId
    temperature
    customerRelation
    tags
	}
  customFields {
    title
    type
    value
  }
}
{
  "data": {
    "person": {
      "id": "pase1578159",
      "name": "Anna Johansson",
      "phoneNumber": [
        "046-2704800"
      ],
      "employerName": "Lime Technologies Sweden AB",
      "employer": {
        "id": "pase106797",
        "name": "Lime Technologies Sweden AB",
        "city": "LUND",
        "email": "[email protected]",
        "phoneNumber": [
          "046-2704800"
        ],
        "organizationNumber" : "23235-23123",
        "responsibleCoworker": {
          "id": 2343,
          "name" : "Max Nyman",
          "email": "[email protected]",
          "phoneNumber": "046-2704800"
        },
        customFields: [
          {
            "title": "Social Media Link",
            "type": "Link",
            "value": "https://www.linkedin.com/company/limetechnologies"
          }
        ],
        "integrationId": 2344,
        "temperature": 66.98342680275138,
        "customerRelation": "IS_A_CUSTOMER",
        "tags": [
          "sample", 
          "batch"
        ]
      }
    }
  }
}

Search for persons

InputDescription
querySearches against the person or email name and or its organization's name that employees them.
If no query has been provided then all first x persons are returned.
firstThe amount of persons to fetch.
Defaults to 10. Max 20 at a time.
offsetThe amount of persons to skip.
Defaults to 0.
persons(query: "[email protected]", first: 15, offset: 0) {
  id
  name
  email
  phoneNumber
  employerName
  employer {
    id
    name
    city
    email
    phoneNumber
    organizationNumber
    responsibleCoworker {
      id
      name
      email
      phoneNumber
  	}
    customFields {
      title
      type
      value
    }
    integrationId
    temperature
    customerRelation
    tags
	}
  customFields {
    title
    type
    value
  }
}
{
  "data": {
    "persons": [
      {
        "id": "pase1578159",
        "name": "Anna Johansson",
        "phoneNumber": [
          "046-2704800"
        ],
        "employerName": "Lime Technologies Sweden AB",
        "employer": {
          "id": "pase106797",
          "name": "Lime Technologies Sweden AB",
          "city": "LUND",
          "email": "[email protected]",
          "phoneNumber": [
            "046-2704800"
          ],
          "organizationNumber" : "23235-23123",
          "responsibleCoworker": {
            "id": 2343,
            "name" : "Max Nyman",
            "email": "[email protected]",
            "phoneNumber": "046-2704800"
          },
          customFields: [
            {
              "title": "Social Media Link",
              "type": "Link",
              "value": "https://www.linkedin.com/company/limetechnologies"
            }
          ],
          "integrationId": 2344,
          "temperature": 66.98342680275138,
          "customerRelation": "IS_A_CUSTOMER",
          "tags": [
            "sample", 
            "batch"
          ]
        }
      }
    ]
  }
}

Mutations

The available mutations for updating Persons.

💡

Use one mutation for everything

If you intend to do multiple modifications to a person, we recommend that you set them all in the same mutation (as below) since this will be fully transactional. Meaning that either all data gets saved or none.

Update multiple fields

In the example below we are setting a emailConsent and adding two new tags to a person with id 123.

mutation {
  updatePerson(input: {
    id: "123"
    emailConsent: true
    tags: { addTags: ["example", "another example"] }
  }) {
    name
    email
    position
    tags
    currentlyEmployed
    emailConsent
    phoneNumber
    employerName
    employer {
      city
      customerRelation
      id
      name
      organizationNumber
      phoneNumber
      tags
      temperature
    }
  } 
}
{
  "data": {
    "updatePerson": {
      "name": "Anna Johansson",
      "email": "[email protected]",
      "position": "Kontorschef",
      "tags": [
        "example",
        "another example"
      ],
      "currentlyEmployed": true,
      "emailConsent": true,
      "phoneNumber": [
        "046-2704800",
        "046-123"
      ],
      "employerName": "Lime Technologies Sweden AB",
      "employer": {
        "city": "LUND",
        "customerRelation": "NO_RELATION",
        "id": "pase7200",
        "name": "Lime Technologies Sweden AB",
        "organizationNumber": "556397-0465",
        "phoneNumber": [
          "046-2704800"
        ],
        "tags": [],
        "temperature": 0
      }
    }
  }
}

Set email consent on person

mutation {
  updatePerson(input: {
    id: "123"
    emailConsent: true
  }) {
    name
    emailConsent
  } 
}
{
  "data": {
    "updatePerson": {
      "name": "Anna Johansson",
      "emailConsent": true
    }
  }
}

Add tags on person

mutation {
  updatePerson(input: {
    id: "123"
    tags: { addTags: ["example", "another example"] }
  }) {
    name
    tags
  } 
}
{
  "data": {
    "updatePerson": {
      "name": "Anna Johansson",
      "tags": [
        "example",
        "another example"
      ]
    }
  }
}

Create mail

Add an email as a note

This will create a note with the email's details under the given organization, person and coworker where the coworker details are the details of the coworker which the API key is used for.

mutation {
	createMail(input: {
    email: {
      subject: "FW:FW:FW: Gotta see this!"
      body: "This is an email."
    }
    organization: {
      name: "Lime Technologies AB"
      city: "Lund"
    }
    person: {
      firstName: "Erik"
      lastName: "Syrén"
    }
  }) {
	 mailId
	}
}