Use Lime Go's GraphQL API to search for and update data.
GraphQL is quite different from normal REST endpoints and it can take some time to grasp the concept. Instead of having multiple endpoint you only have one.
It's recommended to read Introduction to GraphQL and Queries and Mutations over at Learn about GraphQL before start using our implementation.
Using the GraphQL endpoint, you can do two types of operations. Querying and mutating.
- Querys are used to get one specific object or to search for a list of objects that match a given search query.
- Mutations are used to perform certain actions and alter objects.
The examples below are quite simple, regarding the request body. In production you'll probably want to give the queries and mutations a operation name and also looking into the use of variables.
Pro Tip
Use GraphiQL to get intellisense and full documentation. If you are using Chome, try the ChromeiQL extension.
When using ChromeiQL, or any other GraphiQL client, you need to add an API key to the request. The easiest way is to add a query parameter apikey= to the request.
Queries
Here is a list of available queries. The return values are only a subset of available data to get back.
Please use a GraphQL client to discover all of the available operations.
Get a specific organization by id.
Input | Description |
---|---|
id | The id of the organization which could be either of the "{sourceName}{number}" or "{number}" format. |
query | When applied to the employees or deals query, it works the same way as with the persons query and the deals query as described further below in the query list, with the exception that the deals and employees are of course associated with the given organization. |
first | The amount of items to fetch. Defaults to 10. Max 20 at a time. |
offset | The amount of items to skip. Defaults to 0. |
organization(id: "pase106797") {
id
name
city
email
phoneNumber
organizationNumber
responsibleCoworker {
id
name
email
phoneNumber
}
customFields {
title
type
value
}
integrationId
temperature
customerRelation
tags
employees(query: "[email protected]", first: 5, offset: 0) {
id
name
email
phoneNumber
tags
}
deals(query: "Big Deal", first: 5, offset: 0) {
id
name
status
tags
}
}
{
"data": {
"organization": {
"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"
],
employees: [
{
"id": "pase1578159",
"name": "Anna Johansson",
"email": "[email protected]",
"phoneNumber": [
"+46462704800"
],
"tags": [
"sample"
]
}
],
deals: [
{
"id": 850851,
"name": "Big Deal",
"status": "ORDER",
"tags": [
"sample"
]
}
]
}
}
}
Get a specific organization by externalKey
Input | Description |
---|---|
id | The value that is stored in the externalKey field |
externalKeyName | The name of the custom field or __integrationid / __bisnodeid |
query | When applied to the employees or deals query, it works the same way as with the persons query and the deals query as described further below in the query list, with the exception that the deals and employees are of course associated with the given organization. |
first | The amount of items to fetch. Defaults to 10. Max 20 at a time. |
offset | The amount of items to skip. Defaults to 0. |
External key is a user defined Custom field of type ExternalKey
that can be created in Lime Go for Organization
Deal
and Person
. You'll find it under Settings after you logged into Lime Go.
If you set externalKeyName
to __integrationid
or __bisnodeid
. This will change the scope from the user defined Custom field to look for the supplied value
in corresponding field.
organization(id: "123", externalKeyName: "Name of external key") {
id
name
city
email
phoneNumber
organizationNumber
responsibleCoworker {
id
name
email
phoneNumber
}
customFields {
title
type
value
}
integrationId
temperature
customerRelation
tags
employees(query: "[email protected]", first: 5, offset: 0) {
id
name
email
phoneNumber
tags
}
deals(query: "Big Deal", first: 5, offset: 0) {
id
name
status
tags
}
}
{
"data": {
"organization": {
"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"
],
employees: [
{
"id": "pase1578159",
"name": "Anna Johansson",
"email": "[email protected]",
"phoneNumber": [
"+46462704800"
],
"tags": [
"sample"
]
}
],
deals: [
{
"id": 850851,
"name": "Big Deal",
"status": "ORDER",
"tags": [
"sample"
]
}
]
}
}
}
Search for organizations
Input | Description |
---|---|
query | When applied to the top level organizations query, the query text is applied against an organization's name and its visiting address. If no query has been provided then all first x organizations are returned. When applied to the employees or deals query, it works the same way as with the persons query and the deals query as described further below in the query list, with the exception that the deals and employees are of course associated with the given organization. |
first | The amount of items to fetch. Defaults to 10. Max 20 at a time. |
offset | The amount of items to skip. Defaults to 0. |
organizations(query: "Lime technologies sweden ab", first: 15, offset: 0) {
id
name
city
email
phoneNumber
temperature
customerRelation
turnover
numberOfEmployees
tags
employees(query: "[email protected]", first: 5, offset: 0) {
id
name
email
phoneNumber
tags
}
deals(query: "Big Deal", first: 5, offset: 0) {
id
name
status
tags
}
}
{
"data": {
"organizations": [
{
"id": "pase106797",
"name": "Lime Technologies Sweden AB",
"city": "Lund",
"email": "[email protected]",
"phoneNumber": [
"+46462704800"
],
"temperature": 66.98342680275138,
"customerRelation": "IS_A_CUSTOMER",
"turnover": 217623000,
"numberOfEmployees": "100 - 199",
"tags": [
"sample",
"batch"
],
employees: [
{
"id": "pase1578159",
"name": "Anna Johansson",
"email": "[email protected]",
"phoneNumber": [
"+46462704800"
],
"tags": [
"sample"
]
}
],
deals: [
{
"id": 850851,
"name": "Big Deal",
"status": "ORDER",
"tags": [
"sample"
]
}
]
},
{
"id": "pase1441896",
"name": "Lime Technologies Sweden AB",
"city": "Göteborg",
"email": null,
"phonenumber": [
"+46317124400"
],
"temperature": 0,
"customerRelation": "NO_RELATION",
"turnover": 217623000,
"numberOfEmployees": "100 - 199",
"tags": [
"sample",
"batch"
]
}
]
}
}
Get a specific deal by id.
deal(id: 850851) {
id
name
customerName
status
source
responsibleCoworker {
id
name
email
phoneNumber
}
customer {
id
name
city
email
phoneNumber
organizationNumber
responsibleCoworker {
id
name
email
phoneNumber
}
customFields {
title
type
value
}
integrationId
temperature
customerRelation
tags
}
tags
customFields {
title
type
value
}
}
{
"data": {
"deal": {
"id": 850851,
"name": "Big Deal",
"customerName": "Lime Technologies Sweden AB",
"status": "ORDER",
"source": "Upselling",
"responsibleCoworker": {
"id": 2343,
"name" : "Max Nyman",
"email": "[email protected]",
"phoneNumber": "046-2704800"
},
"customer": {
"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"
]
},
"tags": [
"sample",
"batch"
],
customFields [
{
"title": "Won cause",
"type": "Text",
"value": "Forms addon"
}
]
}
}
}
Get a specific deal by externalKey
Input | Description |
---|---|
id | The value that is stored in the externalKey field |
externalKeyName | The name of the custom field or __integrationid |
External key is a user defined Custom field of type ExternalKey
that can be created in Lime Go. You'll find it under Settings after you logged into Lime Go.
You can also set externalKeyName
to __integrationid
. This will change the scope from the user defined Custom field to look for the supplied value
in the field Identity In External System.
deal(id: "123", externalKeyName: "Name of external key") {
id
name
customerName
status
source
responsibleCoworker {
id
name
email
phoneNumber
}
customer {
id
name
city
email
phoneNumber
organizationNumber
responsibleCoworker {
id
name
email
phoneNumber
}
customFields {
title
type
value
}
integrationId
temperature
customerRelation
tags
}
tags
customFields {
title
type
value
}
}
{
"data": {
"deal": {
"id": 850851,
"name": "Big Deal",
"customerName": "Lime Technologies Sweden AB",
"status": "ORDER",
"source": "Upselling",
"responsibleCoworker": {
"id": 2343,
"name" : "Max Nyman",
"email": "[email protected]",
"phoneNumber": "046-2704800"
},
"customer": {
"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"
]
},
"tags": [
"sample",
"batch"
],
customFields [
{
"title": "Won cause",
"type": "Text",
"value": "Forms addon"
}
]
}
}
}
Search for deals.
Input | Description |
---|---|
query | Searches against a deal's name and the company's name that its associated with. If no query has been provided then all first x deals are returned. |
first | The amount of deals to fetch. Defaults to 10. Max 20 at a time. |
offset | The amount of deals to skip. Defaults to 0. |
{
deals(query: "Big Deal", first: 15, offset: 0) {
id
name
customerName
status
tags
customer {
id
name
city
email
phoneNumber
organizationNumber
responsibleCoworker {
id
name
email
phoneNumber
}
customFields {
title
type
value
}
integrationId
temperature
customerRelation
tags
}
}
}
{
"data": {
"deals": [
{
"id": 850851,
"name": "Big Deal",
"customerName": "Lime Technologies Sweden AB",
"status": "ORDER",
"tags": [
"sample",
"batch"
],
"customer": {
"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"
]
}
}
]
}
}
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
Input | Description |
---|---|
query | Searches 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. |
first | The amount of persons to fetch. Defaults to 10. Max 20 at a time. |
offset | The 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]ogik.se",
"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
Here is an example of available mutations.
Please use a GraphQL client to discover all of the available operations.
Organization
In the example below we are setting a relation
as well as responsibleCoworker
and adding two new tags to a company with id pase7136
.
If you intend to do multiple modifications it's recommended to set them all in the same mutation (as below) since this will be fully transaction. Meaning that either all data gets saved or none.
mutation {
updateOrganization(input: {
id: "pase7136"
relation: IS_A_CUSTOMER
responsibleCoworker: { identifier: "1001" }
tags: { addTags: ["hej", "ho"] }
}) {
id
name
city
organizationNumber
temperature
customerRelation
responsibleCoworker { id, email, name }
tags
}
}
Set relation on organization
mutation {
updateOrganization(input: {
id: "pase7136"
relation: IS_A_CUSTOMER
}) {
id
name
customerRelation
}
}
Add tags on organization
mutation {
updateOrganization(input: {
id: "pase7136"
tags: { addTags: ["Extra tag", "From GraphQL"] }
}) {
id
name
tags
}
}
Set responsible coworker on organization
mutation {
updateOrganization(input: {
id: "pase7136"
responsibleCoworker: { identifier: "1001" }
}) {
id
name
responsibleCoworker { id, email, name }
}
}
Set external key on organization
A Custom Field with name Name of existing field
must already exist on Organization
mutation {
updateOrganization(input: {
id: "pase7136"
externalKey: { name: "Name of existing field", value: "456" }
}) {
id
name
}
}
Deal
In the example below we are setting a status
together with a note
as well as responsibleCoworker
and adding two new tags to a deal with id 123
.
Using a GraphQL client you'll get the available values for status
If you intend to do multiple modifications it's recommended to set them all in the same mutation (as below) since this will be fully transaction. Meaning that either all data gets saved or none.
mutation {
updateDeal(input: {
id: 123
tags: { addTags: ["Tag one", "another tag"] }
responsibleCoworker: { identifier: "1001" }
status: { status: ORDER, note: "lorem" }
}) {
id
name
status
tags
responsibleCoworker { id, email, name }
}
}
Set responsible coworker on deal
mutation {
updateDeal(input: {
id: 123
responsibleCoworker: { identifier: "1001" }
}) {
id
name
responsibleCoworker { id, email, name }
}
}
Set status on deal
Using a GraphQL client you'll get the available values for status
mutation {
updateDeal(input: {
id: 123
status: { status: ORDER, note: "lorem" }
}) {
id
name
status
}
}
Add tags on deal
mutation {
updateDeal(input: {
id: 123
tags: { addTags: ["Tag one", "another tag"] }
}) {
id
name
tags
}
}
Set external key on deal
A Custom Field with name Name of existing
field must already exist on Deal
mutation {
updateDeal(input: {
id: 123
externalKey: { name: "Name of existing field", value: "123-from-graphql" }
}) {
id
name
}
}
Person
In the example below we are setting a emailConsent
and adding two new tags to a person with id 123
.
If you intend to do multiple modifications it's recommended to set them all in the same mutation (as below) since this will be fully transaction. Meaning that either all data gets saved or none.
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
}
}