Customers

Customers endpoints for the Customer Support API Unified API

9.5.0
|Full reference

The Customers model

idstring

A unique identifier for an object.

company_namestring or null

The name of the company.

first_namestring or null

The first name of the person.

last_namestring or null

The last name of the person.

individualboolean or null
addressesobjects
Customers example
{}

List Customer Support Customers

get
https://unify.apideck.com/customer-support/customers

List Customer Support Customers

Authorizations:

Header parameters

x-apideck-consumer-idstring
required

ID of the consumer which you want to get or push data from

x-apideck-app-idstring
required

The ID of your Unify application

x-apideck-service-idstring

Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.

Query parameters

rawboolean
Default:false

Include raw response. Mostly used for debugging purposes

cursorstring or null

Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response.

limitinteger[ 1 .. 200 ]
Default:20

Number of results to return. Minimum 1, Maximum 200, Default 20

fieldsstring or null

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.

Responses

200CustomerSupportCustomers
400Bad Request
401Unauthorized
402Payment Required
404The specified resource was not found
422Unprocessable
Intercom
Intercom
Request
Kustomer
Kustomer
Request
Zendesk
Zendesk
Request

Request example

Node
import { Apideck } from '@apideck/node'

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
})

try {
  const { data } = await apideck.customerSupport.customersAll({})
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
}

Response example

{
  "status_code": 200,
  "status": "OK",
  "service": "kustomer",
  "resource": "customers",
  "operation": "all",
  "data": [
    {
      "id": "12345",
      "company_name": "SpaceX",
      "first_name": "Elon",
      "last_name": "Musk",
      "individual": true,
      "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",
          "row_version": "1-12345"
        }
      ],
      "notes": "Some notes about this customer",
      "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"
        }
      ],
      "tax_number": "US123945459",
      "currency": "USD",
      "bank_accounts": {
        "account_number": "123465",
        "account_name": "SPACEX LLC",
        "account_type": "credit_card",
        "iban": "CH2989144532982975332",
        "bic": "AUDSCHGGXXX",
        "bsb_number": "062-001",
        "branch_identifier": "001",
        "bank_code": "BNH",
        "currency": "USD"
      },
      "status": "active",
      "updated_by": "12345",
      "created_by": "12345",
      "updated_at": "2020-09-30T07:43:32.000Z",
      "created_at": "2020-09-30T07:43:32.000Z"
    }
  ],
  "meta": {
    "items_on_page": 50,
    "cursors": {
      "previous": "em9oby1jcm06OnBhZ2U6OjE=",
      "current": "em9oby1jcm06OnBhZ2U6OjI=",
      "next": "em9oby1jcm06OnBhZ2U6OjM="
    }
  },
  "links": {
    "previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D",
    "current": "https://unify.apideck.com/crm/companies",
    "next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM"
  }
}

Create Customer Support Customer

post
https://unify.apideck.com/customer-support/customers

Create Customer Support Customer

Authorizations:

Header parameters

x-apideck-consumer-idstring
required

ID of the consumer which you want to get or push data from

x-apideck-app-idstring
required

The ID of your Unify application

x-apideck-service-idstring

Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.

Query parameters

rawboolean
Default:false

Include raw response. Mostly used for debugging purposes

Request body schema

application/json
company_namestring or null

The name of the company.

first_namestring or null

The first name of the person.

last_namestring or null

The last name of the person.

individualboolean or null
addressesobjects
notesstring or null
phone_numbersobjects
emailsobjects
tax_numberstring or null
currencystring or null
Enum:UNKNOWN_CURRENCYAEDAFNALL

Indicates the associated currency for an amount of money. Values correspond to ISO 4217.

bank_accountsobject
statusstring or null
Enum:activearchivedgdpr-erasure-requestunknown

Customer status

Responses

201CustomerSupportCustomers
400Bad Request
401Unauthorized
402Payment Required
404The specified resource was not found
422Unprocessable
Intercom
Intercom
Request
Kustomer
Kustomer
Request
Zendesk
Zendesk
Request

Request example

{
  "company_name": "SpaceX",
  "first_name": "Elon",
  "last_name": "Musk",
  "individual": true,
  "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",
      "row_version": "1-12345"
    }
  ],
  "notes": "Some notes about this customer",
  "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"
    }
  ],
  "tax_number": "US123945459",
  "currency": "USD",
  "bank_accounts": {
    "account_number": "123465",
    "account_name": "SPACEX LLC",
    "account_type": "credit_card",
    "iban": "CH2989144532982975332",
    "bic": "AUDSCHGGXXX",
    "bsb_number": "062-001",
    "branch_identifier": "001",
    "bank_code": "BNH",
    "currency": "USD"
  },
  "status": "active"
}

Response example

{
  "status_code": 200,
  "status": "OK",
  "service": "kustomer",
  "resource": "customers",
  "operation": "add",
  "data": {
    "id": "12345"
  }
}

Get Customer Support Customer

get
https://unify.apideck.com/customer-support/customers/{id}

Get Customer Support Customer

Authorizations:

Path parameters

idstring
required

ID of the record you are acting upon.

Header parameters

x-apideck-consumer-idstring
required

ID of the consumer which you want to get or push data from

x-apideck-app-idstring
required

The ID of your Unify application

x-apideck-service-idstring

Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.

Query parameters

rawboolean
Default:false

Include raw response. Mostly used for debugging purposes

fieldsstring or null

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.

Responses

200CustomerSupportCustomers
400Bad Request
401Unauthorized
402Payment Required
404The specified resource was not found
422Unprocessable
Intercom
Intercom
Request
Kustomer
Kustomer
Request
Zendesk
Zendesk
Request

Request example

Node
import { Apideck } from '@apideck/node'

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
})

try {
  const { data } = await apideck.customerSupport.customersOne({
    id: 'id_example'
  })
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
}

Response example

{
  "status_code": 200,
  "status": "OK",
  "service": "kustomer",
  "resource": "customers",
  "operation": "one",
  "data": {
    "id": "12345",
    "company_name": "SpaceX",
    "first_name": "Elon",
    "last_name": "Musk",
    "individual": true,
    "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",
        "row_version": "1-12345"
      }
    ],
    "notes": "Some notes about this customer",
    "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"
      }
    ],
    "tax_number": "US123945459",
    "currency": "USD",
    "bank_accounts": {
      "account_number": "123465",
      "account_name": "SPACEX LLC",
      "account_type": "credit_card",
      "iban": "CH2989144532982975332",
      "bic": "AUDSCHGGXXX",
      "bsb_number": "062-001",
      "branch_identifier": "001",
      "bank_code": "BNH",
      "currency": "USD"
    },
    "status": "active",
    "updated_by": "12345",
    "created_by": "12345",
    "updated_at": "2020-09-30T07:43:32.000Z",
    "created_at": "2020-09-30T07:43:32.000Z"
  }
}

Update Customer Support Customer

patch
https://unify.apideck.com/customer-support/customers/{id}

Update Customer Support Customer

Authorizations:

Path parameters

idstring
required

ID of the record you are acting upon.

Header parameters

x-apideck-consumer-idstring
required

ID of the consumer which you want to get or push data from

x-apideck-app-idstring
required

The ID of your Unify application

x-apideck-service-idstring

Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.

Query parameters

rawboolean
Default:false

Include raw response. Mostly used for debugging purposes

Request body schema

application/json
company_namestring or null

The name of the company.

first_namestring or null

The first name of the person.

last_namestring or null

The last name of the person.

individualboolean or null
addressesobjects
notesstring or null
phone_numbersobjects
emailsobjects
tax_numberstring or null
currencystring or null
Enum:UNKNOWN_CURRENCYAEDAFNALL

Indicates the associated currency for an amount of money. Values correspond to ISO 4217.

bank_accountsobject
statusstring or null
Enum:activearchivedgdpr-erasure-requestunknown

Customer status

Responses

200CustomerSupportCustomers
400Bad Request
401Unauthorized
402Payment Required
404The specified resource was not found
422Unprocessable
Intercom
Intercom
Request
Kustomer
Kustomer
Request
Zendesk
Zendesk
Request

Request example

{
  "company_name": "SpaceX",
  "first_name": "Elon",
  "last_name": "Musk",
  "individual": true,
  "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",
      "row_version": "1-12345"
    }
  ],
  "notes": "Some notes about this customer",
  "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"
    }
  ],
  "tax_number": "US123945459",
  "currency": "USD",
  "bank_accounts": {
    "account_number": "123465",
    "account_name": "SPACEX LLC",
    "account_type": "credit_card",
    "iban": "CH2989144532982975332",
    "bic": "AUDSCHGGXXX",
    "bsb_number": "062-001",
    "branch_identifier": "001",
    "bank_code": "BNH",
    "currency": "USD"
  },
  "status": "active"
}

Response example

{
  "status_code": 200,
  "status": "OK",
  "service": "kustomer",
  "resource": "customers",
  "operation": "update",
  "data": {
    "id": "12345"
  }
}

Delete Customer Support Customer

delete
https://unify.apideck.com/customer-support/customers/{id}

Delete Customer Support Customer

Authorizations:

Path parameters

idstring
required

ID of the record you are acting upon.

Header parameters

x-apideck-consumer-idstring
required

ID of the consumer which you want to get or push data from

x-apideck-app-idstring
required

The ID of your Unify application

x-apideck-service-idstring

Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.

Query parameters

rawboolean
Default:false

Include raw response. Mostly used for debugging purposes

Responses

200CustomerSupportCustomers
400Bad Request
401Unauthorized
402Payment Required
404The specified resource was not found
422Unprocessable
Intercom
Intercom
Request
Kustomer
Kustomer
Request
Zendesk
Zendesk
Request

Request example

Node
import { Apideck } from '@apideck/node'

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
})

try {
  const { data } = await apideck.customerSupport.customersDelete({
    id: 'id_example'
  })
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
}

Response example

{
  "status_code": 200,
  "status": "OK",
  "service": "kustomer",
  "resource": "customers",
  "operation": "delete",
  "data": {
    "id": "12345"
  }
}