Skip to content

Call history

Qo'ng'iroqlar tarixi ma'lumotlarini olish

Index

Qo‘ng‘iroqlar tarixini olish (filter, sort va pagination bilan)

Endpoint

GET /call-history

Request:

Form

FieldTypeRequiredDefaultDescription
per_pageintegerNo20Sahifadagi yozuvlar soni (1–300)
sortstring (one of CallHistorySortList)NoidSaralash qoidasi.
Teskari saralash uchun - prefix qo'shilishi mumkin. Masalan: -id, -datetime
filterobjectNoFiltrlash
filter.srcstringNoFiltrlash: Qo‘ng‘iroq qilgan raqam
filter.dststringNoFiltrlash: Qo‘ng‘iroq qabul qilgan raqam
filter.external_numberstringNoTashqi raqam
filter.durationintegerNoQo‘ng‘iroq davomiyligi (soniyada)
filter.conversationintegerNoSuhbat davomiyligi (soniyada)
filter.typeinteger (one of CallHistoryFilterTypeList)NoQo‘ng‘iroq turi
filter.statusinteger (one of CallHistoryFilterStatusList)NoQo‘ng‘iroq holati
filter.fromdatetimeNoBoshlanish vaqti (Y-m-d H:i:s)
filter.todatetimeNoTugash vaqti (Y-m-d H:i:s)

Example

text
/call-history?sort=-id&filter[type]=2

Response:

FieldTypeDescription
dataobject (array of CallHistoryIndexResource)
linksobject
metaobject

Example

json
{
  "data": [
    {
      "id": 747,
      "call_id": "9b03293e-a0ea-4212-92d1-5848a41d4987",
      "date_time": "2026-01-13 17:54:36",
      "src": "100",
      "dst": "999995998",
      "external_number": "781130590",
      "duration": 23,
      "conversation": 8,
      "type": {
        "number": 2,
        "name": "Outgoing"
      },
      "status": {
        "number": 1,
        "name": "Answered"
      },
      "recorded_file_url": "https://api.dev.utel.uz/storage/monitor/2026/01/13/1768308876.2.wav",
      "integration": [
        {
          "id": 16,
          "call_history_id": 747,
          "integration_type": "amocrm",
          "status": "synced",
          "error_message": null,
          "created_at": "2026-01-13T12:55:02.000000Z",
          "updated_at": "2026-01-13T12:55:02.000000Z"
        }
      ]
    },
    {
      "id": 746,
      "call_id": "5fc4b6a0-7c83-430e-a2a8-304788efd376",
      "date_time": "2026-01-13 17:33:12",
      "src": "100",
      "dst": "101",
      "external_number": null,
      "duration": 2,
      "conversation": 0,
      "type": {
        "number": 3,
        "name": "Internal"
      },
      "status": {
        "number": 2,
        "name": "Not answered"
      },
      "recorded_file_url": "https://api.dev.utel.uz/storage/monitor/2026/01/13/1768307591.0.wav",
      "integration": []
    }
  ],
  "links": {
    "first": "https://api.dev.utel.uz/api/v1/call-history?page=1",
    "last": "https://api.dev.utel.uz/api/v1/call-history?page=50",
    "prev": null,
    "next": "https://api.dev.utel.uz/api/v1/call-history?page=2"
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 50,
    "links": [
      {
        "url": null,
        "label": "« Previous",
        "active": false
      },
      {
        "url": "https://api.dev.utel.uz/api/v1/call-history?page=1",
        "label": "1",
        "active": true
      },
      {
        "url": "https://api.dev.utel.uz/api/v1/call-history?page=2",
        "label": "2",
        "active": false
      },
      {
        "url": "https://api.dev.utel.uz/api/v1/call-history?page=3",
        "label": "3",
        "active": false
      },
      {
        "url": "https://api.dev.utel.uz/api/v1/call-history?page=4",
        "label": "4",
        "active": false
      },
      {
        "url": "https://api.dev.utel.uz/api/v1/call-history?page=5",
        "label": "5",
        "active": false
      },
      {
        "url": "https://api.dev.utel.uz/api/v1/call-history?page=6",
        "label": "6",
        "active": false
      },
      {
        "url": "https://api.dev.utel.uz/api/v1/call-history?page=7",
        "label": "7",
        "active": false
      },
      {
        "url": "https://api.dev.utel.uz/api/v1/call-history?page=8",
        "label": "8",
        "active": false
      },
      {
        "url": "https://api.dev.utel.uz/api/v1/call-history?page=9",
        "label": "9",
        "active": false
      },
      {
        "url": "https://api.dev.utel.uz/api/v1/call-history?page=10",
        "label": "10",
        "active": false
      },
      {
        "url": null,
        "label": "...",
        "active": false
      },
      {
        "url": "https://api.dev.utel.uz/api/v1/call-history?page=49",
        "label": "49",
        "active": false
      },
      {
        "url": "https://api.dev.utel.uz/api/v1/call-history?page=50",
        "label": "50",
        "active": false
      },
      {
        "url": "https://api.dev.utel.uz/api/v1/call-history?page=2",
        "label": "Next »",
        "active": false
      }
    ],
    "path": "https://api.dev.utel.uz/api/v1/call-history",
    "per_page": 15,
    "to": 15,
    "total": 747
  }
}