List All SMS Notifier Patterns
List all sms notifiers patterns
HTTP Request
GET/api/notifications/notifiers/sms/:id/patterns
Authorization
Authorization
- Required: Yes
- Permission: Staff with SMSPatternPermission or Admin
- Permission Code: 2822
- Authentication: Token-based (Authorization: Token <your_api_key>)
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | Integer | Yes | Unique ID of the sms notifier |
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| limit | integer | — | Number of results to return per page. |
| offset | integer | — | Number of results to skip before returning results. |
| search | string | — | Search term to lookup results by `id`, `name`, `code`, `description`, `body` |
| ordering | string | — | Order results by (`id`, `name`, `status`, `code`, `created_at`, `updated_at` |
| id_min | integer | — | Minimum ID of the sms notifier. |
| id_max | integer | — | Maximum ID of the sms notifier. |
| created_date | string | — | Exact creation date (`YYYY-MM-DD`). |
| updated_date | string | — | Exact last update date (`YYYY-MM-DD`). |
| created_from | string | — | Start date for sms notifiers created after this date (`YYYY-MM-DD`). |
| updated_from | string | — | Start date for sms notifieres updated after this date (`YYYY-MM-DD`). |
| created_to | string | — | End date for sms notifiers created before this date (`YYYY-MM-DD`). |
| updated_to | string | — | End date for sms notifiers updated before this date (`YYYY-MM-DD`). |
| status | string | — | filter by sms pattern statuses (choices: `created`, `pending`, `approved`, `rejected`) |
| has_description | boolean | — | filters patterns with/without description |
Example Requests
- 🐍 Python
- 🌐 Curl
1import requests
2
3# List all sms notifiers
4response = requests.get('http://www.example.com/api/notifications/notifiers/sms/1/patterns',
5 headers={'Authorization': 'Token <your_api_key>'}
6)
7print(response.json())1# List all sms notifiers
2curl "http://www.example.com/api/notifications/notifiers/sms/1/patterns" -H "Authorization: Token <your_api_key>"Object Structure
| Field | Type | Description |
|---|---|---|
| count | Integer | Total number of categories |
| next | String | URL for the next page of results |
| previous | String | URL for the previous page of results |
| results | Array[Object] | Array of SMSNotifier objects |
SMSNotifier Object Data Structure
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique ID of the sms pattern. |
| status | String | Status of the sms pattern (choices: `created`, `pending`, `approved`, `rejected`) |
| name | String | Name of the sms pattern |
| code | String | Code of the sms pattern |
| description | String | Extra descriptions about the sms pattern (nullable) |
| body | String | Text body of the sms pattern |
| created_at | String (ISO 8601) | Timestamp when the sms pattern was created. |
| updated_at | String (ISO 8601) | Timestamp when the sms pattern] was last updated. |
Example Response
{
"count": 2,
"next": null,
"previous": null,
"results": [
{
"id": 2,
"status": "approved",
"name": "ثبت نام جدید",
"code": "12062",
"description": "استفاده برای اطلاع رسانی در مورد ثبت نام کاربر جدید",
"body": "کاربر با شماره تماس {0} و نام {۱} ثبت نام کرد",
"created_at": "2025-11-22T13:42:52.448434Z",
"updated_at": "2025-11-22T13:42:53.951500Z"
},
{
"id": 1,
"status": "approved",
"name": "otp",
"code": "13420",
"description": "برای ارسال پیامک کد یکبار مصرف استفاده می شود",
"body": "(0)",
"created_at": "2025-11-22T13:41:33.492831Z",
"updated_at": "2025-11-28T15:10:00.975233Z"
}
]
}