Marketplace » History » Revision 17
Revision 16 (karnake ruengchaicharnkij, 02/20/2026 02:51 AM) → Revision 17/36 (Ryan Supawarapong, 02/20/2026 04:15 AM)
# Marketplace There are the following API: - Get - Sell - Reserve - Update - Confirm - Cancel - Remove ## Diagram <img src="market_place.png"><br> ``` title Market Place actor "customer" as c actor "owner" as o actor "admin" as a participant "frontend" as fe participant "admin" as adm participant "backend" as be database "database" as db participant "notification" as n o->fe: post sell asset fe->be: verify asset and quantities be<->db: query database be->fe: true/false fe->c: true: dispaly new post c->fe: click "interest" button fe->be: update status and count down 15 minutes be<->db: update database be->fe: true/false fe->c: show status "locked" be->n: update payment notification n->c: email bank account info and payment noti within 15 minutes c->n: click confirm payment c->fe: totp to confirm payment fe->be: update payment fe->fe: update status to "pending payment confirm" be<->db: update database be->n: update payment confirmation n->o: email payment acknowledge confirmation and pay service fees o->n: click confirm service fees o->fe: totp to confirm service fees fe->be: update service fees transaction fe->fe: update status to "pending service fees confirm" be<->db: update database be->n: send service fees notification n->a: get noti for new service fees adm<->be: get new service fees a->adm: verify service fees adm<->be: show service fees a->adm: approved service fees adm->be: update service fees status be<->db: update database be->n: send notification n->o: get noti service fees approved fe->fe: update status to "complete" ``` ### Get <img style="width: 264px;" src="clipboard-202602171558-lepmv.png"><br> <img style="width: 324px;" src="clipboard-202602171559-izoj5.png"><br> ### Sell Flowchart and sequence diagram for sell api. <img style="width: 226px;" src="clipboard-202602171357-fmt5h.png"><br> <img style="width: 380px;" src="clipboard-202602171359-nyduz.png"><br> ### Reserve <img style="width: 282px;" src="clipboard-202602171527-anmwr.png"><br> <img style="width: 439px;" src="clipboard-202602171557-yqhga.png"><br> ## API route ## Lists ### Get Allow authenticated user to get listing of market place | Type | Value | | --------| ---- | ----- | | API Path| `/marketplace/v1/fullname/lists` URL | /api/v1/customer/marketplace/listing/get | | Request Type | `GET` Get | | Content-Type Param/Body Input | `application/json` N/A | ### Request Body | Key | Type | Example | Required | |-----|------|---------|----------| #### Response | JSON Path | Type | Example | Required | |---|---|---|---| | status | string | "success" | yes | | xid | string | "xRequestID" | yes | | data | object | {"transactions":[...]} {"marketplace":[...]} | yes | | data.transactions data.marketplace | array<object| [ { ... } ] | yes | | data.marketplace[].id | integer | 1 | yes | | data.marketplace[].icoCode | string | "product1" | yes | | data.marketplace[].from | integer | 90000004 | yes | | data.marketplace[].to | integer | 0 | yes | | data.marketplace[].unitAmount | integer | 10 | yes | | data.marketplace[].unitPrice | number | 2 | yes | | data.marketplace[].totalPrice | number | 20 | yes | | data.marketplace[].status | integer | 0 | yes | | data.marketplace[].CreatedAt | string (date-time) | "2024-06-01T00:00:00Z" | yes | | data.marketplace[].UpdatedAt | string (date-time) | "0001-01-01T00:00:00Z" | yes | | data.marketplace[].DeletedAt | null/object | null | yes | ##### Example response body | Body | Value | |---|---| | JSON | {"status":"success","xid":"xRequestID","data":{"marketplace":[{"id":1,"icoCode":"product1","from":90000004,"to":0,"unitAmount":10,"unitPrice":2,"totalPrice":20,"status":0,"CreatedAt":"2024-06-01T00:00:00Z","UpdatedAt":"0001-01-01T00:00:00Z","DeletedAt":null},{"id":2,"icoCode":"product2","from":90000005,"to":0,"unitAmount":5,"unitPrice":3,"totalPrice":15,"status":0,"CreatedAt":"2024-06-01T00:00:10Z","UpdatedAt":"0001-01-01T00:00:00Z","DeletedAt":null},{"id":3,"icoCode":"product3","from":90000006,"to":90000005,"unitAmount":8,"unitPrice":1.5,"totalPrice":12,"status":2,"CreatedAt":"2024-06-01T00:00:20Z","UpdatedAt":"0001-01-01T00:00:00Z","DeletedAt":null}]}} | ### Sell