Ana içeriğe geç

Order List API (get-reports)

The get-reports endpoint returns the aggregate summary list of all SMS orders created within a given date range. For each order the response carries counters (total / delivered / undelivered / waiting), timestamps, and sender; per-recipient breakdown is not included. For recipient-level details, call get-report for the specific order.

This endpoint backs the Reports > Bulk SMS History screen in the panel. Typical use cases: dashboards, periodic analytics, queries like "list orders from the last week".

Prerequisite: enable API access in the panel

Before calling this endpoint, the Allow API access toggle must be on in your iletiMerkezi panel.

Location: panel.iletimerkezi.com > Settings > Security > Access Permissions

If it is off, every request returns 401: Üyelik bilgileri hatalı ("Authentication failed"). See authentication.md.

Endpoint

FieldValue
MethodPOST
URLhttps://api.iletimerkezi.com/v1/get-reports/json
Content-Typeapplication/json
AuthAPI Key + Hash (request.authentication)

Request

Schema

request
├─ authentication
│  ├─ key (string, required)
│  └─ hash (string, required)
└─ filter
   ├─ start (string, required), range start, format Y-m-d (e.g. 2026-04-01)
   ├─ end (string, required), range end, format Y-m-d
   └─ page (integer, optional), default 1

Range limit: the gap between start and end is at most 10 days. Longer periods require sequential calls (2026-04-01..2026-04-10, then 2026-04-11..2026-04-20, etc.). If the limit is exceeded the request returns 458: Tarih aralığı hatalı ("Invalid date range").

Full example

{
  "request": {
    "authentication": {
      "key": "API_KEY",
      "hash": "API_HASH"
    },
    "filter": {
      "start": "2026-04-22",
      "end": "2026-04-29",
      "page": 1
    }
  }
}

Response

Success (200)

{
  "response": {
    "status": {
      "code": 200,
      "message": "İşlem başarılı"
    },
    "count": 2,
    "orders": [
      {
        "id": 312988299,
        "status": 114,
        "total": 1,
        "delivered": 1,
        "undelivered": 0,
        "waiting": 0,
        "submitAt": "2026-04-29 21:49:42",
        "sendAt": "2026-04-29 21:49:42",
        "sender": "eMarka Test"
      },
      {
        "id": 313003818,
        "status": 114,
        "total": 1,
        "delivered": 1,
        "undelivered": 0,
        "waiting": 0,
        "submitAt": "2026-04-30 06:57:45",
        "sendAt": "2026-04-30 06:57:45",
        "sender": "eMarka Test"
      }
    ]
  }
}

İşlem başarılı means "Request successful" in Turkish.

Fields:

  • response.count (integer): Total number of orders in the date range (independent of pagination). It is not the count of orders on the current page.
  • response.orders[] (array): List of orders. Each element:
    • id (integer): Order ID. Use it as input to get-report for the detailed per-recipient view.
    • status (integer): Overall order status (113 / 114 / 115).
    • total (integer): Total number of messages in the order.
    • delivered (integer): Messages confirmed delivered.
    • undelivered (integer): Messages that could not be delivered.
    • waiting (integer): Messages still in the queue.
    • submitAt (string): Timestamp when the API received the order, format YYYY-MM-DD HH:MM:SS.
    • sendAt (string): Timestamp when the order was handed to the carrier. Equals submitAt unless the order was scheduled.
    • sender (string): Sender ID used for the order.

The per-recipient breakdown (message[] array with number and per-message status) is not present in this response. If you need it, call get-report per order; for multi-order dashboards this endpoint is more efficient (one request = N order summaries).

Empty list (200)

If the date range contains no orders at all, both count and orders are empty:

{
  "response": {
    "status": { "code": 200, "message": "İşlem başarılı" },
    "count": 0,
    "orders": []
  }
}

If you walk past the last page during pagination, count keeps the total value while orders becomes empty:

{
  "response": {
    "status": { "code": 200, "message": "İşlem başarılı" },
    "count": 5,
    "orders": []
  }
}

So use orders.length === 0 as the pagination terminator, not count.

Order status codes (order.status)

CodeMeaning
113Order delivery in progress
114Order delivery completed
115Order could not be delivered

Error responses

401: Üyelik bilgileri hatalı ("Authentication failed")

See authentication.md.

458: Tarih aralığı hatalı ("Invalid date range")

Two possible causes:

  1. start or end is not in Y-m-d format (e.g. 2026-04-22).
  2. The gap between start and end is longer than 10 days.

To cover a wider period, split the range into 10-day windows and loop.

Other error codes

For 400, 404: see error-codes.md.

Code samples

cURL

curl -X POST 'https://api.iletimerkezi.com/v1/get-reports/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "request": {
      "authentication": {
        "key": "'"$ILETIMERKEZI_API_KEY"'",
        "hash": "'"$ILETIMERKEZI_API_HASH"'"
      },
      "filter": { "start": "2026-04-22", "end": "2026-04-29", "page": 1 }
    }
  }'

Common pitfalls

  • get-reports is not get-report. One letter apart, very different behavior. get-report (singular) returns per-recipient detail for one order; get-reports (plural) returns aggregate summaries for N orders in a date range. Per-recipient data lives only in the singular endpoint.
  • 10-day cap is non-negotiable. Monthly or campaign-period reports require a loop. A 30-day single request returns 458. Split the range client-side into 10-day windows and call sequentially.
  • Strict date format. Y-m-d (e.g. 2026-04-22) is required. Forms like 22/04/2026, 22-04-2026, or 2026/04/22 are rejected. In JavaScript, date.toISOString().slice(0, 10) is safe.
  • count is the total, not the current page. response.count is the total number of orders in the date range, independent of pagination. It does not change as you increment page. When you walk past the last page orders becomes empty but count stays at the total, so use orders.length === 0 as the loop terminator. A while(count > 0) loop runs forever.
  • waiting > 0 means the report is provisional. Recently submitted orders may still be in the carrier queue. For final figures either re-poll later or rely on webhooks for delta updates.
  • status: 114 does not mean "all delivered". It only means "the send pipeline finished". Always check delivered and undelivered for the actual outcome, same semantic as get-report.
  • No recipient numbers, but sender is visible. This endpoint omits recipient phone numbers (privacy and payload size); sender plus counters is what you get. For per-recipient audit, call get-report per order.

Related

Last updated: 2026-04-30 · Türkçe