Black Friday Black Friday: các gói LetsBot mới tiết kiệm đến 60% — chỉ đến 30 tháng 11. Xem các gói Xem các gói
LetsBot Menu
Bắt đầu Tiếng Việt Ngôn ngữ

Meta Tech Provider đã được xác minh Công ty đăng ký tại Vương quốc Anh

Ngôn ngữ

CRM · Endpoint API

GET /api/v1/crm/objects/{key}/schema Mới

Custom object fields, filters and sorts

The object plus the lists-engine catalogue of its records: every field with its type, whether it can be filtered or sorted, and the filter operators.

The object plus the lists-engine catalogue of its records: every field with its type, whether it can be filtered or sorted, and the filter operators. Scope: crm.

Ví dụ yêu cầu

curl -G "https://your-workspace.letsbot.net/api/v1/crm/objects/co_projects/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/objects/co_projects/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/objects/co_projects/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/objects/co_projects/schema",
    headers={
        "X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
        "Accept": "application/json",
    },
)

print(response.json())

Phản hồi

Schema200
{
  "success": true,
  "data": {
    "key": "co_projects",
    "label_singular": {
      "ar": "مشروع",
      "en": "Project"
    },
    "label_plural": {
      "ar": "مشاريع",
      "en": "Projects"
    },
    "primary_field": "name",
    "fields": [
      {
        "key": "title",
        "label": "Project name",
        "type": "text",
        "filterable": true,
        "sortable": true,
        "operators": [
          "contains",
          "not_contains",
          "eq",
          "is_empty",
          "is_not_empty"
        ],
        "options": []
      },
      {
        "key": "owner",
        "label": "Owner",
        "type": "user",
        "filterable": true,
        "sortable": false,
        "operators": [
          "in",
          "not_in",
          "is_empty",
          "is_not_empty"
        ],
        "options": [
          {
            "value": 3,
            "label": "Sara Ahmed"
          },
          {
            "value": 5,
            "label": "Omar Ali"
          }
        ]
      },
      {
        "key": "updated_at",
        "label": "Updated",
        "type": "date",
        "filterable": true,
        "sortable": true,
        "operators": [
          "within_days",
          "not_within_days",
          "older_than_days",
          "before",
          "after",
          "is_empty",
          "is_not_empty"
        ],
        "options": []
      },
      {
        "key": "created_at",
        "label": "Created",
        "type": "date",
        "filterable": true,
        "sortable": true,
        "operators": [
          "within_days",
          "not_within_days",
          "older_than_days",
          "before",
          "after",
          "is_empty",
          "is_not_empty"
        ],
        "options": []
      },
      {
        "key": "cf:budget",
        "label": "Budget",
        "type": "number",
        "filterable": true,
        "sortable": true,
        "operators": [
          "eq",
          "gt",
          "lt",
          "is_empty",
          "is_not_empty"
        ],
        "options": []
      },
      {
        "key": "cf:status",
        "label": "Status",
        "type": "enum",
        "filterable": true,
        "sortable": false,
        "operators": [
          "in",
          "not_in",
          "is_empty",
          "is_not_empty"
        ],
        "options": [
          {
            "value": "planned",
            "label": "Planned"
          },
          {
            "value": "active",
            "label": "Active"
          }
        ]
      },
      {
        "key": "cf:starts_on",
        "label": "Starts",
        "type": "date",
        "filterable": true,
        "sortable": false,
        "operators": [
          "within_days",
          "not_within_days",
          "older_than_days",
          "before",
          "after",
          "is_empty",
          "is_not_empty"
        ],
        "options": []
      },
      {
        "key": "cf:ends_on",
        "label": "Ends",
        "type": "date",
        "filterable": true,
        "sortable": false,
        "operators": [
          "within_days",
          "not_within_days",
          "older_than_days",
          "before",
          "after",
          "is_empty",
          "is_not_empty"
        ],
        "options": []
      }
    ],
    "sorts": [
      "title",
      "updated_at",
      "created_at",
      "cf:budget"
    ],
    "default_sort": {
      "key": "updated_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.