Project

General

Profile

Marketplace » History » Version 22

Ryan Supawarapong, 02/20/2026 06:00 AM

1 1 Ryan Supawarapong
# Marketplace
2
3 13 Ryan Supawarapong
There are the following API:
4
- Get
5
- Sell
6
- Reserve
7
- Update
8
  - Confirm
9
  - Cancel
10 16 karnake ruengchaicharnkij
  - Remove
11 13 Ryan Supawarapong
12 4 Ryan Supawarapong
## Diagram
13 1 Ryan Supawarapong
<img src="market_place.png"><br>
14 16 karnake ruengchaicharnkij
```
15
title Market Place
16 1 Ryan Supawarapong
17 16 karnake ruengchaicharnkij
actor "customer" as c
18
actor "owner" as o
19
actor "admin" as a
20
participant "frontend" as fe
21
participant "admin" as adm
22
participant "backend" as be
23
database "database" as db
24
participant "notification" as n
25
26
o->fe: post sell asset
27
fe->be: verify asset and quantities
28
be<->db: query database
29
be->fe: true/false
30
fe->c: true: dispaly new post
31
c->fe: click "interest" button
32
fe->be: update status and count down 15 minutes
33
be<->db: update database
34
be->fe: true/false
35
fe->c: show status "locked"
36
be->n: update payment notification
37
n->c: email bank account info and payment noti within 15 minutes
38
c->n: click confirm payment
39
c->fe: totp to confirm payment
40
fe->be: update payment
41
fe->fe: update status to "pending payment confirm"
42
be<->db: update database
43
be->n: update payment confirmation
44
n->o: email payment acknowledge confirmation and pay service fees
45
o->n: click confirm service fees
46
o->fe: totp to confirm service fees
47
fe->be: update service fees transaction
48
fe->fe: update status to "pending service fees confirm"
49
be<->db: update database
50
be->n: send service fees notification
51
n->a: get noti for new service fees
52
adm<->be: get new service fees
53
a->adm: verify service fees
54
adm<->be: show service fees
55
a->adm: approved service fees
56
adm->be: update service fees status
57
be<->db: update database
58
be->n: send notification
59
n->o: get noti service fees approved
60
fe->fe: update status to "complete"
61
```
62 1 Ryan Supawarapong
63 17 Ryan Supawarapong
## API route
64 1 Ryan Supawarapong
65 17 Ryan Supawarapong
## Lists
66 1 Ryan Supawarapong
67 8 Ryan Supawarapong
68 17 Ryan Supawarapong
| Type    | Value  |
69
| --------| ---- | 
70 22 Ryan Supawarapong
| API Path| `/api/v1/customer/marketplace/lists` |
71 17 Ryan Supawarapong
| Request Type | `GET` |
72
| Content-Type | `application/json` |
73 13 Ryan Supawarapong
74 17 Ryan Supawarapong
### Request Body
75 3 Ryan Supawarapong
76 17 Ryan Supawarapong
| Key | Type | Example | Required |
77
|-----|------|---------|----------|
78 3 Ryan Supawarapong
79
#### Response
80
81 1 Ryan Supawarapong
| JSON Path | Type | Example | Required |
82
|---|---|---|---|
83
| status | string | "success" | yes |
84
| xid | string | "xRequestID" | yes |
85
| data | object | {"transactions":[...]} | yes |
86 21 Ryan Supawarapong
| data.transactions | array<object>| [ { ... } ] | yes |
87 19 Ryan Supawarapong
88 1 Ryan Supawarapong
89 3 Ryan Supawarapong
##### Example response body
90 1 Ryan Supawarapong
| Body | Value |
91
|---|---|
92 20 Ryan Supawarapong
| JSON | |
93 13 Ryan Supawarapong
94
### Sell