CrmApi
- Create Activity
- List Activities
- Delete Activity
- Get Activity
- Update Activity
- Create Company
- List Companies
- Delete Company
- Get Company
- Update Company
- Create Contact
- List Contacts
- Delete Contact
- Get Contact
- Update Contact
- Create Lead
- List Leads
- Delete Lead
- Get Lead
- Update Lead
- Create Note
- List Notes
- Delete Note
- Get Note
- Update Note
- Create Opportunity
- List Opportunities
- Delete Opportunity
- Get Opportunity
- Update Opportunity
- Create Pipeline
- List Pipelines
- Delete Pipeline
- Get Pipeline
- Update Pipeline
- Create User
- List Users
- Delete User
- Get User
- Update User
Method: activitiesAdd
crmApi.activitiesAdd(body)
Name | Type | Description | Notes |
---|---|---|---|
activity | Activity | ||
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
Status code | Description |
---|---|
201 | Activity created |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
activity: {
activity_datetime: '2021-05-01T12:00:00.000Z',
duration_seconds: 1800,
user_id: '12345',
account_id: '12345',
contact_id: '12345',
company_id: '12345',
opportunity_id: '12345',
lead_id: '12345',
owner_id: '12345',
campaign_id: '12345',
case_id: '12345',
asset_id: '12345',
contract_id: '12345',
product_id: '12345',
solution_id: '12345',
custom_object_id: '12345',
type: 'meeting',
title: 'Meeting',
description: 'More info about the meeting',
note: 'An internal note about the meeting',
location: 'Space',
location_address: {
id: '123',
type: 'primary',
string: '25 Spring Street, Blackburn, VIC 3130',
name: 'HQ US',
line1: 'Main street',
line2: 'apt #',
line3: 'Suite #',
line4: 'delivery instructions',
street_number: '25',
city: 'San Francisco',
state: 'CA',
postal_code: '94104',
country: 'US',
latitude: '40.759211',
longitude: '-73.984638',
county: 'Santa Clara',
contact_name: 'Elon Musk',
salutation: 'Mr',
phone_number: '111-111-1111',
fax: '122-111-1111',
email: 'elon@musk.com',
website: 'https://elonmusk.com',
notes: 'Address notes or delivery instructions.',
row_version: '1-12345'
},
all_day_event: false,
private: true,
group_event: true,
event_sub_type: 'debrief',
group_event_type: 'Proposed',
child: false,
archived: false,
deleted: false,
show_as: 'busy',
done: false,
start_datetime: '2021-05-01T12:00:00.000Z',
end_datetime: '2021-05-01T12:30:00.000Z',
activity_date: '2021-05-01',
end_date: '2021-05-01',
recurrent: false,
reminder_datetime: '2021-05-01T17:00:00.000Z',
reminder_set: false,
video_conference_url: 'https://us02web.zoom.us/j/88120759396',
video_conference_id: 'zoom:88120759396',
custom_fields: [
{
id: '2389328923893298',
name: 'employee_level',
description: 'Employee Level',
value: 'Uses Salesforce and Marketo'
}
],
attendees: [
{
name: 'Elon Musk',
first_name: 'Elon',
middle_name: 'D.',
last_name: 'Musk',
prefix: 'Mr.',
suffix: 'PhD',
email_address: 'elon@musk.com',
is_organizer: true,
status: 'accepted'
}
],
pass_through: [
{
service_id: 'string',
operation_id: 'string',
extend_object: {},
extend_paths: [
{
path: '$.nested.property',
value: [Object]
}
]
}
]
}
}
try {
const { data } = await apideck.crm.activitiesAdd(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: activitiesAll
crmApi.activitiesAll(body)
Name | Type | Description | Notes |
---|---|---|---|
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
cursor | [string] | Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. | (optional) |
limit | [number] | Number of results to return. Minimum 1, Maximum 200, Default 20 | (optional) defaults to 20 |
filter | ActivitiesFilter | Apply filters | (optional) |
sort | ActivitiesSort | Apply sorting | (optional) |
passThrough | PassThroughQuery | Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads | (optional) |
fields | [string] | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city` In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. |
(optional) |
Status code | Description |
---|---|
200 | Activities |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {}
try {
const { data } = await apideck.crm.activitiesAll(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: activitiesDelete
crmApi.activitiesDelete(body)
Name | Type | Description | Notes |
---|---|---|---|
id | [string] | ID of the record you are acting upon. | |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
Status code | Description |
---|---|
200 | Activity deleted |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
id: 'id_example'
}
try {
const { data } = await apideck.crm.activitiesDelete(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: activitiesOne
crmApi.activitiesOne(body)
Name | Type | Description | Notes |
---|---|---|---|
id | [string] | ID of the record you are acting upon. | |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
fields | [string] | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city` In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. |
(optional) |
Status code | Description |
---|---|
200 | Activity |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
id: 'id_example'
}
try {
const { data } = await apideck.crm.activitiesOne(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: activitiesUpdate
crmApi.activitiesUpdate(body)
Name | Type | Description | Notes |
---|---|---|---|
activity | Activity | ||
id | [string] | ID of the record you are acting upon. | |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
Status code | Description |
---|---|
200 | Activity updated |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
id: 'id_example',
activity: {
activity_datetime: '2021-05-01T12:00:00.000Z',
duration_seconds: 1800,
user_id: '12345',
account_id: '12345',
contact_id: '12345',
company_id: '12345',
opportunity_id: '12345',
lead_id: '12345',
owner_id: '12345',
campaign_id: '12345',
case_id: '12345',
asset_id: '12345',
contract_id: '12345',
product_id: '12345',
solution_id: '12345',
custom_object_id: '12345',
type: 'meeting',
title: 'Meeting',
description: 'More info about the meeting',
note: 'An internal note about the meeting',
location: 'Space',
location_address: {
id: '123',
type: 'primary',
string: '25 Spring Street, Blackburn, VIC 3130',
name: 'HQ US',
line1: 'Main street',
line2: 'apt #',
line3: 'Suite #',
line4: 'delivery instructions',
street_number: '25',
city: 'San Francisco',
state: 'CA',
postal_code: '94104',
country: 'US',
latitude: '40.759211',
longitude: '-73.984638',
county: 'Santa Clara',
contact_name: 'Elon Musk',
salutation: 'Mr',
phone_number: '111-111-1111',
fax: '122-111-1111',
email: 'elon@musk.com',
website: 'https://elonmusk.com',
notes: 'Address notes or delivery instructions.',
row_version: '1-12345'
},
all_day_event: false,
private: true,
group_event: true,
event_sub_type: 'debrief',
group_event_type: 'Proposed',
child: false,
archived: false,
deleted: false,
show_as: 'busy',
done: false,
start_datetime: '2021-05-01T12:00:00.000Z',
end_datetime: '2021-05-01T12:30:00.000Z',
activity_date: '2021-05-01',
end_date: '2021-05-01',
recurrent: false,
reminder_datetime: '2021-05-01T17:00:00.000Z',
reminder_set: false,
video_conference_url: 'https://us02web.zoom.us/j/88120759396',
video_conference_id: 'zoom:88120759396',
custom_fields: [
{
id: '2389328923893298',
name: 'employee_level',
description: 'Employee Level',
value: 'Uses Salesforce and Marketo'
}
],
attendees: [
{
name: 'Elon Musk',
first_name: 'Elon',
middle_name: 'D.',
last_name: 'Musk',
prefix: 'Mr.',
suffix: 'PhD',
email_address: 'elon@musk.com',
is_organizer: true,
status: 'accepted'
}
],
pass_through: [
{
service_id: 'string',
operation_id: 'string',
extend_object: {},
extend_paths: [
{
path: '$.nested.property',
value: [Object]
}
]
}
]
}
}
try {
const { data } = await apideck.crm.activitiesUpdate(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: companiesAdd
crmApi.companiesAdd(body)
Name | Type | Description | Notes |
---|---|---|---|
company | Company | ||
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
Status code | Description |
---|---|
201 | Company created |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
company: {
name: 'SpaceX',
owner_id: '12345',
image: 'https://www.spacex.com/static/images/share.jpg',
description: 'Space Exploration Technologies Corp. is an American aerospace manufacturer, space transportation services and communications company headquartered in Hawthorne, California.',
vat_number: 'BE0689615164',
currency: 'USD',
status: 'Open',
fax: '+12129876543',
annual_revenue: '+$35m',
number_of_employees: '500-1000',
industry: 'Apparel',
ownership: 'Public',
sales_tax_number: '12456EN',
payee_number: '78932EN',
abn_or_tfn: '46 115 614 695',
abn_branch: '123',
acn: 'XXX XXX XXX',
first_name: 'Elon',
last_name: 'Musk',
bank_accounts: [
{
bank_name: 'Monzo',
account_number: '123465',
account_name: 'SPACEX LLC',
account_type: 'credit_card',
iban: 'CH2989144532982975332',
bic: 'AUDSCHGGXXX',
routing_number: '012345678',
bsb_number: '062-001',
branch_identifier: '001',
bank_code: 'BNH',
currency: 'USD'
}
],
websites: [
{
id: '12345',
url: 'http://example.com',
type: 'primary'
}
],
addresses: [
{
id: '123',
type: 'primary',
string: '25 Spring Street, Blackburn, VIC 3130',
name: 'HQ US',
line1: 'Main street',
line2: 'apt #',
line3: 'Suite #',
line4: 'delivery instructions',
street_number: '25',
city: 'San Francisco',
state: 'CA',
postal_code: '94104',
country: 'US',
latitude: '40.759211',
longitude: '-73.984638',
county: 'Santa Clara',
contact_name: 'Elon Musk',
salutation: 'Mr',
phone_number: '111-111-1111',
fax: '122-111-1111',
email: 'elon@musk.com',
website: 'https://elonmusk.com',
notes: 'Address notes or delivery instructions.',
row_version: '1-12345'
}
],
social_links: [
{
id: '12345',
url: 'https://www.twitter.com/apideck',
type: 'twitter'
}
],
phone_numbers: [
{
id: '12345',
country_code: '1',
area_code: '323',
number: '111-111-1111',
extension: '105',
type: 'primary'
}
],
emails: [
{
id: '123',
email: 'elon@musk.com',
type: 'primary'
}
],
row_type: {
id: '12345',
name: 'Customer Account'
},
custom_fields: [
{
id: '2389328923893298',
name: 'employee_level',
description: 'Employee Level',
value: 'Uses Salesforce and Marketo'
}
],
tags: [
'New'
],
read_only: false,
salutation: 'Mr',
birthday: '2000-08-12',
pass_through: [
{
service_id: 'string',
operation_id: 'string',
extend_object: {},
extend_paths: [
{
path: '$.nested.property',
value: [Object]
}
]
}
]
}
}
try {
const { data } = await apideck.crm.companiesAdd(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: companiesAll
crmApi.companiesAll(body)
Name | Type | Description | Notes |
---|---|---|---|
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
cursor | [string] | Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. | (optional) |
limit | [number] | Number of results to return. Minimum 1, Maximum 200, Default 20 | (optional) defaults to 20 |
filter | CompaniesFilter | Apply filters | (optional) |
sort | CompaniesSort | Apply sorting | (optional) |
passThrough | PassThroughQuery | Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads | (optional) |
fields | [string] | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city` In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. |
(optional) |
Status code | Description |
---|---|
200 | Companies |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {}
try {
const { data } = await apideck.crm.companiesAll(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: companiesDelete
crmApi.companiesDelete(body)
Name | Type | Description | Notes |
---|---|---|---|
id | [string] | ID of the record you are acting upon. | |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
Status code | Description |
---|---|
200 | Company deleted |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
id: 'id_example'
}
try {
const { data } = await apideck.crm.companiesDelete(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: companiesOne
crmApi.companiesOne(body)
Name | Type | Description | Notes |
---|---|---|---|
id | [string] | ID of the record you are acting upon. | |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
fields | [string] | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city` In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. |
(optional) |
Status code | Description |
---|---|
200 | Company |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
id: 'id_example'
}
try {
const { data } = await apideck.crm.companiesOne(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: companiesUpdate
crmApi.companiesUpdate(body)
Name | Type | Description | Notes |
---|---|---|---|
company | Company | ||
id | [string] | ID of the record you are acting upon. | |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
Status code | Description |
---|---|
200 | Company updated |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
id: 'id_example',
company: {
name: 'SpaceX',
owner_id: '12345',
image: 'https://www.spacex.com/static/images/share.jpg',
description: 'Space Exploration Technologies Corp. is an American aerospace manufacturer, space transportation services and communications company headquartered in Hawthorne, California.',
vat_number: 'BE0689615164',
currency: 'USD',
status: 'Open',
fax: '+12129876543',
annual_revenue: '+$35m',
number_of_employees: '500-1000',
industry: 'Apparel',
ownership: 'Public',
sales_tax_number: '12456EN',
payee_number: '78932EN',
abn_or_tfn: '46 115 614 695',
abn_branch: '123',
acn: 'XXX XXX XXX',
first_name: 'Elon',
last_name: 'Musk',
bank_accounts: [
{
bank_name: 'Monzo',
account_number: '123465',
account_name: 'SPACEX LLC',
account_type: 'credit_card',
iban: 'CH2989144532982975332',
bic: 'AUDSCHGGXXX',
routing_number: '012345678',
bsb_number: '062-001',
branch_identifier: '001',
bank_code: 'BNH',
currency: 'USD'
}
],
websites: [
{
id: '12345',
url: 'http://example.com',
type: 'primary'
}
],
addresses: [
{
id: '123',
type: 'primary',
string: '25 Spring Street, Blackburn, VIC 3130',
name: 'HQ US',
line1: 'Main street',
line2: 'apt #',
line3: 'Suite #',
line4: 'delivery instructions',
street_number: '25',
city: 'San Francisco',
state: 'CA',
postal_code: '94104',
country: 'US',
latitude: '40.759211',
longitude: '-73.984638',
county: 'Santa Clara',
contact_name: 'Elon Musk',
salutation: 'Mr',
phone_number: '111-111-1111',
fax: '122-111-1111',
email: 'elon@musk.com',
website: 'https://elonmusk.com',
notes: 'Address notes or delivery instructions.',
row_version: '1-12345'
}
],
social_links: [
{
id: '12345',
url: 'https://www.twitter.com/apideck',
type: 'twitter'
}
],
phone_numbers: [
{
id: '12345',
country_code: '1',
area_code: '323',
number: '111-111-1111',
extension: '105',
type: 'primary'
}
],
emails: [
{
id: '123',
email: 'elon@musk.com',
type: 'primary'
}
],
row_type: {
id: '12345',
name: 'Customer Account'
},
custom_fields: [
{
id: '2389328923893298',
name: 'employee_level',
description: 'Employee Level',
value: 'Uses Salesforce and Marketo'
}
],
tags: [
'New'
],
read_only: false,
salutation: 'Mr',
birthday: '2000-08-12',
pass_through: [
{
service_id: 'string',
operation_id: 'string',
extend_object: {},
extend_paths: [
{
path: '$.nested.property',
value: [Object]
}
]
}
]
}
}
try {
const { data } = await apideck.crm.companiesUpdate(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: contactsAdd
crmApi.contactsAdd(body)
Name | Type | Description | Notes |
---|---|---|---|
contact | Contact | ||
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
Status code | Description |
---|---|
201 | Contact created |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
contact: {
name: 'Elon Musk',
owner_id: '54321',
type: 'personal',
company_id: '23456',
company_name: '23456',
lead_id: '34567',
first_name: 'Elon',
middle_name: 'D.',
last_name: 'Musk',
prefix: 'Mr.',
suffix: 'PhD',
title: 'CEO',
department: 'Engineering',
language: 'EN',
gender: 'female',
birthday: '2000-08-12',
image: 'https://unavatar.io/elon-musk',
photo_url: 'https://unavatar.io/elon-musk',
lead_source: 'Cold Call',
fax: '+12129876543',
description: 'Internal champion',
current_balance: 10.5,
status: 'open',
active: true,
websites: [
{
id: '12345',
url: 'http://example.com',
type: 'primary'
}
],
addresses: [
{
id: '123',
type: 'primary',
string: '25 Spring Street, Blackburn, VIC 3130',
name: 'HQ US',
line1: 'Main street',
line2: 'apt #',
line3: 'Suite #',
line4: 'delivery instructions',
street_number: '25',
city: 'San Francisco',
state: 'CA',
postal_code: '94104',
country: 'US',
latitude: '40.759211',
longitude: '-73.984638',
county: 'Santa Clara',
contact_name: 'Elon Musk',
salutation: 'Mr',
phone_number: '111-111-1111',
fax: '122-111-1111',
email: 'elon@musk.com',
website: 'https://elonmusk.com',
notes: 'Address notes or delivery instructions.',
row_version: '1-12345'
}
],
social_links: [
{
id: '12345',
url: 'https://www.twitter.com/apideck',
type: 'twitter'
}
],
phone_numbers: [
{
id: '12345',
country_code: '1',
area_code: '323',
number: '111-111-1111',
extension: '105',
type: 'primary'
}
],
emails: [
{
id: '123',
email: 'elon@musk.com',
type: 'primary'
}
],
email_domain: 'gmail.com',
custom_fields: [
{
id: '2389328923893298',
name: 'employee_level',
description: 'Employee Level',
value: 'Uses Salesforce and Marketo'
}
],
tags: [
'New'
],
opportunity_ids: [
'12345'
],
pass_through: [
{
service_id: 'string',
operation_id: 'string',
extend_object: {},
extend_paths: [
{
path: '$.nested.property',
value: [Object]
}
]
}
]
}
}
try {
const { data } = await apideck.crm.contactsAdd(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: contactsAll
crmApi.contactsAll(body)
Name | Type | Description | Notes |
---|---|---|---|
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
cursor | [string] | Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. | (optional) |
limit | [number] | Number of results to return. Minimum 1, Maximum 200, Default 20 | (optional) defaults to 20 |
filter | ContactsFilter | Apply filters | (optional) |
sort | ContactsSort | Apply sorting | (optional) |
passThrough | PassThroughQuery | Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads | (optional) |
fields | [string] | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city` In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. |
(optional) |
Status code | Description |
---|---|
200 | Contacts |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {}
try {
const { data } = await apideck.crm.contactsAll(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: contactsDelete
crmApi.contactsDelete(body)
Name | Type | Description | Notes |
---|---|---|---|
id | [string] | ID of the record you are acting upon. | |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
Status code | Description |
---|---|
200 | Contact deleted |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
id: 'id_example'
}
try {
const { data } = await apideck.crm.contactsDelete(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: contactsOne
crmApi.contactsOne(body)
Name | Type | Description | Notes |
---|---|---|---|
id | [string] | ID of the record you are acting upon. | |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
fields | [string] | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city` In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. |
(optional) |
filter | ContactsFilter | Apply filters | (optional) |
Status code | Description |
---|---|
200 | Contact |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
id: 'id_example'
}
try {
const { data } = await apideck.crm.contactsOne(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: contactsUpdate
crmApi.contactsUpdate(body)
Name | Type | Description | Notes |
---|---|---|---|
contact | Contact | ||
id | [string] | ID of the record you are acting upon. | |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
Status code | Description |
---|---|
200 | Contact updated |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
id: 'id_example',
contact: {
name: 'Elon Musk',
owner_id: '54321',
type: 'personal',
company_id: '23456',
company_name: '23456',
lead_id: '34567',
first_name: 'Elon',
middle_name: 'D.',
last_name: 'Musk',
prefix: 'Mr.',
suffix: 'PhD',
title: 'CEO',
department: 'Engineering',
language: 'EN',
gender: 'female',
birthday: '2000-08-12',
image: 'https://unavatar.io/elon-musk',
photo_url: 'https://unavatar.io/elon-musk',
lead_source: 'Cold Call',
fax: '+12129876543',
description: 'Internal champion',
current_balance: 10.5,
status: 'open',
active: true,
websites: [
{
id: '12345',
url: 'http://example.com',
type: 'primary'
}
],
addresses: [
{
id: '123',
type: 'primary',
string: '25 Spring Street, Blackburn, VIC 3130',
name: 'HQ US',
line1: 'Main street',
line2: 'apt #',
line3: 'Suite #',
line4: 'delivery instructions',
street_number: '25',
city: 'San Francisco',
state: 'CA',
postal_code: '94104',
country: 'US',
latitude: '40.759211',
longitude: '-73.984638',
county: 'Santa Clara',
contact_name: 'Elon Musk',
salutation: 'Mr',
phone_number: '111-111-1111',
fax: '122-111-1111',
email: 'elon@musk.com',
website: 'https://elonmusk.com',
notes: 'Address notes or delivery instructions.',
row_version: '1-12345'
}
],
social_links: [
{
id: '12345',
url: 'https://www.twitter.com/apideck',
type: 'twitter'
}
],
phone_numbers: [
{
id: '12345',
country_code: '1',
area_code: '323',
number: '111-111-1111',
extension: '105',
type: 'primary'
}
],
emails: [
{
id: '123',
email: 'elon@musk.com',
type: 'primary'
}
],
email_domain: 'gmail.com',
custom_fields: [
{
id: '2389328923893298',
name: 'employee_level',
description: 'Employee Level',
value: 'Uses Salesforce and Marketo'
}
],
tags: [
'New'
],
opportunity_ids: [
'12345'
],
pass_through: [
{
service_id: 'string',
operation_id: 'string',
extend_object: {},
extend_paths: [
{
path: '$.nested.property',
value: [Object]
}
]
}
]
}
}
try {
const { data } = await apideck.crm.contactsUpdate(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: leadsAdd
crmApi.leadsAdd(body)
Name | Type | Description | Notes |
---|---|---|---|
lead | Lead | ||
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
Status code | Description |
---|---|
201 | Lead created |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
lead: {
name: 'Elon Musk',
company_name: 'Spacex',
owner_id: '54321',
owner_name: 'John Doe',
company_id: '2',
lead_id: '2',
lead_source: 'Cold Call',
first_name: 'Elon',
last_name: 'Musk',
description: 'A thinker',
prefix: 'Sir',
title: 'CEO',
language: 'EN',
status: 'New',
monetary_amount: 75000,
currency: 'USD',
fax: '+12129876543',
websites: [
{
id: '12345',
url: 'http://example.com',
type: 'primary'
}
],
addresses: [
{
id: '123',
type: 'primary',
string: '25 Spring Street, Blackburn, VIC 3130',
name: 'HQ US',
line1: 'Main street',
line2: 'apt #',
line3: 'Suite #',
line4: 'delivery instructions',
street_number: '25',
city: 'San Francisco',
state: 'CA',
postal_code: '94104',
country: 'US',
latitude: '40.759211',
longitude: '-73.984638',
county: 'Santa Clara',
contact_name: 'Elon Musk',
salutation: 'Mr',
phone_number: '111-111-1111',
fax: '122-111-1111',
email: 'elon@musk.com',
website: 'https://elonmusk.com',
notes: 'Address notes or delivery instructions.',
row_version: '1-12345'
}
],
social_links: [
{
id: '12345',
url: 'https://www.twitter.com/apideck',
type: 'twitter'
}
],
phone_numbers: [
{
id: '12345',
country_code: '1',
area_code: '323',
number: '111-111-1111',
extension: '105',
type: 'primary'
}
],
emails: [
{
id: '123',
email: 'elon@musk.com',
type: 'primary'
}
],
custom_fields: [
{
id: '2389328923893298',
name: 'employee_level',
description: 'Employee Level',
value: 'Uses Salesforce and Marketo'
}
],
tags: [
'New'
],
pass_through: [
{
service_id: 'string',
operation_id: 'string',
extend_object: {},
extend_paths: [
{
path: '$.nested.property',
value: [Object]
}
]
}
]
}
}
try {
const { data } = await apideck.crm.leadsAdd(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: leadsAll
crmApi.leadsAll(body)
Name | Type | Description | Notes |
---|---|---|---|
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
cursor | [string] | Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. | (optional) |
limit | [number] | Number of results to return. Minimum 1, Maximum 200, Default 20 | (optional) defaults to 20 |
filter | LeadsFilter | Apply filters | (optional) |
sort | LeadsSort | Apply sorting | (optional) |
passThrough | PassThroughQuery | Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads | (optional) |
fields | [string] | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city` In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. |
(optional) |
Status code | Description |
---|---|
200 | Leads |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {}
try {
const { data } = await apideck.crm.leadsAll(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: leadsDelete
crmApi.leadsDelete(body)
Name | Type | Description | Notes |
---|---|---|---|
id | [string] | ID of the record you are acting upon. | |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
Status code | Description |
---|---|
200 | Lead deleted |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
id: 'id_example'
}
try {
const { data } = await apideck.crm.leadsDelete(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: leadsOne
crmApi.leadsOne(body)
Name | Type | Description | Notes |
---|---|---|---|
id | [string] | ID of the record you are acting upon. | |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
fields | [string] | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city` In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. |
(optional) |
Status code | Description |
---|---|
200 | Lead |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
id: 'id_example'
}
try {
const { data } = await apideck.crm.leadsOne(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: leadsUpdate
crmApi.leadsUpdate(body)
Name | Type | Description | Notes |
---|---|---|---|
lead | Lead | ||
id | [string] | ID of the record you are acting upon. | |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
Status code | Description |
---|---|
200 | Lead updated |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
id: 'id_example',
lead: {
name: 'Elon Musk',
company_name: 'Spacex',
owner_id: '54321',
owner_name: 'John Doe',
company_id: '2',
lead_id: '2',
lead_source: 'Cold Call',
first_name: 'Elon',
last_name: 'Musk',
description: 'A thinker',
prefix: 'Sir',
title: 'CEO',
language: 'EN',
status: 'New',
monetary_amount: 75000,
currency: 'USD',
fax: '+12129876543',
websites: [
{
id: '12345',
url: 'http://example.com',
type: 'primary'
}
],
addresses: [
{
id: '123',
type: 'primary',
string: '25 Spring Street, Blackburn, VIC 3130',
name: 'HQ US',
line1: 'Main street',
line2: 'apt #',
line3: 'Suite #',
line4: 'delivery instructions',
street_number: '25',
city: 'San Francisco',
state: 'CA',
postal_code: '94104',
country: 'US',
latitude: '40.759211',
longitude: '-73.984638',
county: 'Santa Clara',
contact_name: 'Elon Musk',
salutation: 'Mr',
phone_number: '111-111-1111',
fax: '122-111-1111',
email: 'elon@musk.com',
website: 'https://elonmusk.com',
notes: 'Address notes or delivery instructions.',
row_version: '1-12345'
}
],
social_links: [
{
id: '12345',
url: 'https://www.twitter.com/apideck',
type: 'twitter'
}
],
phone_numbers: [
{
id: '12345',
country_code: '1',
area_code: '323',
number: '111-111-1111',
extension: '105',
type: 'primary'
}
],
emails: [
{
id: '123',
email: 'elon@musk.com',
type: 'primary'
}
],
custom_fields: [
{
id: '2389328923893298',
name: 'employee_level',
description: 'Employee Level',
value: 'Uses Salesforce and Marketo'
}
],
tags: [
'New'
],
pass_through: [
{
service_id: 'string',
operation_id: 'string',
extend_object: {},
extend_paths: [
{
path: '$.nested.property',
value: [Object]
}
]
}
]
}
}
try {
const { data } = await apideck.crm.leadsUpdate(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: notesAdd
crmApi.notesAdd(body)
Name | Type | Description | Notes |
---|---|---|---|
note | Note | ||
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
Status code | Description |
---|---|
201 | Note created |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
note: {
title: 'Meeting Notes',
content: 'Office hours are 9AM-6PM',
owner_id: '12345',
contact_id: '12345',
company_id: '12345',
opportunity_id: '12345',
lead_id: '12345',
active: true,
pass_through: [
{
service_id: 'string',
operation_id: 'string',
extend_object: {},
extend_paths: [
{
path: '$.nested.property',
value: [Object]
}
]
}
]
}
}
try {
const { data } = await apideck.crm.notesAdd(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: notesAll
crmApi.notesAll(body)
Name | Type | Description | Notes |
---|---|---|---|
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
cursor | [string] | Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. | (optional) |
limit | [number] | Number of results to return. Minimum 1, Maximum 200, Default 20 | (optional) defaults to 20 |
passThrough | PassThroughQuery | Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads | (optional) |
fields | [string] | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city` In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. |
(optional) |
Status code | Description |
---|---|
200 | Notes |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {}
try {
const { data } = await apideck.crm.notesAll(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: notesDelete
crmApi.notesDelete(body)
Name | Type | Description | Notes |
---|---|---|---|
id | [string] | ID of the record you are acting upon. | |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
Status code | Description |
---|---|
200 | Note deleted |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
id: 'id_example'
}
try {
const { data } = await apideck.crm.notesDelete(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: notesOne
crmApi.notesOne(body)
Name | Type | Description | Notes |
---|---|---|---|
id | [string] | ID of the record you are acting upon. | |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
fields | [string] | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city` In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. |
(optional) |
Status code | Description |
---|---|
200 | Note |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
id: 'id_example'
}
try {
const { data } = await apideck.crm.notesOne(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: notesUpdate
crmApi.notesUpdate(body)
Name | Type | Description | Notes |
---|---|---|---|
note | Note | ||
id | [string] | ID of the record you are acting upon. | |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
Status code | Description |
---|---|
200 | Note updated |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
id: 'id_example',
note: {
title: 'Meeting Notes',
content: 'Office hours are 9AM-6PM',
owner_id: '12345',
contact_id: '12345',
company_id: '12345',
opportunity_id: '12345',
lead_id: '12345',
active: true,
pass_through: [
{
service_id: 'string',
operation_id: 'string',
extend_object: {},
extend_paths: [
{
path: '$.nested.property',
value: [Object]
}
]
}
]
}
}
try {
const { data } = await apideck.crm.notesUpdate(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: opportunitiesAdd
crmApi.opportunitiesAdd(body)
Name | Type | Description | Notes |
---|---|---|---|
opportunity | Opportunity | ||
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
Status code | Description |
---|---|
201 | Opportunity created |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
opportunity: {
title: 'New Rocket',
primary_contact_id: '12345',
description: 'Opportunities are created for People and Companies that are interested in buying your products or services. Create Opportunities for People and Companies to move them through one of your Pipelines.',
type: 'Existing Customer - Upgrade',
monetary_amount: 75000,
currency: 'USD',
win_probability: 40,
close_date: '2020-10-30',
loss_reason_id: '12345',
loss_reason: 'No budget',
won_reason_id: '12345',
won_reason: 'Best pitch',
pipeline_id: '12345',
pipeline_stage_id: '12345',
source_id: '12345',
lead_id: '12345',
lead_source: 'Website',
contact_id: '12345',
contact_ids: [
'12345'
],
company_id: '12345',
company_name: 'Copper',
owner_id: '12345',
priority: 'None',
status: 'Open',
status_id: '12345',
tags: [
'New'
],
custom_fields: [
{
id: '2389328923893298',
name: 'employee_level',
description: 'Employee Level',
value: 'Uses Salesforce and Marketo'
}
],
stage_last_changed_at: '2020-09-30T07:43:32.000Z',
pass_through: [
{
service_id: 'string',
operation_id: 'string',
extend_object: {},
extend_paths: [
{
path: '$.nested.property',
value: [Object]
}
]
}
]
}
}
try {
const { data } = await apideck.crm.opportunitiesAdd(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: opportunitiesAll
crmApi.opportunitiesAll(body)
Name | Type | Description | Notes |
---|---|---|---|
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
cursor | [string] | Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. | (optional) |
limit | [number] | Number of results to return. Minimum 1, Maximum 200, Default 20 | (optional) defaults to 20 |
filter | OpportunitiesFilter | Apply filters | (optional) |
sort | OpportunitiesSort | Apply sorting | (optional) |
passThrough | PassThroughQuery | Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads | (optional) |
fields | [string] | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city` In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. |
(optional) |
Status code | Description |
---|---|
200 | Opportunities |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {}
try {
const { data } = await apideck.crm.opportunitiesAll(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: opportunitiesDelete
crmApi.opportunitiesDelete(body)
Name | Type | Description | Notes |
---|---|---|---|
id | [string] | ID of the record you are acting upon. | |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
Status code | Description |
---|---|
200 | Opportunity deleted |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
id: 'id_example'
}
try {
const { data } = await apideck.crm.opportunitiesDelete(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: opportunitiesOne
crmApi.opportunitiesOne(body)
Name | Type | Description | Notes |
---|---|---|---|
id | [string] | ID of the record you are acting upon. | |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
fields | [string] | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city` In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. |
(optional) |
Status code | Description |
---|---|
200 | Opportunity |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
id: 'id_example'
}
try {
const { data } = await apideck.crm.opportunitiesOne(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: opportunitiesUpdate
crmApi.opportunitiesUpdate(body)
Name | Type | Description | Notes |
---|---|---|---|
opportunity | Opportunity | ||
id | [string] | ID of the record you are acting upon. | |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
Status code | Description |
---|---|
200 | Opportunity updated |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
id: 'id_example',
opportunity: {
title: 'New Rocket',
primary_contact_id: '12345',
description: 'Opportunities are created for People and Companies that are interested in buying your products or services. Create Opportunities for People and Companies to move them through one of your Pipelines.',
type: 'Existing Customer - Upgrade',
monetary_amount: 75000,
currency: 'USD',
win_probability: 40,
close_date: '2020-10-30',
loss_reason_id: '12345',
loss_reason: 'No budget',
won_reason_id: '12345',
won_reason: 'Best pitch',
pipeline_id: '12345',
pipeline_stage_id: '12345',
source_id: '12345',
lead_id: '12345',
lead_source: 'Website',
contact_id: '12345',
contact_ids: [
'12345'
],
company_id: '12345',
company_name: 'Copper',
owner_id: '12345',
priority: 'None',
status: 'Open',
status_id: '12345',
tags: [
'New'
],
custom_fields: [
{
id: '2389328923893298',
name: 'employee_level',
description: 'Employee Level',
value: 'Uses Salesforce and Marketo'
}
],
stage_last_changed_at: '2020-09-30T07:43:32.000Z',
pass_through: [
{
service_id: 'string',
operation_id: 'string',
extend_object: {},
extend_paths: [
{
path: '$.nested.property',
value: [Object]
}
]
}
]
}
}
try {
const { data } = await apideck.crm.opportunitiesUpdate(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: pipelinesAdd
crmApi.pipelinesAdd(body)
Name | Type | Description | Notes |
---|---|---|---|
pipeline | Pipeline | ||
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
Status code | Description |
---|---|
201 | Pipeline created |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
pipeline: {
id: 'default',
name: 'Sales Pipeline',
currency: 'USD',
archived: false,
active: false,
display_order: 1,
win_probability_enabled: true,
stages: [
{
name: 'Contract Sent',
value: 'CONTRACT_SENT',
win_probability: 50,
display_order: 1
}
],
pass_through: [
{
service_id: 'string',
operation_id: 'string',
extend_object: {},
extend_paths: [
{
path: '$.nested.property',
value: [Object]
}
]
}
]
}
}
try {
const { data } = await apideck.crm.pipelinesAdd(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: pipelinesAll
crmApi.pipelinesAll(body)
Name | Type | Description | Notes |
---|---|---|---|
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
cursor | [string] | Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. | (optional) |
limit | [number] | Number of results to return. Minimum 1, Maximum 200, Default 20 | (optional) defaults to 20 |
passThrough | PassThroughQuery | Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads | (optional) |
fields | [string] | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city` In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. |
(optional) |
Status code | Description |
---|---|
200 | Pipelines |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {}
try {
const { data } = await apideck.crm.pipelinesAll(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: pipelinesDelete
crmApi.pipelinesDelete(body)
Name | Type | Description | Notes |
---|---|---|---|
id | [string] | ID of the record you are acting upon. | |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
Status code | Description |
---|---|
200 | Pipeline deleted |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
id: 'id_example'
}
try {
const { data } = await apideck.crm.pipelinesDelete(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: pipelinesOne
crmApi.pipelinesOne(body)
Name | Type | Description | Notes |
---|---|---|---|
id | [string] | ID of the record you are acting upon. | |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
fields | [string] | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city` In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. |
(optional) |
Status code | Description |
---|---|
200 | Pipeline |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
id: 'id_example'
}
try {
const { data } = await apideck.crm.pipelinesOne(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: pipelinesUpdate
crmApi.pipelinesUpdate(body)
Name | Type | Description | Notes |
---|---|---|---|
pipeline | Pipeline | ||
id | [string] | ID of the record you are acting upon. | |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
Status code | Description |
---|---|
200 | Pipeline updated |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
id: 'id_example',
pipeline: {
id: 'default',
name: 'Sales Pipeline',
currency: 'USD',
archived: false,
active: false,
display_order: 1,
win_probability_enabled: true,
stages: [
{
name: 'Contract Sent',
value: 'CONTRACT_SENT',
win_probability: 50,
display_order: 1
}
],
pass_through: [
{
service_id: 'string',
operation_id: 'string',
extend_object: {},
extend_paths: [
{
path: '$.nested.property',
value: [Object]
}
]
}
]
}
}
try {
const { data } = await apideck.crm.pipelinesUpdate(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: usersAdd
crmApi.usersAdd(body)
Name | Type | Description | Notes |
---|---|---|---|
user | User | ||
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
Status code | Description |
---|---|
201 | User created |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
user: {
parent_id: '54321',
username: 'masterofcoin',
first_name: 'Elon',
last_name: 'Musk',
title: 'CEO',
division: 'Europe',
department: 'R&D',
company_name: 'SpaceX',
employee_number: '123456-AB',
description: 'A description',
image: 'https://logo.clearbit.com/spacex.com?s=128',
language: 'EN',
status: 'active',
password: 'supersecretpassword',
addresses: [
{
id: '123',
type: 'primary',
string: '25 Spring Street, Blackburn, VIC 3130',
name: 'HQ US',
line1: 'Main street',
line2: 'apt #',
line3: 'Suite #',
line4: 'delivery instructions',
street_number: '25',
city: 'San Francisco',
state: 'CA',
postal_code: '94104',
country: 'US',
latitude: '40.759211',
longitude: '-73.984638',
county: 'Santa Clara',
contact_name: 'Elon Musk',
salutation: 'Mr',
phone_number: '111-111-1111',
fax: '122-111-1111',
email: 'elon@musk.com',
website: 'https://elonmusk.com',
notes: 'Address notes or delivery instructions.',
row_version: '1-12345'
}
],
phone_numbers: [
{
id: '12345',
country_code: '1',
area_code: '323',
number: '111-111-1111',
extension: '105',
type: 'primary'
}
],
emails: [
{
id: '123',
email: 'elon@musk.com',
type: 'primary'
}
],
pass_through: [
{
service_id: 'string',
operation_id: 'string',
extend_object: {},
extend_paths: [
{
path: '$.nested.property',
value: [Object]
}
]
}
]
}
}
try {
const { data } = await apideck.crm.usersAdd(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: usersAll
crmApi.usersAll(body)
Name | Type | Description | Notes |
---|---|---|---|
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
cursor | [string] | Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. | (optional) |
limit | [number] | Number of results to return. Minimum 1, Maximum 200, Default 20 | (optional) defaults to 20 |
passThrough | PassThroughQuery | Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads | (optional) |
fields | [string] | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city` In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. |
(optional) |
Status code | Description |
---|---|
200 | Users |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {}
try {
const { data } = await apideck.crm.usersAll(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: usersDelete
crmApi.usersDelete(body)
Name | Type | Description | Notes |
---|---|---|---|
id | [string] | ID of the record you are acting upon. | |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
Status code | Description |
---|---|
200 | User deleted |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
id: 'id_example'
}
try {
const { data } = await apideck.crm.usersDelete(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: usersOne
crmApi.usersOne(body)
Name | Type | Description | Notes |
---|---|---|---|
id | [string] | ID of the record you are acting upon. | |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
fields | [string] | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city` In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. |
(optional) |
Status code | Description |
---|---|
200 | User |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
id: 'id_example'
}
try {
const { data } = await apideck.crm.usersOne(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}
[Back to top] [Back to API list] [Back to README]
Method: usersUpdate
crmApi.usersUpdate(body)
Name | Type | Description | Notes |
---|---|---|---|
user | User | ||
id | [string] | ID of the record you are acting upon. | |
consumerId | [string] | ID of the consumer which you want to get or push data from | (optional) |
appId | [string] | The ID of your Unify application | (optional) |
serviceId | [string] | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | (optional) |
raw | [boolean] | Include raw response. Mostly used for debugging purposes | (optional) defaults to false |
Status code | Description |
---|---|
200 | User updated |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
404 | The specified resource was not found |
422 | Unprocessable |
4/5xx | Unexpected error |
import { Apideck } from '@apideck/node';
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});
const params = {
id: 'id_example',
user: {
parent_id: '54321',
username: 'masterofcoin',
first_name: 'Elon',
last_name: 'Musk',
title: 'CEO',
division: 'Europe',
department: 'R&D',
company_name: 'SpaceX',
employee_number: '123456-AB',
description: 'A description',
image: 'https://logo.clearbit.com/spacex.com?s=128',
language: 'EN',
status: 'active',
password: 'supersecretpassword',
addresses: [
{
id: '123',
type: 'primary',
string: '25 Spring Street, Blackburn, VIC 3130',
name: 'HQ US',
line1: 'Main street',
line2: 'apt #',
line3: 'Suite #',
line4: 'delivery instructions',
street_number: '25',
city: 'San Francisco',
state: 'CA',
postal_code: '94104',
country: 'US',
latitude: '40.759211',
longitude: '-73.984638',
county: 'Santa Clara',
contact_name: 'Elon Musk',
salutation: 'Mr',
phone_number: '111-111-1111',
fax: '122-111-1111',
email: 'elon@musk.com',
website: 'https://elonmusk.com',
notes: 'Address notes or delivery instructions.',
row_version: '1-12345'
}
],
phone_numbers: [
{
id: '12345',
country_code: '1',
area_code: '323',
number: '111-111-1111',
extension: '105',
type: 'primary'
}
],
emails: [
{
id: '123',
email: 'elon@musk.com',
type: 'primary'
}
],
pass_through: [
{
service_id: 'string',
operation_id: 'string',
extend_object: {},
extend_paths: [
{
path: '$.nested.property',
value: [Object]
}
]
}
]
}
}
try {
const { data } = await apideck.crm.usersUpdate(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}