Skip to main content

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​

ParameterTypeRequiredDescription
idIntegerYesUnique ID of the sms notifier

Query Parameters​

ParameterTypeDefaultDescription
limitinteger—Number of results to return per page.
offsetinteger—Number of results to skip before returning results.
searchstring—Search term to lookup results by `id`, `name`, `code`, `description`, `body`
orderingstring—Order results by (`id`, `name`, `status`, `code`, `created_at`, `updated_at`
id_mininteger—Minimum ID of the sms notifier.
id_maxinteger—Maximum ID of the sms notifier.
created_datestring—Exact creation date (`YYYY-MM-DD`).
updated_datestring—Exact last update date (`YYYY-MM-DD`).
created_fromstring—Start date for sms notifiers created after this date (`YYYY-MM-DD`).
updated_fromstring—Start date for sms notifieres updated after this date (`YYYY-MM-DD`).
created_tostring—End date for sms notifiers created before this date (`YYYY-MM-DD`).
updated_tostring—End date for sms notifiers updated before this date (`YYYY-MM-DD`).
statusstring—filter by sms pattern statuses (choices: `created`, `pending`, `approved`, `rejected`)
has_descriptionboolean—filters patterns with/without description

Example Requests​

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())

Object Structure​

FieldTypeDescription
countIntegerTotal number of categories
nextStringURL for the next page of results
previousStringURL for the previous page of results
resultsArray[Object]Array of SMSNotifier objects

SMSNotifier Object Data Structure

FieldTypeDescription
idIntegerUnique ID of the sms pattern.
statusStringStatus of the sms pattern (choices: `created`, `pending`, `approved`, `rejected`)
nameStringName of the sms pattern
codeStringCode of the sms pattern
descriptionStringExtra descriptions about the sms pattern (nullable)
bodyStringText body of the sms pattern
created_atString (ISO 8601)Timestamp when the sms pattern was created.
updated_atString (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"
}
]
}