Customer API

Customer API

The Customer API provides comprehensive customer data management capabilities, including CRUD operations, advanced search functionality, and CRM field management. All operations are organized by customer prefix (tenant).


List Customer Prefixes

GET /Advanced Dialer/api/Customer/listprefixes

Returns all available customer prefixes (tenants) in the system. Use this to identify which database "partition" you should be querying.

Example Request

curl --request GET \
     --url 'https://api.talkdeskapp.com/Advanced Dialer/api/Customer/listprefixes' \
     --header 'Ocp-Apim-Subscription-Key: YOUR_API_KEY'

Get Customer Field Definitions

GET /Advanced Dialer/api/Customer/{prefix}/definitions

Returns metadata for customer fields in a specific prefix. This is essential for understanding which fields are required, their data types, and any character limits before performing imports.

Path Parameters

ParameterTypeDescription
prefixstringThe customer prefix (e.g., SALES, SUPPORT).

Response Example

{
  "prefix": "SALES",
  "fields": [
    {
      "name": "Customer ID",
      "type": "String",
      "required": true,
      "primaryKey": true
    },
    {
      "name": "Industry",
      "type": "Enumeration",
      "choices": ["Technology", "Healthcare", "Finance"]
    }
  ]
}

Get Customer

GET /Advanced Dialer/api/Customer/{prefix}/{id}

Retrieves a specific customer record by their unique ID within a given prefix.

Path Parameters

ParameterTypeDescription
prefixstringThe customer prefix.
idstringThe unique ID of the customer (e.g., CUST_001).
curl --request GET \
     --url 'https://api.talkdeskapp.com/Advanced Dialer/api/Customer/SALES/CUST_001' \
     --header 'Ocp-Apim-Subscription-Key: YOUR_API_KEY'

Search Customers (Basic)

POST /Advanced Dialer/api/Customer/{prefix}/search

Performs a simple search across customer fields.

Request Body

{
  "crmFields": {
    "Company Name": "Acme",
    "Industry": "Technology",
    "Active": true
  }
}

Advanced Customer Search

POST /Advanced Dialer/api/Customer/{prefix}/searchentities

Performs advanced search with complex criteria, groups, and sorting.

Query Parameters

ParameterTypeDescription
maximumResultsintegerLimit the number of returned records.
sortColumnstringField to sort by.

Request Body Example

{
  "groups": [
    {
      "conditions": [
        {
          "name": "Annual Revenue",
          "value": "1000000",
          "searchStyle": "GreaterThan"
        }
      ]
    }
  ]
}

Insert/Update Customers

POST /Advanced Dialer/api/Customer/insertupdate

Creates new customers or updates existing ones in batch. If the Customer ID (Entity ID) already exists, the record is updated; otherwise, a new record is created.

Request Body Example

{
  "prefix": "SALES",
  "customers": [
    {
      "properties": [
        { "name": "Customer ID", "value": "CUST_004", "isEntityId": true },
        { "name": "Company Name", "value": "New Tech Solutions" }
      ]
    }
  ]
}

Get Customer History

GET /Advanced Dialer/api/Customer/{prefix}/{id}/history

Retrieves interaction history (calls, emails, notes) for a specific customer.

Response Example

{
  "customerId": "CUST_001",
  "history": [
    {
      "type": "Call",
      "timestamp": "2024-03-15T14:30:00Z",
      "agent": "john.smith",
      "outcome": "Sale"
    }
  ]
}