Endpoints

See authentication for detailed information about authentication in our api.

Not using content-type "application/json" will currently result in an error. We are aware of this issue.

https://atlascrm.avisi-apps.com/api/1.0/swagger.json

Templates

Retrieve field-ids for your custom templates.

Find template by entity type

Using the Atlas CRM API it is possible to use endpoints that can create, alter and remove entities. To properly use these endpoints it is necessary to know about the template an entity is based on.

For example, one must know the field_id of the name field to create a sale entity.

The following endpoint can provide this information and make using the Atlas CRM API a lot easier. A possible use case is to create a form that can create and/or alter entities based on the template information that this endpoint provides.

GET/api/1.0/workspace/CRM/template/{entity-type}
Authorization
Path parameters
entity-type*enum
companycontactsale
Response
Body
sections*array of object
Request
const response = await fetch('/api/1.0/workspace/CRM/template/{entity-type}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "sections": [
    {
      "name": "text",
      "fields": [
        {
          "id": "text",
          "label": "text",
          "type": "text",
          "default-value": "text",
          "config": {
            "currency": "text"
          },
          "required": false
        }
      ]
    }
  ]
}

Entities

Perform CRUD actions for companies, contacts and sales

Retrieve paginated entities

Use this endpoint to retrieve multiple entities at once, with the possibility to filter the results.

Sorting

Entities are sorted by their name-field by default. You can alter this behaviour by supplying another field-id with the sort-by query parameter.

Pagination

The default size of the result is 20, but can be changed to a maximum of 100.

You will find the next url in the _links property when there is a next page available.

Filtering

You can filter the results based on the fields of an entity. There are different operators for the different field types.

Operator Description
eq Equals - Exact match with supplied filter.
contains Contains - Partial match with supplied filter.
gte Greater than / Equals - Value is equal or greater than the supplied filter.
lte Less than / Equals - Value is equal or less than the supplied filter.
Field type Operators Default operator Value format
string (Single line text) eq, contains eq any string
text (Multi line text) contains contains any string
date eq, gte, lte eq string - yyyy-mm-dd
timestamp eq, gte, lte eq string - ISO 8601 Datetime
decimal eq, gte, lte eq any number
user eq eq string - Atlassian account-id
single-select eq eq string - label of an option
multi-select contains contains string - label of an option

You can add a filter as a query parameter.

?fields.FIELD_ID[OPERATOR]=VALUE

For example:

?fields.contact-email[contains]=gmail.com

If no operator is supplied, the default operator will be used:

?fields.contact-name=Tom
?fields.contact-name[eq]=Tom

These query parameters will have the same result, as 'eq'
is the default operator for the field 'contact-name'

Multiple filters

You can add as many filters as you wish by just adding more query parameters. In the example below you will find all open sales with a revenue of 500 or more.

?fields.sale-balance[gte]=500&fields.sale-status=open

Adding the same field-id/operator combination will result in an OR operator. This can be used for example when you want to retrieve all closed sales (sales with status 'lost' OR 'won').

?fields.sale-status=won&fields.sale-status=lost
GET/api/1.0/workspace/CRM/entities
Authorization
Query parameters
Response
Body
items*array of object
total*integer (int32)
_links*object
Request
const response = await fetch('/api/1.0/workspace/CRM/entities?type=company', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "items": [
    {
      "id": "text",
      "type": "company",
      "_links": {
        "self": {
          "href": "text"
        },
        "app": {
          "href": "text"
        }
      }
    }
  ],
  "_links": {
    "self": {
      "href": "text"
    },
    "next": {
      "href": "text"
    }
  }
}

Create new entity

Use this endpoint to create a new company, contact or sale.

Template

You will have to use the Atlas CRM Template to create a new entity. See the Templates Endpoint to retrieve template information.

Each field type in the template has a different value format.

Field type Value format
string (Single line text) any string
text (Multi line text) any string
date string - yyyy-mm-dd
timestamp string - ISO 8601 Datetime
decimal any number
user string - Atlassian account-id
single-select string - label of an option
multi-select array - labels of options

Fields in payload

The fields payload should be a mapping of field-id and value.

{ "type": "contact",
  "fields": {"contact-name": "Eric",
             "contact-email": "Eric@somethingrandom.random",
             "97e9b775-8524-4aaf-ba48-9dc4d7123473": "My custom data"}}
POST/api/1.0/workspace/CRM/entities
Authorization
Body
type*enum
companycontactsale
fields*object
Response
Body
id*string
fields*object
type*enum
companycontactsale
_links*object
Request
const response = await fetch('/api/1.0/workspace/CRM/entities', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "type": "company"
    }),
});
const data = await response.json();
Response
{
  "id": "text",
  "type": "company",
  "_links": {
    "self": {
      "href": "text"
    },
    "app": {
      "href": "text"
    }
  }
}

Retrieve entity by id

GET/api/1.0/workspace/CRM/entities/{entity-id}
Authorization
Path parameters
entity-id*string
Response
Body
id*string
fields*object
type*enum
companycontactsale
_links*object
Request
const response = await fetch('/api/1.0/workspace/CRM/entities/{entity-id}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "id": "text",
  "type": "company",
  "_links": {
    "self": {
      "href": "text"
    },
    "app": {
      "href": "text"
    }
  }
}

Update entity by id

Use this endpoint to update a company, contact or sale.

Template

You will have to use the Atlas CRM Template to update an entity. See the Templates Endpoint to retrieve template information.

Each field type in the template has a different value format.

Field type Value format
string (Single line text) any string
text (Multi line text) any string
date string - yyyy-mm-dd
timestamp string - ISO 8601 Datetime
decimal any number
user string - Atlassian account-id
single-select string - label of an option

Fields in payload

The fields payload should be a mapping of field-id and value. You only have to supply the fields that you which to update. To remove a value, simply pass is through as null.

{"fields": {"contact-name": "Erica", 
            "contact-email": null}}
PUT/api/1.0/workspace/CRM/entities/{entity-id}
Authorization
Path parameters
entity-id*string
Body
fields*object
Response
Body
id*string
fields*object
type*enum
companycontactsale
_links*object
Request
const response = await fetch('/api/1.0/workspace/CRM/entities/{entity-id}', {
    method: 'PUT',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "id": "text",
  "type": "company",
  "_links": {
    "self": {
      "href": "text"
    },
    "app": {
      "href": "text"
    }
  }
}

Delete entity by id

DELETE/api/1.0/workspace/CRM/entities/{entity-id}
Authorization
Path parameters
entity-id*string
Response
Body
id*string
fields*object
type*enum
companycontactsale
_links*object
Request
const response = await fetch('/api/1.0/workspace/CRM/entities/{entity-id}', {
    method: 'DELETE',
    headers: {},
});
const data = await response.json();
Response
{
  "id": "text",
  "type": "company",
  "_links": {
    "self": {
      "href": "text"
    },
    "app": {
      "href": "text"
    }
  }
}

Linking

Link entities together

See Retrieve paginated entities for more information about filtering, sorting and pagination.

GET/api/1.0/workspace/CRM/entities/{entity-id}/links
Authorization
Path parameters
entity-id*string
Query parameters
Response
Body
items*array of object
total*integer (int32)
_links*object
Request
const response = await fetch('/api/1.0/workspace/CRM/entities/{entity-id}/links?type=company', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "items": [
    {
      "roles": [
        "text"
      ],
      "entity": {
        "id": "text",
        "type": "company",
        "_links": {
          "self": {
            "href": "text"
          },
          "app": {
            "href": "text"
          }
        }
      },
      "_links": {
        "self": {
          "href": "text"
        }
      }
    }
  ],
  "_links": {
    "self": {
      "href": "text"
    },
    "next": {
      "href": "text"
    }
  }
}
POST/api/1.0/workspace/CRM/entities/{entity-id}/links
Authorization
Path parameters
entity-id*string
Body
entity-id*string
rolesarray of string
Response
Body
roles*array of string
entity*object
_links*object
Request
const response = await fetch('/api/1.0/workspace/CRM/entities/{entity-id}/links', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "entity-id": "text"
    }),
});
const data = await response.json();
Response
{
  "roles": [
    "text"
  ],
  "entity": {
    "id": "text",
    "type": "company",
    "_links": {
      "self": {
        "href": "text"
      },
      "app": {
        "href": "text"
      }
    }
  },
  "_links": {
    "self": {
      "href": "text"
    }
  }
}
GET/api/1.0/workspace/CRM/entities/{entity-id}/links/{other-entity-id}
Authorization
Path parameters
entity-id*string
other-entity-id*string
Response
Body
roles*array of string
entity*object
_links*object
Request
const response = await fetch('/api/1.0/workspace/CRM/entities/{entity-id}/links/{other-entity-id}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "roles": [
    "text"
  ],
  "entity": {
    "id": "text",
    "type": "company",
    "_links": {
      "self": {
        "href": "text"
      },
      "app": {
        "href": "text"
      }
    }
  },
  "_links": {
    "self": {
      "href": "text"
    }
  }
}
PUT/api/1.0/workspace/CRM/entities/{entity-id}/links/{other-entity-id}
Authorization
Path parameters
entity-id*string
other-entity-id*string
Body
roles*array of string
Response
Body
roles*array of string
entity*object
_links*object
Request
const response = await fetch('/api/1.0/workspace/CRM/entities/{entity-id}/links/{other-entity-id}', {
    method: 'PUT',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "roles": [
        "text"
      ]
    }),
});
const data = await response.json();
Response
{
  "roles": [
    "text"
  ],
  "entity": {
    "id": "text",
    "type": "company",
    "_links": {
      "self": {
        "href": "text"
      },
      "app": {
        "href": "text"
      }
    }
  },
  "_links": {
    "self": {
      "href": "text"
    }
  }
}
DELETE/api/1.0/workspace/CRM/entities/{entity-id}/links/{other-entity-id}
Authorization
Path parameters
entity-id*string
other-entity-id*string
Response
Body
roles*array of string
entity*object
_links*object
Request
const response = await fetch('/api/1.0/workspace/CRM/entities/{entity-id}/links/{other-entity-id}', {
    method: 'DELETE',
    headers: {},
});
const data = await response.json();
Response
{
  "roles": [
    "text"
  ],
  "entity": {
    "id": "text",
    "type": "company",
    "_links": {
      "self": {
        "href": "text"
      },
      "app": {
        "href": "text"
      }
    }
  },
  "_links": {
    "self": {
      "href": "text"
    }
  }
}

Jira issues

Link entities to Jira issues

Link entity to issues

POST/api/1.0/workspace/CRM/entities/{entity-id}/issues
Authorization
Path parameters
entity-id*string
Body
issue-ids*array of string
Response
Body
issue-ids*array of string
Request
const response = await fetch('/api/1.0/workspace/CRM/entities/{entity-id}/issues', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "issue-ids": [
        "text"
      ]
    }),
});
const data = await response.json();
Response
{
  "issue-ids": [
    "text"
  ]
}

Unlink entity from issues

DELETE/api/1.0/workspace/CRM/entities/{entity-id}/issues
Authorization
Path parameters
entity-id*string
Body
issue-ids*array of string
Response
Body
issue-ids*array of string
Request
const response = await fetch('/api/1.0/workspace/CRM/entities/{entity-id}/issues', {
    method: 'DELETE',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "issue-ids": [
        "text"
      ]
    }),
});
const data = await response.json();
Response
{
  "issue-ids": [
    "text"
  ]
}

Comments

Add plain text notes to Companies, Contacts and Sales

Create new comment

Formats

The format field can only be "plain-text" at this moment. This field is mandatory to prevent breaking changes when more formats will be supported.

Account ID

Supply the Atlassian Account ID of the author of the comment in the account-id field.

You can find account-ids by using the Jira or Confluence REST API. This is an example of how to find your own Atlassian Account ID:

GET https://YOURBASEURL.atlassian.net/rest/api/latest/myself

Example request

{ "format": "plain-text",
  "account-id": "0e3b584c-random-8a57-367dd049c3a4",
  "comment": "Created this comment from the API \n Kind regards"}
POST/api/1.0/workspace/CRM/entities/{entity-id}/comments
Authorization
Path parameters
entity-id*string
Body
format*enum
plain-text
comment*string
account-id*string
Response
Body
id*string
comment*string
account-id*string
Request
const response = await fetch('/api/1.0/workspace/CRM/entities/{entity-id}/comments', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "format": "plain-text",
      "comment": "text",
      "account-id": "text"
    }),
});
const data = await response.json();
Response
{
  "id": "text",
  "comment": "text",
  "account-id": "text"
}

Last updated