Volcano API
๐Ÿš€ API Endpoints

๐Ÿ”” Notification Management

Push notifications, SMS, and messaging endpoints. 20 endpoints available.

๐ŸŽฏ Quick Stats

๐Ÿ“Š Methods

  • ๐Ÿ“ POST: 8 endpoints
  • ๐Ÿ” GET: 8 endpoints
  • โœ๏ธ PUT: 2 endpoints
  • ๐Ÿ—‘๏ธ DELETE: 2 endpoints

๐Ÿ” Authentication

All endpoints in this section use the same authentication methods. Choose one:

๐Ÿ”‘ Bearer Token (Recommended)

For user session authentication

Add to request headers:

Authorization: Bearer YOUR_TOKEN

๐Ÿ”ง API Key

For server-side authentication

Add to request headers:

X-API-KEY: YOUR_API_KEY

โš ๏ธ Important: Do not use both authentication methods simultaneously in the same request.

๐Ÿ”— Endpoints Overview

MethodEndpointDescription
๐Ÿ“ POST/notification/sms/verification/sendSend SMS to the provided mobile number
๐Ÿ“ POST/notification/sms/merchant/verification/sendSend SMS to the provided mobile number for a specific merchant
๐Ÿ“ POST/notificationCreate notification
๐Ÿ” GET/notificationGet user notifications
๐Ÿ” GET/notification/{notificationId}Get notification details
โœ๏ธ PUT/notification/{notificationId}Update notification
๐Ÿ—‘๏ธ DELETE/notification/{notificationId}Delete notification
๐Ÿ“ POST/notification/mark-readMark notifications as read
๐Ÿ“ POST/notification/mark-all-readMark all notifications as read
๐Ÿ” GET/notification/stats/overviewGet notification statistics
๐Ÿ” GET/notification/unread/countGet unread notification count
๐Ÿ“ POST/notification/cleanup/expiredClean expired notifications
๐Ÿ“ POST/notification/categoriesCreate notification category
๐Ÿ” GET/notification/categoriesGet notification categories
๐Ÿ” GET/notification/categories/activeGet active categories
๐Ÿ” GET/notification/categories/{categoryId}Get category details
โœ๏ธ PUT/notification/categories/{categoryId}Update notification category
๐Ÿ—‘๏ธ DELETE/notification/categories/{categoryId}Delete notification category
๐Ÿ” GET/notification/categories/code/{code}Get category by code
๐Ÿ“ POST/notification/categories/initializeInitialize default categories

๐Ÿ“– Detailed Documentation

Send SMS to the provided mobile number

POST/notification/sms/verification/send
Full URL
https://api.market.decenctype.com/notification/sms/verification/send

๐Ÿ“ Request Body Parameters

ParameterTypeRequiredDescription
mobilestringโœ…Mobile number to send the SMS to
merchantstringโŒMerchant name, required if for specific merchant

Description: Send SMS to the provided mobile number

Operation ID: sendSms

Response Status:

  • โœ… 201: SMS sent

๐Ÿ“‹ Response Examples

response.json
1{
2 "result": "example-result",
3 "desc": "example-desc",
4 "msgid": "example-id",
5 "custid": "example-id"
6}

๐Ÿ“ Example Request

curl -X POST "https://api.market.decenctype.com/notification/sms/verification/send" \\
  -H "Authorization: Bearer YOUR_TOKEN" \\
  -H "Content-Type: application/json" \\
  -d '{
  "mobile": "example-mobile"
}'

Send SMS to the provided mobile number for a specific merchant

POST/notification/sms/merchant/verification/send
Full URL
https://api.market.decenctype.com/notification/sms/merchant/verification/send

๐Ÿ“ Request Body Parameters

ParameterTypeRequiredDescription
mobilestringโœ…Mobile number to send the SMS to
merchantstringโŒMerchant name, required if for specific merchant

Description: Send SMS to the provided mobile number for a specific merchant

Operation ID: sendMerchantSms

Response Status:

  • โœ… 201: SMS sent

๐Ÿ“‹ Response Examples

response.json
1{
2 "result": "example-result",
3 "desc": "example-desc",
4 "msgid": "example-id",
5 "custid": "example-id"
6}

๐Ÿ“ Example Request

curl -X POST "https://api.market.decenctype.com/notification/sms/merchant/verification/send" \\
  -H "Authorization: Bearer YOUR_TOKEN" \\
  -H "Content-Type: application/json" \\
  -d '{
  "mobile": "example-mobile"
}'

Create notification

POST/notification
Full URL
https://api.market.decenctype.com/notification

๐Ÿ“ Request Body Parameters

ParameterTypeRequiredDescription
userIdstringโœ…็”จๆˆทID
categoryIdnumberโŒ้€š็Ÿฅๅˆ†็ฑปID
titlestringโœ…้€š็Ÿฅๆ ‡้ข˜
contentstringโœ…้€š็Ÿฅๅ†…ๅฎน
typestring (system, transaction, order, security, marketing, kyc, payment)โœ…้€š็Ÿฅ็ฑปๅž‹
prioritystring (low, medium, high, urgent)โŒ้€š็Ÿฅไผ˜ๅ…ˆ็บง (้ป˜่ฎค: medium)
metadataobjectโŒ้€š็Ÿฅๅ…ƒๆ•ฐๆฎ
channelsarrayโŒ้€š็Ÿฅๆธ ้“
expiresAtstringโŒ่ฟ‡ๆœŸๆ—ถ้—ด

Description: Create notification

Operation ID: createNotification

Response Status:

  • โœ… 201: ้€š็Ÿฅๅˆ›ๅปบๆˆๅŠŸ

Create a new notification message

๐Ÿ“‹ Response Examples

response.json
1{
2 "id": 1,
3 "userId": 1,
4 "categoryId": 1,
5 "category": "example-category",
6 "title": "ไบคๆ˜“ๆˆๅŠŸ้€š็Ÿฅ",
7 "content": "ๆ‚จ็š„ไบคๆ˜“ๅทฒๆˆๅŠŸๅฎŒๆˆ๏ผŒไบคๆ˜“้‡‘้ขไธบ $100",
8 "type": "transaction",
9 "priority": "medium",
10 "metadata": {
11 "transaction_id": 123,
12 "amount": 100
13 },
14 "channels": [
15 "push",
16 "email",
17 "sms"
18 ],
19 "isRead": false,
20 "readAt": "2024-01-15T10:30:00Z",
21 "isDeleted": false,
22 "deletedAt": "2024-01-15T10:30:00Z",
23 "expiresAt": "2024-12-31T23:59:59Z",
24 "createdAt": "2024-01-15T10:00:00Z",
25 "updatedAt": "2024-01-15T10:30:00Z"
26}

๐Ÿ“ Example Request

curl -X POST "https://api.market.decenctype.com/notification" \\
  -H "Authorization: Bearer YOUR_TOKEN" \\
  -H "Content-Type: application/json" \\
  -d '{
  "userId": "123e4567-e89b-12d3-a456-426614174000",
  "title": "ไบคๆ˜“ๆˆๅŠŸ้€š็Ÿฅ",
  "content": "ๆ‚จ็š„ไบคๆ˜“ๅทฒๆˆๅŠŸๅฎŒๆˆ๏ผŒไบคๆ˜“้‡‘้ขไธบ $100",
  "type": "transaction"
}'

Get user notifications

GET/notification
Full URL
https://api.market.decenctype.com/notification

๐Ÿ“‹ Query Parameters

ParameterTypeRequiredDescription
sortFieldstringโŒๆŽ’ๅบๅญ—ๆฎต
sortstringโŒๆŽ’ๅบๆ–นๅผ
pagenumberโŒ้กต็ ๏ผˆไปŽ1ๅผ€ๅง‹๏ผ‰
pageSizenumberโŒๆฏ้กตๆกๆ•ฐ
typestringโŒ้€š็Ÿฅ็ฑปๅž‹ (็คบไพ‹: transaction)
prioritystringโŒ้€š็Ÿฅไผ˜ๅ…ˆ็บง (็คบไพ‹: high)
isReadbooleanโŒๆ˜ฏๅฆๅทฒ่ฏป
isDeletedbooleanโŒๆ˜ฏๅฆๅทฒๅˆ ้™ค
startDatestringโŒๅผ€ๅง‹ๆ—ถ้—ด (็คบไพ‹: 2024-01-01T00:00:00Z)
endDatestringโŒ็ป“ๆŸๆ—ถ้—ด (็คบไพ‹: 2024-12-31T23:59:59Z)
searchstringโŒๆœ็ดขๅ…ณ้”ฎ่ฏ (็คบไพ‹: ไบคๆ˜“)
categoryIdnumberโŒๅˆ†็ฑปID (็คบไพ‹: 1)
categoryCodestringโŒๅˆ†็ฑปไปฃ็  (็คบไพ‹: system)

Description: Get user notifications

Operation ID: getUserNotifications

Response Status:

  • โœ… 200: ่Žทๅ–้€š็Ÿฅๅˆ—่กจๆˆๅŠŸ

Get notification list for current user with pagination and filtering support

๐Ÿ“‹ Response Examples

response.json
1{
2 "data": [
3 {
4 "id": 1,
5 "userId": 1,
6 "title": "ไบคๆ˜“ๆˆๅŠŸ้€š็Ÿฅ",
7 "content": "ๆ‚จ็š„ไบคๆ˜“ๅทฒๆˆๅŠŸๅฎŒๆˆ๏ผŒไบคๆ˜“้‡‘้ขไธบ $100",
8 "type": "transaction",
9 "priority": "medium",
10 "isRead": false,
11 "isDeleted": false,
12 "createdAt": "2024-01-15T10:00:00Z",
13 "updatedAt": "2024-01-15T10:30:00Z"
14 }
15 ],
16 "total": 100,
17 "page": 1,
18 "limit": 20,
19 "totalPages": 5,
20 "unreadCount": 15
21}

๐Ÿ“ Example Request

curl -X GET "https://api.market.decenctype.com/notification" \\
  -H "Authorization: Bearer YOUR_TOKEN" \\
  -H "Content-Type: application/json"

Get notification details

GET/notification/{notificationId}
Full URL
https://api.market.decenctype.com/notification/{notificationId}

๐ŸŽฏ Path Parameters

  • notificationId (number) - โœ… Required: ้€š็ŸฅID

Description: Get notification details

Operation ID: getNotificationById

Response Status:

  • โœ… 200: ่Žทๅ–้€š็Ÿฅ่ฏฆๆƒ…ๆˆๅŠŸ

Get detailed information by notification ID

๐Ÿ“‹ Response Examples

response.json
1{
2 "id": 1,
3 "userId": 1,
4 "categoryId": 1,
5 "category": "example-category",
6 "title": "ไบคๆ˜“ๆˆๅŠŸ้€š็Ÿฅ",
7 "content": "ๆ‚จ็š„ไบคๆ˜“ๅทฒๆˆๅŠŸๅฎŒๆˆ๏ผŒไบคๆ˜“้‡‘้ขไธบ $100",
8 "type": "transaction",
9 "priority": "medium",
10 "metadata": {
11 "transaction_id": 123,
12 "amount": 100
13 },
14 "channels": [
15 "push",
16 "email",
17 "sms"
18 ],
19 "isRead": false,
20 "readAt": "2024-01-15T10:30:00Z",
21 "isDeleted": false,
22 "deletedAt": "2024-01-15T10:30:00Z",
23 "expiresAt": "2024-12-31T23:59:59Z",
24 "createdAt": "2024-01-15T10:00:00Z",
25 "updatedAt": "2024-01-15T10:30:00Z"
26}

๐Ÿ“ Example Request

curl -X GET "https://api.market.decenctype.com/notification/example-id" \\
  -H "Authorization: Bearer YOUR_TOKEN" \\
  -H "Content-Type: application/json"

Update notification

PUT/notification/{notificationId}
Full URL
https://api.market.decenctype.com/notification/{notificationId}

๐ŸŽฏ Path Parameters

  • notificationId (number) - โœ… Required: ้€š็ŸฅID

๐Ÿ“ Request Body Parameters

ParameterTypeRequiredDescription
userIdstringโŒ็”จๆˆทID
categoryIdnumberโŒ้€š็Ÿฅๅˆ†็ฑปID
titlestringโŒ้€š็Ÿฅๆ ‡้ข˜
contentstringโŒ้€š็Ÿฅๅ†…ๅฎน
typestring (system, transaction, order, security, marketing, kyc, payment)โŒ้€š็Ÿฅ็ฑปๅž‹
prioritystring (low, medium, high, urgent)โŒ้€š็Ÿฅไผ˜ๅ…ˆ็บง (้ป˜่ฎค: medium)
metadataobjectโŒ้€š็Ÿฅๅ…ƒๆ•ฐๆฎ
channelsarrayโŒ้€š็Ÿฅๆธ ้“
expiresAtstringโŒ่ฟ‡ๆœŸๆ—ถ้—ด
isReadbooleanโŒๆ˜ฏๅฆๅทฒ่ฏป
readAtstringโŒๅทฒ่ฏปๆ—ถ้—ด
isDeletedbooleanโŒๆ˜ฏๅฆๅทฒๅˆ ้™ค
deletedAtstringโŒๅˆ ้™คๆ—ถ้—ด

Description: Update notification

Operation ID: updateNotification

Response Status:

  • โœ… 200: ๆ›ดๆ–ฐ้€š็ŸฅๆˆๅŠŸ

Update notification status or content

๐Ÿ“‹ Response Examples

response.json
1{
2 "id": 1,
3 "userId": 1,
4 "categoryId": 1,
5 "category": "example-category",
6 "title": "ไบคๆ˜“ๆˆๅŠŸ้€š็Ÿฅ",
7 "content": "ๆ‚จ็š„ไบคๆ˜“ๅทฒๆˆๅŠŸๅฎŒๆˆ๏ผŒไบคๆ˜“้‡‘้ขไธบ $100",
8 "type": "transaction",
9 "priority": "medium",
10 "metadata": {
11 "transaction_id": 123,
12 "amount": 100
13 },
14 "channels": [
15 "push",
16 "email",
17 "sms"
18 ],
19 "isRead": false,
20 "readAt": "2024-01-15T10:30:00Z",
21 "isDeleted": false,
22 "deletedAt": "2024-01-15T10:30:00Z",
23 "expiresAt": "2024-12-31T23:59:59Z",
24 "createdAt": "2024-01-15T10:00:00Z",
25 "updatedAt": "2024-01-15T10:30:00Z"
26}

๐Ÿ“ Example Request

curl -X PUT "https://api.market.decenctype.com/notification/example-id" \\
  -H "Authorization: Bearer YOUR_TOKEN" \\
  -H "Content-Type: application/json" \\
  -d '{}'

Delete notification

DELETE/notification/{notificationId}
Full URL
https://api.market.decenctype.com/notification/{notificationId}

๐ŸŽฏ Path Parameters

  • notificationId (number) - โœ… Required: ้€š็ŸฅID

Description: Delete notification

Operation ID: deleteNotification

Response Status:

  • โœ… 200: ๅˆ ้™ค้€š็ŸฅๆˆๅŠŸ

Soft delete the specified notification

๐Ÿ“ Example Request

curl -X DELETE "https://api.market.decenctype.com/notification/example-id" \\
  -H "Authorization: Bearer YOUR_TOKEN" \\
  -H "Content-Type: application/json"

Mark notifications as read

POST/notification/mark-read
Full URL
https://api.market.decenctype.com/notification/mark-read

๐Ÿ“ Request Body Parameters

ParameterTypeRequiredDescription
notificationIdsarrayโœ…้€š็ŸฅIDๅˆ—่กจ

Description: Mark notifications as read

Operation ID: markAsRead

Response Status:

  • โœ… 200: ๆ ‡่ฎฐๆˆๅŠŸ
  • โœ… 201: Success

Batch mark specified notifications as read

๐Ÿ“ Example Request

curl -X POST "https://api.market.decenctype.com/notification/mark-read" \\
  -H "Authorization: Bearer YOUR_TOKEN" \\
  -H "Content-Type: application/json" \\
  -d '{
  "notificationIds": [
    1,
    2,
    3
  ]
}'

Mark all notifications as read

POST/notification/mark-all-read
Full URL
https://api.market.decenctype.com/notification/mark-all-read

๐Ÿ“ Request Body Parameters

ParameterTypeRequiredDescription
typestringโŒ้€š็Ÿฅ็ฑปๅž‹
onlyTypebooleanโŒๆ˜ฏๅฆๅชๆ ‡่ฎฐ็‰นๅฎš็ฑปๅž‹็š„้€š็Ÿฅ (้ป˜่ฎค: false)

Description: Mark all notifications as read

Operation ID: markAllAsRead

Response Status:

  • โœ… 200: ๆ ‡่ฎฐๆˆๅŠŸ
  • โœ… 201: Success

Mark all user notifications as read

๐Ÿ“ Example Request

curl -X POST "https://api.market.decenctype.com/notification/mark-all-read" \\
  -H "Authorization: Bearer YOUR_TOKEN" \\
  -H "Content-Type: application/json" \\
  -d '{}'

Get notification statistics

GET/notification/stats/overview
Full URL
https://api.market.decenctype.com/notification/stats/overview

๐Ÿ” Authentication: Required (see authentication section above)

Description: Get notification statistics

Operation ID: getNotificationStats

Response Status:

  • โœ… 200: ่Žทๅ–็ปŸ่ฎกๆˆๅŠŸ

Get notification statistics for user

๐Ÿ“‹ Response Examples

response.json
1{
2 "total": 100,
3 "unread": 15,
4 "read": 85,
5 "byType": {
6 "system": 20,
7 "transaction": 30,
8 "order": 25,
9 "security": 15,
10 "marketing": 10
11 },
12 "byPriority": {
13 "low": 10,
14 "medium": 60,
15 "high": 25,
16 "urgent": 5
17 }
18}

๐Ÿ“ Example Request

curl -X GET "https://api.market.decenctype.com/notification/stats/overview" \\
  -H "Authorization: Bearer YOUR_TOKEN" \\
  -H "Content-Type: application/json"

Get unread notification count

GET/notification/unread/count
Full URL
https://api.market.decenctype.com/notification/unread/count

๐Ÿ” Authentication: Required (see authentication section above)

Description: Get unread notification count

Operation ID: getUnreadCount

Response Status:

  • โœ… 200: ่Žทๅ–ๆœช่ฏปๆ•ฐ้‡ๆˆๅŠŸ

Get total count of unread notifications for user

๐Ÿ“ Example Request

curl -X GET "https://api.market.decenctype.com/notification/unread/count" \\
  -H "Authorization: Bearer YOUR_TOKEN" \\
  -H "Content-Type: application/json"

Clean expired notifications

POST/notification/cleanup/expired
Full URL
https://api.market.decenctype.com/notification/cleanup/expired

๐Ÿ” Authentication: Required (see authentication section above)

Description: Clean expired notifications

Operation ID: cleanExpiredNotifications

Response Status:

  • โœ… 200: ๆธ…็†ๆˆๅŠŸ
  • โœ… 201: Success

Clean all expired notifications (admin function)

๐Ÿ“ Example Request

curl -X POST "https://api.market.decenctype.com/notification/cleanup/expired" \\
  -H "Authorization: Bearer YOUR_TOKEN" \\
  -H "Content-Type: application/json"

Create notification category

POST/notification/categories
Full URL
https://api.market.decenctype.com/notification/categories

๐Ÿ“ Request Body Parameters

ParameterTypeRequiredDescription
codestringโœ…ๅˆ†็ฑปไปฃ็ 
namestringโœ…ๅˆ†็ฑปๅ็งฐ
descriptionstringโŒๅˆ†็ฑปๆ่ฟฐ
iconstringโŒๅˆ†็ฑปๅ›พๆ ‡
colorstringโŒๅˆ†็ฑป้ขœ่‰ฒ
statusstring (active, inactive, deprecated)โŒๅˆ†็ฑป็Šถๆ€ (้ป˜่ฎค: active)
sortOrdernumberโŒๆŽ’ๅบๆƒ้‡ (้ป˜่ฎค: 0) (ๆœ€ๅฐ: 0)
configobjectโŒๅˆ†็ฑป้…็ฝฎ
allowSubscriptionbooleanโŒๆ˜ฏๅฆๅ…่ฎธ็”จๆˆท่ฎข้˜… (้ป˜่ฎค: true)
allowUnsubscribebooleanโŒๆ˜ฏๅฆๅ…่ฎธ็”จๆˆทๅ–ๆถˆ่ฎข้˜… (้ป˜่ฎค: true)
isSystembooleanโŒๆ˜ฏๅฆ็ณป็ปŸ้ป˜่ฎคๅˆ†็ฑป (้ป˜่ฎค: false)

Description: Create notification category

Operation ID: createCategory

Response Status:

  • โœ… 201: ๅˆ†็ฑปๅˆ›ๅปบๆˆๅŠŸ

Create a new notification category

๐Ÿ“‹ Response Examples

response.json
1{
2 "id": 1,
3 "code": "system",
4 "name": "็ณป็ปŸ้€š็Ÿฅ",
5 "description": "็ณป็ปŸ็›ธๅ…ณ็š„้€š็Ÿฅๆถˆๆฏ",
6 "icon": "bell",
7 "color": "#1890ff",
8 "status": "active",
9 "sortOrder": 0,
10 "config": {
11 "channels": [
12 "push",
13 "email"
14 ],
15 "defaultPriority": "medium",
16 "ttlDays": 30
17 },
18 "allowSubscription": true,
19 "allowUnsubscribe": true,
20 "isSystem": false,
21 "createdAt": "2024-01-15T10:00:00Z",
22 "updatedAt": "2024-01-15T10:30:00Z"
23}

๐Ÿ“ Example Request

curl -X POST "https://api.market.decenctype.com/notification/categories" \\
  -H "Authorization: Bearer YOUR_TOKEN" \\
  -H "Content-Type: application/json" \\
  -d '{
  "code": "system",
  "name": "็ณป็ปŸ้€š็Ÿฅ"
}'

Get notification categories

GET/notification/categories
Full URL
https://api.market.decenctype.com/notification/categories

๐Ÿ“‹ Query Parameters

ParameterTypeRequiredDescription
pagenumberโŒ้กต็  (็คบไพ‹: 1)
limitnumberโŒๆฏ้กตๆ•ฐ้‡ (็คบไพ‹: 20)
statusstringโŒๅˆ†็ฑป็Šถๆ€ (็คบไพ‹: active)
isSystembooleanโŒๆ˜ฏๅฆ็ณป็ปŸๅˆ†็ฑป
searchstringโŒๆœ็ดขๅ…ณ้”ฎ่ฏ (็คบไพ‹: ็ณป็ปŸ)

Description: Get notification categories

Operation ID: getCategories

Response Status:

  • โœ… 200: ่Žทๅ–ๅˆ†็ฑปๅˆ—่กจๆˆๅŠŸ

Get all notification categories with pagination and filtering support

๐Ÿ“ Example Request

curl -X GET "https://api.market.decenctype.com/notification/categories" \\
  -H "Authorization: Bearer YOUR_TOKEN" \\
  -H "Content-Type: application/json"

Get active categories

GET/notification/categories/active
Full URL
https://api.market.decenctype.com/notification/categories/active

๐Ÿ” Authentication: Required (see authentication section above)

Description: Get active categories

Operation ID: getActiveCategories

Response Status:

  • โœ… 200: ่Žทๅ–ๆดป่ทƒๅˆ†็ฑปๆˆๅŠŸ

Get all active notification categories

๐Ÿ“‹ Response Examples

response.json
1[
2 {
3 "id": 1,
4 "code": "system",
5 "name": "็ณป็ปŸ้€š็Ÿฅ",
6 "description": "็ณป็ปŸ็›ธๅ…ณ็š„้€š็Ÿฅๆถˆๆฏ",
7 "icon": "bell",
8 "color": "#1890ff",
9 "status": "active",
10 "sortOrder": 0,
11 "config": {
12 "channels": [
13 "push",
14 "email"
15 ],
16 "defaultPriority": "medium",
17 "ttlDays": 30
18 },
19 "allowSubscription": true,
20 "allowUnsubscribe": true,
21 "isSystem": false,
22 "createdAt": "2024-01-15T10:00:00Z",
23 "updatedAt": "2024-01-15T10:30:00Z"
24 }
25]

๐Ÿ“ Example Request

curl -X GET "https://api.market.decenctype.com/notification/categories/active" \\
  -H "Authorization: Bearer YOUR_TOKEN" \\
  -H "Content-Type: application/json"

Get category details

GET/notification/categories/{categoryId}
Full URL
https://api.market.decenctype.com/notification/categories/{categoryId}

๐ŸŽฏ Path Parameters

  • categoryId (number) - โœ… Required: ๅˆ†็ฑปID

Description: Get category details

Operation ID: getCategoryById

Response Status:

  • โœ… 200: ่Žทๅ–ๅˆ†็ฑป่ฏฆๆƒ…ๆˆๅŠŸ

Get detailed information by category ID

๐Ÿ“‹ Response Examples

response.json
1{
2 "id": 1,
3 "code": "system",
4 "name": "็ณป็ปŸ้€š็Ÿฅ",
5 "description": "็ณป็ปŸ็›ธๅ…ณ็š„้€š็Ÿฅๆถˆๆฏ",
6 "icon": "bell",
7 "color": "#1890ff",
8 "status": "active",
9 "sortOrder": 0,
10 "config": {
11 "channels": [
12 "push",
13 "email"
14 ],
15 "defaultPriority": "medium",
16 "ttlDays": 30
17 },
18 "allowSubscription": true,
19 "allowUnsubscribe": true,
20 "isSystem": false,
21 "createdAt": "2024-01-15T10:00:00Z",
22 "updatedAt": "2024-01-15T10:30:00Z"
23}

๐Ÿ“ Example Request

curl -X GET "https://api.market.decenctype.com/notification/categories/example-id" \\
  -H "Authorization: Bearer YOUR_TOKEN" \\
  -H "Content-Type: application/json"

Update notification category

PUT/notification/categories/{categoryId}
Full URL
https://api.market.decenctype.com/notification/categories/{categoryId}

๐ŸŽฏ Path Parameters

  • categoryId (number) - โœ… Required: ๅˆ†็ฑปID

๐Ÿ“ Request Body Parameters

ParameterTypeRequiredDescription
namestringโŒๅˆ†็ฑปๅ็งฐ
descriptionstringโŒๅˆ†็ฑปๆ่ฟฐ
iconstringโŒๅˆ†็ฑปๅ›พๆ ‡
colorstringโŒๅˆ†็ฑป้ขœ่‰ฒ
statusstring (active, inactive, deprecated)โŒๅˆ†็ฑป็Šถๆ€
sortOrdernumberโŒๆŽ’ๅบๆƒ้‡ (ๆœ€ๅฐ: 0)
configobjectโŒๅˆ†็ฑป้…็ฝฎ
allowSubscriptionbooleanโŒๆ˜ฏๅฆๅ…่ฎธ็”จๆˆท่ฎข้˜…
allowUnsubscribebooleanโŒๆ˜ฏๅฆๅ…่ฎธ็”จๆˆทๅ–ๆถˆ่ฎข้˜…

Description: Update notification category

Operation ID: updateCategory

Response Status:

  • โœ… 200: ๆ›ดๆ–ฐๅˆ†็ฑปๆˆๅŠŸ

Update information for specified category

๐Ÿ“‹ Response Examples

response.json
1{
2 "id": 1,
3 "code": "system",
4 "name": "็ณป็ปŸ้€š็Ÿฅ",
5 "description": "็ณป็ปŸ็›ธๅ…ณ็š„้€š็Ÿฅๆถˆๆฏ",
6 "icon": "bell",
7 "color": "#1890ff",
8 "status": "active",
9 "sortOrder": 0,
10 "config": {
11 "channels": [
12 "push",
13 "email"
14 ],
15 "defaultPriority": "medium",
16 "ttlDays": 30
17 },
18 "allowSubscription": true,
19 "allowUnsubscribe": true,
20 "isSystem": false,
21 "createdAt": "2024-01-15T10:00:00Z",
22 "updatedAt": "2024-01-15T10:30:00Z"
23}

๐Ÿ“ Example Request

curl -X PUT "https://api.market.decenctype.com/notification/categories/example-id" \\
  -H "Authorization: Bearer YOUR_TOKEN" \\
  -H "Content-Type: application/json" \\
  -d '{}'

Delete notification category

DELETE/notification/categories/{categoryId}
Full URL
https://api.market.decenctype.com/notification/categories/{categoryId}

๐ŸŽฏ Path Parameters

  • categoryId (number) - โœ… Required: ๅˆ†็ฑปID

Description: Delete notification category

Operation ID: deleteCategory

Response Status:

  • โœ… 200: ๅˆ ้™คๅˆ†็ฑปๆˆๅŠŸ

Delete the specified notification category

๐Ÿ“ Example Request

curl -X DELETE "https://api.market.decenctype.com/notification/categories/example-id" \\
  -H "Authorization: Bearer YOUR_TOKEN" \\
  -H "Content-Type: application/json"

Get category by code

GET/notification/categories/code/{code}
Full URL
https://api.market.decenctype.com/notification/categories/code/{code}

๐ŸŽฏ Path Parameters

  • code (string) - โœ… Required: ๅˆ†็ฑปไปฃ็ 

Description: Get category by code

Operation ID: getCategoryByCode

Response Status:

  • โœ… 200: ่Žทๅ–ๅˆ†็ฑปๆˆๅŠŸ

Get category information by category code

๐Ÿ“‹ Response Examples

response.json
1{
2 "id": 1,
3 "code": "system",
4 "name": "็ณป็ปŸ้€š็Ÿฅ",
5 "description": "็ณป็ปŸ็›ธๅ…ณ็š„้€š็Ÿฅๆถˆๆฏ",
6 "icon": "bell",
7 "color": "#1890ff",
8 "status": "active",
9 "sortOrder": 0,
10 "config": {
11 "channels": [
12 "push",
13 "email"
14 ],
15 "defaultPriority": "medium",
16 "ttlDays": 30
17 },
18 "allowSubscription": true,
19 "allowUnsubscribe": true,
20 "isSystem": false,
21 "createdAt": "2024-01-15T10:00:00Z",
22 "updatedAt": "2024-01-15T10:30:00Z"
23}

๐Ÿ“ Example Request

curl -X GET "https://api.market.decenctype.com/notification/categories/code/example-code" \\
  -H "Authorization: Bearer YOUR_TOKEN" \\
  -H "Content-Type: application/json"

Initialize default categories

POST/notification/categories/initialize
Full URL
https://api.market.decenctype.com/notification/categories/initialize

๐Ÿ” Authentication: Required (see authentication section above)

Description: Initialize default categories

Operation ID: initializeDefaultCategories

Response Status:

  • โœ… 200: ๅˆๅง‹ๅŒ–ๆˆๅŠŸ
  • โœ… 201: Success

Initialize system default notification categories

๐Ÿ“ Example Request

curl -X POST "https://api.market.decenctype.com/notification/categories/initialize" \\
  -H "Authorization: Bearer YOUR_TOKEN" \\
  -H "Content-Type: application/json"

On this page

๐Ÿ” Authentication๐Ÿ”— Endpoints Overview๐Ÿ“– Detailed DocumentationSend SMS to the provided mobile number๐Ÿ“ Request Body Parameters๐Ÿ“‹ Response Examples๐Ÿ“ Example RequestSend SMS to the provided mobile number for a specific merchant๐Ÿ“ Request Body Parameters๐Ÿ“‹ Response Examples๐Ÿ“ Example RequestCreate notification๐Ÿ“ Request Body Parameters๐Ÿ“‹ Response Examples๐Ÿ“ Example RequestGet user notifications๐Ÿ“‹ Query Parameters๐Ÿ“‹ Response Examples๐Ÿ“ Example RequestGet notification details๐ŸŽฏ Path Parameters๐Ÿ“‹ Response Examples๐Ÿ“ Example RequestUpdate notification๐ŸŽฏ Path Parameters๐Ÿ“ Request Body Parameters๐Ÿ“‹ Response Examples๐Ÿ“ Example RequestDelete notification๐ŸŽฏ Path Parameters๐Ÿ“ Example RequestMark notifications as read๐Ÿ“ Request Body Parameters๐Ÿ“ Example RequestMark all notifications as read๐Ÿ“ Request Body Parameters๐Ÿ“ Example RequestGet notification statistics๐Ÿ“‹ Response Examples๐Ÿ“ Example RequestGet unread notification count๐Ÿ“ Example RequestClean expired notifications๐Ÿ“ Example RequestCreate notification category๐Ÿ“ Request Body Parameters๐Ÿ“‹ Response Examples๐Ÿ“ Example RequestGet notification categories๐Ÿ“‹ Query Parameters๐Ÿ“ Example RequestGet active categories๐Ÿ“‹ Response Examples๐Ÿ“ Example RequestGet category details๐ŸŽฏ Path Parameters๐Ÿ“‹ Response Examples๐Ÿ“ Example RequestUpdate notification category๐ŸŽฏ Path Parameters๐Ÿ“ Request Body Parameters๐Ÿ“‹ Response Examples๐Ÿ“ Example RequestDelete notification category๐ŸŽฏ Path Parameters๐Ÿ“ Example RequestGet category by code๐ŸŽฏ Path Parameters๐Ÿ“‹ Response Examples๐Ÿ“ Example RequestInitialize default categories๐Ÿ“ Example Request