Volcano API
๐Ÿš€ API Endpoints

๐Ÿ‘ฅ User Groups

User group management and membership endpoints. 8 endpoints available.

๐ŸŽฏ Quick Stats

๐Ÿ“Š Methods

  • ๐Ÿ“ POST: 3 endpoints
  • ๐Ÿ” GET: 3 endpoints
  • ๐Ÿ—‘๏ธ DELETE: 1 endpoints
  • โœ๏ธ PUT: 1 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/user-groupsCreate user group
๐Ÿ” GET/user-groupsGet all user groups
๐Ÿ“ POST/user-groups/membersAdd user to group
๐Ÿ” GET/user-groups/{groupId}/membersGet group members
๐Ÿ” GET/user-groups/users/{userId}/groupsGet user groups for a user
๐Ÿ—‘๏ธ DELETE/user-groups/members/{userId}/{groupId}Remove user from group
โœ๏ธ PUT/user-groups/memberships/{membershipId}/statusUpdate membership status
๐Ÿ“ POST/user-groups/merchant/{merchantId}/ensure-default-groupEnsure merchant has default user group

๐Ÿ“– Detailed Documentation

Create user group

POST/user-groups
Full URL
https://api.market.decenctype.com/user-groups

๐Ÿ“ Request Body Parameters

ParameterTypeRequiredDescription
groupNamestringโœ…็”จๆˆท็ป„ๅ็งฐ (ๆœ€ๅฐ้•ฟๅบฆ: 2, ๆœ€ๅคง้•ฟๅบฆ: 100)
descriptionstringโŒ็”จๆˆท็ป„ๆ่ฟฐ
typestring (standard, vip, enterprise, custom)โŒ็”จๆˆท็ป„็ฑปๅž‹ (้ป˜่ฎค: standard)
prioritynumberโŒ็”จๆˆท็ป„ไผ˜ๅ…ˆ็บง (้ป˜่ฎค: 100) (ๆœ€ๅฐ: 1, ๆœ€ๅคง: 999)
maxMembersnumberโŒๆœ€ๅคงๆˆๅ‘˜ๆ•ฐ้‡ (ๆœ€ๅฐ: 1)
configobjectโŒ็”จๆˆท็ป„้…็ฝฎ
merchantIdstringโŒๅ•†ๆˆทID

Description: Create user group

Operation ID: createUserGroup

Response Status:

  • โœ… 201: User group created successfully

๐Ÿ“‹ Response Examples

response.json
1{
2 "groupId": "123e4567-e89b-12d3-a456-426614174000",
3 "groupName": "VIP็”จๆˆท็ป„",
4 "description": "VIP็”จๆˆทไบซๅ—ๆ›ดไฝŽ็š„ๆ‰‹็ปญ่ดน็އ",
5 "type": "vip",
6 "status": "active",
7 "priority": 100,
8 "maxMembers": 1000,
9 "config": {
10 "features": [
11 "advanced_trading",
12 "priority_support"
13 ],
14 "limits": {
15 "dailyTransactionLimit": 100000
16 }
17 },
18 "merchantId": "123e4567-e89b-12d3-a456-426614174000",
19 "isDefault": false,
20 "createdAt": "2023-12-01T10:30:00Z",
21 "updatedAt": "2023-12-01T10:30:00Z",
22 "fee": "example-fee",
23 "merchant": "example-merchant",
24 "memberships": [
25 {
26 "membershipId": "123e4567-e89b-12d3-a456-426614174000",
27 "userId": "123e4567-e89b-12d3-a456-426614174000",
28 "groupId": "123e4567-e89b-12d3-a456-426614174000",
29 "role": "member",
30 "status": "active",
31 "user": "example-user",
32 "userGroup": "example-userGroup"
33 }
34 ]
35}

๐Ÿ“ Example Request

curl -X POST "https://api.market.decenctype.com/user-groups" \\
  -H "Authorization: Bearer YOUR_TOKEN" \\
  -H "Content-Type: application/json" \\
  -d '{
  "groupName": "VIP็”จๆˆท็ป„"
}'

Get all user groups

GET/user-groups
Full URL
https://api.market.decenctype.com/user-groups

๐Ÿ“‹ Query Parameters

ParameterTypeRequiredDescription
statusstringโŒNo description
typestringโŒNo description
merchantIdstringโŒFilter by merchant ID
pagenumberโŒNo description
pageSizenumberโŒNo description

Description: Get all user groups

Operation ID: getAllUserGroups

Response Status:

  • โœ… 200: User groups retrieved successfully

๐Ÿ“‹ Response Examples

response.json
1[
2 {
3 "groupId": "123e4567-e89b-12d3-a456-426614174000",
4 "groupName": "VIP็”จๆˆท็ป„",
5 "description": "VIP็”จๆˆทไบซๅ—ๆ›ดไฝŽ็š„ๆ‰‹็ปญ่ดน็އ",
6 "type": "vip",
7 "status": "active",
8 "priority": 100,
9 "maxMembers": 1000,
10 "config": {
11 "features": [
12 "advanced_trading",
13 "priority_support"
14 ],
15 "limits": {
16 "dailyTransactionLimit": 100000
17 }
18 },
19 "merchantId": "123e4567-e89b-12d3-a456-426614174000",
20 "isDefault": false,
21 "createdAt": "2023-12-01T10:30:00Z",
22 "updatedAt": "2023-12-01T10:30:00Z",
23 "fee": "example-fee",
24 "merchant": "example-merchant",
25 "memberships": [
26 {
27 "membershipId": "123e4567-e89b-12d3-a456-426614174000",
28 "userId": "123e4567-e89b-12d3-a456-426614174000",
29 "groupId": "123e4567-e89b-12d3-a456-426614174000",
30 "role": "member",
31 "status": "active",
32 "user": "example-user",
33 "userGroup": "example-userGroup"
34 }
35 ]
36 }
37]

๐Ÿ“ Example Request

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

Add user to group

POST/user-groups/members
Full URL
https://api.market.decenctype.com/user-groups/members

๐Ÿ“ Request Body Parameters

ParameterTypeRequiredDescription
userIdstringโœ…็”จๆˆทID
groupIdstringโœ…็”จๆˆท็ป„ID
rolestring (member, admin, owner)โŒๆˆๅ‘˜่ง’่‰ฒ (้ป˜่ฎค: member)
invitedBystringโŒ้‚€่ฏทไบบID
notesstringโŒๆˆๅ‘˜ๅค‡ๆณจ
expiresAtstring (date-time)โŒ่ฟ‡ๆœŸๆ—ถ้—ด

Description: Add user to group

Operation ID: addUserToGroup

Response Status:

  • โœ… 201: User added to group successfully

๐Ÿ“‹ Response Examples

response.json
1{
2 "membershipId": "123e4567-e89b-12d3-a456-426614174000",
3 "userId": "123e4567-e89b-12d3-a456-426614174000",
4 "groupId": "123e4567-e89b-12d3-a456-426614174000",
5 "role": "member",
6 "status": "active",
7 "joinedAt": "2023-12-01T10:30:00Z",
8 "expiresAt": "2024-12-01T10:30:00Z",
9 "invitedBy": "123e4567-e89b-12d3-a456-426614174000",
10 "notes": "้ซ˜ไปทๅ€ผๅฎขๆˆท",
11 "config": {
12 "permissions": [
13 "view_reports",
14 "manage_settings"
15 ],
16 "preferences": {
17 "notifications": true
18 }
19 },
20 "user": "example-user",
21 "userGroup": "example-userGroup"
22}

๐Ÿ“ Example Request

curl -X POST "https://api.market.decenctype.com/user-groups/members" \\
  -H "Authorization: Bearer YOUR_TOKEN" \\
  -H "Content-Type: application/json" \\
  -d '{
  "userId": "123e4567-e89b-12d3-a456-426614174000",
  "groupId": "123e4567-e89b-12d3-a456-426614174000"
}'

Get group members

GET/user-groups/{groupId}/members
Full URL
https://api.market.decenctype.com/user-groups/{groupId}/members

๐ŸŽฏ Path Parameters

  • groupId (string) - โœ… Required: User group ID

๐Ÿ“‹ Query Parameters

ParameterTypeRequiredDescription
statusstringโŒNo description
rolestringโŒNo description
pagenumberโŒNo description
pageSizenumberโŒNo description

Description: Get group members

Operation ID: getGroupMembers

Response Status:

  • โœ… 200: Group members retrieved successfully

๐Ÿ“‹ Response Examples

response.json
1[
2 {
3 "membershipId": "123e4567-e89b-12d3-a456-426614174000",
4 "userId": "123e4567-e89b-12d3-a456-426614174000",
5 "groupId": "123e4567-e89b-12d3-a456-426614174000",
6 "role": "member",
7 "status": "active",
8 "joinedAt": "2023-12-01T10:30:00Z",
9 "expiresAt": "2024-12-01T10:30:00Z",
10 "invitedBy": "123e4567-e89b-12d3-a456-426614174000",
11 "notes": "้ซ˜ไปทๅ€ผๅฎขๆˆท",
12 "config": {
13 "permissions": [
14 "view_reports",
15 "manage_settings"
16 ],
17 "preferences": {
18 "notifications": true
19 }
20 },
21 "user": "example-user",
22 "userGroup": "example-userGroup"
23 }
24]

๐Ÿ“ Example Request

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

Get user groups for a user

GET/user-groups/users/{userId}/groups
Full URL
https://api.market.decenctype.com/user-groups/users/{userId}/groups

๐ŸŽฏ Path Parameters

  • userId (string) - โœ… Required: User ID

Description: Get user groups for a user

Operation ID: getUserGroups

Response Status:

  • โœ… 200: User groups retrieved successfully

๐Ÿ“‹ Response Examples

response.json
1[
2 {
3 "membershipId": "123e4567-e89b-12d3-a456-426614174000",
4 "userId": "123e4567-e89b-12d3-a456-426614174000",
5 "groupId": "123e4567-e89b-12d3-a456-426614174000",
6 "role": "member",
7 "status": "active",
8 "joinedAt": "2023-12-01T10:30:00Z",
9 "expiresAt": "2024-12-01T10:30:00Z",
10 "invitedBy": "123e4567-e89b-12d3-a456-426614174000",
11 "notes": "้ซ˜ไปทๅ€ผๅฎขๆˆท",
12 "config": {
13 "permissions": [
14 "view_reports",
15 "manage_settings"
16 ],
17 "preferences": {
18 "notifications": true
19 }
20 },
21 "user": "example-user",
22 "userGroup": "example-userGroup"
23 }
24]

๐Ÿ“ Example Request

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

Remove user from group

DELETE/user-groups/members/{userId}/{groupId}
Full URL
https://api.market.decenctype.com/user-groups/members/{userId}/{groupId}

๐ŸŽฏ Path Parameters

  • userId (string) - โœ… Required: No description
  • groupId (string) - โœ… Required: No description

Description: Remove user from group

Operation ID: removeUserFromGroup

Response Status:

  • โœ… 200: User removed from group successfully

๐Ÿ“ Example Request

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

Update membership status

PUT/user-groups/memberships/{membershipId}/status
Full URL
https://api.market.decenctype.com/user-groups/memberships/{membershipId}/status

๐ŸŽฏ Path Parameters

  • membershipId (string) - โœ… Required: No description

๐Ÿ“ Request Body Parameters

ParameterTypeRequiredDescription
statusstring (active, inactive, pending, suspended)โœ…ๆˆๅ‘˜็Šถๆ€
notesstringโŒๅค‡ๆณจ

Description: Update membership status

Operation ID: updateMembershipStatus

Response Status:

  • โœ… 200: Membership status updated successfully

๐Ÿ“‹ Response Examples

response.json
1{
2 "membershipId": "123e4567-e89b-12d3-a456-426614174000",
3 "userId": "123e4567-e89b-12d3-a456-426614174000",
4 "groupId": "123e4567-e89b-12d3-a456-426614174000",
5 "role": "member",
6 "status": "active",
7 "joinedAt": "2023-12-01T10:30:00Z",
8 "expiresAt": "2024-12-01T10:30:00Z",
9 "invitedBy": "123e4567-e89b-12d3-a456-426614174000",
10 "notes": "้ซ˜ไปทๅ€ผๅฎขๆˆท",
11 "config": {
12 "permissions": [
13 "view_reports",
14 "manage_settings"
15 ],
16 "preferences": {
17 "notifications": true
18 }
19 },
20 "user": "example-user",
21 "userGroup": "example-userGroup"
22}

๐Ÿ“ Example Request

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

Ensure merchant has default user group

POST/user-groups/merchant/{merchantId}/ensure-default-group
Full URL
https://api.market.decenctype.com/user-groups/merchant/{merchantId}/ensure-default-group

๐ŸŽฏ Path Parameters

  • merchantId (string) - โœ… Required: Merchant ID

Description: Ensure merchant has default user group

Operation ID: ensureMerchantHasDefaultUserGroup

Response Status:

  • โœ… 200: Merchant default user group ensured successfully
  • โœ… 201: Success

๐Ÿ“‹ Response Examples

response.json
1{
2 "hasDefaultGroup": true,
3 "defaultGroup": {},
4 "usersAdded": 1
5}

๐Ÿ“ Example Request

curl -X POST "https://api.market.decenctype.com/user-groups/merchant/example-id/ensure-default-group" \\
  -H "Authorization: Bearer YOUR_TOKEN" \\
  -H "Content-Type: application/json"