LetsBot Menu
Bắt đầu Tiếng Việt Ngôn ngữ

Đối tác kinh doanh của Meta Công ty đăng ký tại Vương quốc Anh

Ngôn ngữ

CRM · Endpoint API

GET /api/v1/crm/contacts/schema Mới

Contact fields, filters and sorts

The lists-engine catalogue for contact lists: every field with its type, whether it can be filtered or sorted, its filter operators and options (for e…

The lists-engine catalogue for contact lists: every field with its type, whether it can be filtered or sorted, its filter operators and options (for example the lifecycle stage ids). Scope: crm.

Ví dụ yêu cầu

curl -G "https://your-workspace.letsbot.net/api/v1/crm/contacts/schema" \
  -H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
  -H "Accept: application/json"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/contacts/schema", {
  method: "GET",
  headers: {
    "X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
    "Accept": "application/json",
  },
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/contacts/schema');

curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
        'Accept: application/json',
    ],
]);

$data = json_decode(curl_exec($ch), true);
curl_close($ch);

print_r($data);
import requests

response = requests.request(
    "GET",
    "https://your-workspace.letsbot.net/api/v1/crm/contacts/schema",
    headers={
        "X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
        "Accept": "application/json",
    },
)

print(response.json())

Phản hồi

Schema200
{
  "success": true,
  "data": {
    "fields": [
      {
        "key": "name",
        "label": "Name",
        "type": "text",
        "filterable": true,
        "sortable": true,
        "operators": [
          "contains",
          "is",
          "is_empty",
          "is_not_empty"
        ],
        "options": []
      },
      {
        "key": "email",
        "label": "Email",
        "type": "text",
        "filterable": true,
        "sortable": false,
        "operators": [
          "contains",
          "is",
          "is_empty",
          "is_not_empty"
        ],
        "options": []
      },
      {
        "key": "lifecycle",
        "label": "Lifecycle stage",
        "type": "select",
        "filterable": true,
        "sortable": true,
        "operators": [
          "is",
          "is_not"
        ],
        "options": [
          {
            "value": 1,
            "label": "Subscriber"
          },
          {
            "value": 2,
            "label": "Lead"
          },
          {
            "value": 3,
            "label": "Customer"
          }
        ]
      }
    ],
    "sorts": [
      "name",
      "created_at",
      "last_activity_at"
    ],
    "default_sort": {
      "key": "last_activity_at",
      "dir": "desc"
    }
  }
}

Sẵn sàng khi bạn sẵn sàng

Dùng thử endpoint này với số của bạn

API hoạt động trong thời gian dùng thử miễn phí. Tạo tài khoản, kết nối số WhatsApp và sao chép khóa của bạn tại API → Dữ liệu xác thực.